[arch-general] Need help understanding meta-PKGBUILDs

David C. Rankin drankinatty at suddenlinkmail.com
Tue Feb 1 23:41:21 EST 2011


Guys,

    We have made good progress refining the basics for Trinity PKGBUILDs. The
trinity/dependencies PKGBUILDs are working for tqtinterface and arts.

https://wiki.archlinux.org/index.php/Trinity#Development_PKGBUILDs

    They have been reworked to conform with the kde4 (kde-meta) PKGBUILD
structure. But, I'm having trouble understanding how to 'tie' the meta-PKGBUILDs
together with the actual PKGBUILDs for the individual trinity modules. Here are
the questions I have:

(1) can I have 3-levels of PKGBUILDs?

Example: the trinity directory structure is:

trinity
    applications
    dependencies
        arts
        tqtinterface
    <snip>

Following the kde4 layout, I was trying to create something like this:

trinity
    <PKGBUILD pkgbase=trinity-meta>
    applications
    dependencies
       <PKGBUILD pkgbase=trinity-meta>
        arts
            <PKGBUILD pkgbase=trinity>
        tqtinterface
    <snip>

    I have the arts and tqtinterface level PKGBUILDs done, but I don't know how
to tie them to the trinity-meta PKGBUILDs above. Looking at the kde4 examples, I
have the following:

under trinity:

pkgbase=trinity-meta
pkgname=('trinity-meta-applications'
	'trinity-meta-dependencies'
	<snip>
package_trinity-meta-applications() {
	<snip>
}

package_trinity-meta-dependencies() {
	pkgdesc=('Meta package for trinity-dependencies')
	depends=('cmake'
		'python2-sip'
		'pyqt3'
		'pykde3'
		'qt3')
	replaces=('trinity-dependencies')
	conflicts=('trinity-dependencies')
}

under trinity/dependencies:

pkgbase=trinity-meta
pkgname=('trinity-meta-tqtinterface'
         'trinity-meta-arts')

pkgver=$(getsvnrev)
pkgrel=1.0
arch=('i686' 'x86_64')
url='http://www.kde.org'
license=('GPL')
groups=('trinity' 'trinity-bld')

package_trinity-meta-tqtinterface() {
	pkgdesc=('Meta package for dependencies-tqtinterface')
	depends=('cmake'
		'python2-sip'
		'pyqt3'
		'pykde3'
		'qt3')
	replaces=('tqtinterface')
	conflicts=('tqtinterface')
}

package_trinity-meta-arts() {
	pkgdesc=('Meta package for dependencies-arts')
	depends=('cmake'
		'python2-sip'
		'pyqt3'
		'pykde3'
		'qt3'
		'tqtinterface')
	replaces=('trinity-arts')
	conflicts=('trinity-arts')
}

under trinity/dependencies/arts:

 http://www.3111skyline.com/dl/dt/trinity/arch/dev/dependencies/arts/PKGBUILD

under trinity/dependencies/tqtinterface:

 http://www.3111skyline.com/dl/dt/trinity/arch/dev/dependencies/tqtinterface/PKGBUILD

    What I don't understand is how does calling the trinity level PKGBUILD
invoke the trinity/dependencies level PKGBUILD and so on....

(2)    I googled using arch meta pkgbuild, but I haven't come up with a good
reference. Does anyone have a good link or reference?

https://wiki.archlinux.org/index.php/PKGBUILD,
https://wiki.archlinux.org/index.php/Creating_Packages and
https://wiki.archlinux.org/index.php/Makepkg don't really explain it.

(3)   Lastly, if anybody has interest, please look over the PKGBUILDs and let me
know where I'm doing something stupid. I have done quite a bit of reading trying
to digest PKGBUILDs and how to apply them to a large project like Trinity. I
don't claim to be an expert on them, so I know there are places where they need
improving. Thanks.

-- 
David C. Rankin, J.D.,P.E.


More information about the arch-general mailing list