summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8bee8b70325aaa84d6adf7eff4fbf9135da85768 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Maintainer: Luis Martinez <luis dot martinez at tuta dot io>
# Contributor: Jacob Alexander <haata at kiibohd com>

pkgbase=germinate
pkgname=('germinate' 'python-germinate' 'python2-germinate')
_pkgname=${pkgname[0]}
pkgver=2.37
pkgrel=1
pkgdesc='Expands dependencies in a list of seed packages'
arch=('x86_64')
url="https://tracker.debian.org/pkg/germinate"
license=('GPL')
makedepends=('python-setuptools' 'python-apt' 'python2-apt' 'python2-setuptools')
options=(!emptydirs)
source=("https://mirrors.ocf.berkeley.edu/debian/pool/main/g/germinate/${_pkgname}_$pkgver.tar.xz")
sha256sums=('367771cdd892cfa94a46b8df8afec1060604b93d7bb98170d406bcdaddbfd096')

# Base
# Build last
package_germinate() {
	cd work
	depends+=('perl' 'python' 'python-apt')

	# Initial python build
	python setup.py build

	# Install files to /usr/bin
	install -Dm 755 bin/germinate{,-pkg-diff,-update-metapackage} -t "$pkgdir/usr/bin"

	# Install perl libs
	install -Dm 644 debhelper/germinate.pm -t "$pkgdir/usr/share/perl5/vendor_perl/Debhelper/Sequence/"

	# Install man pages (keep original files, or python builds will fail)
	install -Dm 644 \
	  debhelper/dh_germinate_{clean,metapackage} \
	  man/germinate{,-pkg-diff,-update-metapackage}.1 \
	  -t "$pkgdir/usr/share/man/man1/"
}

# Python libs
# Build this first
package_python-germinate() {
	cd work
	depends+=('germinate' 'python')

	python setup.py install --root="$pkgdir/" --optimize=1

	# Remove already installed portions
	rm -rf $pkgdir/usr/share/man
	rm -rf $pkgdir/usr/share/perl5
	rm -rf $pkgdir/usr/bin
}

# Python2 libs
package_python2-germinate() {
	cd work
	depends+=('germinate' 'python2' 'python2-apt')

	python2 setup.py install --root="$pkgdir/" --optimize=1

	# Remove already installed portions
	rm -rf $pkgdir/usr/share/man
	rm -rf $pkgdir/usr/share/perl5
	rm -rf $pkgdir/usr/bin
}