aboutsummaryrefslogtreecommitdiffstats
path: root/main/abuild/APKBUILD
blob: 18e37cf0e69e65d03f4bee7d7f8eb1d1d7f7d6a9 (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
67
68
69
70
71
72
73
74
75
76
77
78
79
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=abuild
pkgver=2.29.0
_ver=${pkgver%_git*}
pkgrel=3
pkgdesc="Script to build Alpine Packages"
url="http://git.alpinelinux.org/cgit/abuild/"
arch="all"
license="GPL2"
depends="fakeroot sudo pax-utils libressl apk-tools>=2.0.7-r1 libc-utils
	attr tar pkgconf patch"
if [ "$CBUILD" = "$CHOST" ]; then
	depends="$depends curl"
fi
makedepends_build="pkgconfig"
makedepends_host="libressl-dev"
makedepends="$makedepends_host $makedepends_build"
install="$pkgname.pre-install $pkgname.pre-upgrade"
subpackages="apkbuild-cpan:cpan:noarch apkbuild-gem-resolver:gems:noarch"
options="suid"
pkggroups="abuild"
source="http://dev.alpinelinux.org/archive/abuild/abuild-$_ver.tar.xz
	0001-abuild-properly-detect-failure-of-dependency-install.patch
	0001-abuild-pass-arch-to-apk-whenever-sysroot-is-used.patch
	0001-abuild-add-missing-triplet-definitions-for-ppc-and-p.patch
	"

_builddir="$srcdir/$pkgname-$_ver"
prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch)
			msg "Applying $i"
			patch -p1 -i "$srcdir"/$i || return 1
			;;
		esac
	done
	sed -i -e "/^CHOST=/s/=.*/=$CHOST/" abuild.conf
}

build() {
	cd "$_builddir"
	make || return 1
}

package() {
	cd "$_builddir"
	make install DESTDIR="$pkgdir" || return 1
	install -m 644 abuild.conf "$pkgdir"/etc/abuild.conf || return 1
	install -d -m 775 -g abuild "$pkgdir"/var/cache/distfiles || return 1
}

cpan() {
	pkgdesc="Script to generate perl APKBUILD from CPAN"
	depends="perl perl-libwww perl-json"
	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/apkbuild-cpan "$subpkgdir"/usr/bin/
}

gems() {
	pkgdesc="APKBUILD dependency resolver for RubyGems"
	depends="ruby ruby-augeas"
	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/apkbuild-gem-resolver "$subpkgdir"/usr/bin/
}

md5sums="1a51f8786331ddf79bf46357fe938f6a  abuild-2.29.0.tar.xz
5dc373cd5daf473a4ee060f9cedbc9c0  0001-abuild-properly-detect-failure-of-dependency-install.patch
fd7ac6bc2c104869b6c21d75570f4e01  0001-abuild-pass-arch-to-apk-whenever-sysroot-is-used.patch
47bced6bf9bc8bd3f9fc7e3f899b8cca  0001-abuild-add-missing-triplet-definitions-for-ppc-and-p.patch"
sha256sums="06ba81d4b42e7d1ebb0761b0b0e1cbaf999acac54ab075906cecdf8f825950c1  abuild-2.29.0.tar.xz
e79ba4cdcdea3fa18d8441b8144c2db8c497523ee56927b466a701736ee9b906  0001-abuild-properly-detect-failure-of-dependency-install.patch
24f0ceb383a8651f3df192773d62c7258d2ce9b3220fcedfe9a2c173d522111a  0001-abuild-pass-arch-to-apk-whenever-sysroot-is-used.patch
d897d365fdf9ab7bb911ff37af4d1287e7891ca7b49ad5a1196c076cd5bd5322  0001-abuild-add-missing-triplet-definitions-for-ppc-and-p.patch"
sha512sums="349c0d5efaff05dc6f680a93e59a997857991520ae892426252d198aa4ef0b2854f1675ce3b1bc1bea810d5f97fae0985474ea13df3905d590b320373723990c  abuild-2.29.0.tar.xz
1bc4bb62ee881051f41f5f68d25f8794208407f552a30bd7aad235c0bd57ebadc2a12dc21a4c1826eff3e320a5f9e7c40f89fd964144ff2f0d49f747708a61b4  0001-abuild-properly-detect-failure-of-dependency-install.patch
655476f5d263701d59f85ff8c28c342d8d0710bb6c869ca7e0cb8df9f70ca2cd5af44c460b578f6ebcf320774575ce193be15830b942a956a04c0345bf27bd4e  0001-abuild-pass-arch-to-apk-whenever-sysroot-is-used.patch
6f4212c796829578f318b257adcfdf493a1520cd45c623c110a3181fd076bbcb94f84b04f9292bd081a923e5819448673e5adc1a3e8450e086784c00c3515459  0001-abuild-add-missing-triplet-definitions-for-ppc-and-p.patch"