makepkg: Move .PKGINFO creation into a function.
[pacman-ng.git] / PKGBUILD-split.proto
blob0baa496485a0ae312bc6ccaaaa27fd338982a15c
1 # This is an example of a PKGBUILD for splitting packages. Use this as a
2 # start to creating your own, and remove these comments. For more information,
3 # see 'man PKGBUILD'. NOTE: Please fill out the license field for your package!
4 # If it is unknown, then please put 'unknown'.
6 # Contributor: Your Name <youremail@domain.com>
7 pkgname=('pkg1' 'pkg2')
8 pkgbase=('pkg')
9 pkgver=VERSION
10 pkgrel=1
11 pkgdesc=""
12 arch=()
13 url=""
14 license=('GPL')
15 groups=()
16 depends=()
17 makedepends=()
18 provides=()
19 conflicts=()
20 replaces=()
21 backup=()
22 options=()
23 install=
24 source=($pkgbase-$pkgver.tar.gz)
25 noextract=()
26 md5sums=() #generate with 'makepkg -g'
28 build() {
29   cd "$srcdir/$pkgbase-$pkgver"
30   ./configure --prefix=/usr
31   make || return 1
34 package_pkg1() {
35   # options and directives that can be overridden
36   pkgdesc=""
37   license=()
38   groups=()
39   depends=()
40   optdepends=()
41   provides=()
42   conflicts=()
43   replaces=()
44   backup=()
45   options=()
46   install=
48   cd "$srcdir/$pkgbase-$pkgver"
49   make DESTDIR="$pkgdir/" install-pkg1
52 package_pkg2() {
53   # options and directives overrides
54   pkgdesc=""
56   cd "$srcdir/$pkgbase-$pkgver"
57   make DESTDIR="$pkgdir/" install-pkg2