aboutsummaryrefslogtreecommitdiffstats
path: root/main/abuild/APKBUILD
blob: b66acea74932f2b2872eb906fee414bb22d01f45 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgdesc="Script to build Alpine Packages"
pkgname=abuild
pkgver=2.14.2
_ver=${pkgver%_git*}
pkgrel=1
url=http://git.alpinelinux.org/cgit/abuild/
depends="fakeroot file sudo pax-utils openssl apk-tools>=2.0.7-r1
	abuildhelper curl libc-utils"
makedepends="openssl-dev pkgconfig"
install="$pkgname.pre-install $pkgname.pre-upgrade"
subpackages="apkbuild-cpan:cpan"
pkggroups="abuild"
arch="all"
license=GPL-2
source="http://git.alpinelinux.org/cgit/abuild/snapshot/abuild-$_ver.tar.bz2
	0001-buildrepo-avoid-using-i-as-loop-variable.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 "s/^CARCH=.*/CARCH=$CARCH/" \
		-e "s/^CBUILD=.*/CBUILD=$CBUILD/" abuild.conf
}

build() {
	cd "$_builddir"
	make
}

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

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

md5sums="28b88233f7cece810ed9008647f1b0a2  abuild-2.14.2.tar.bz2
b159d73dfddf2994e7469d749a94ff2a  0001-buildrepo-avoid-using-i-as-loop-variable.patch"
sha256sums="37192e3dbe148620341925059f57188b0f3635a60c74e5614fb7914741cb7d89  abuild-2.14.2.tar.bz2
276746a44b52cd46cef295dbd993716ddabc9da46e4e2db5e813ee0e900577c8  0001-buildrepo-avoid-using-i-as-loop-variable.patch"
sha512sums="8f9cea29f8d1c8472ef7c4771789b995ce5422ee87f8262aa60c118b7a198b7c7b17c9120e3de98e410f14427fbac020920076a9b387943e638af10859db1648  abuild-2.14.2.tar.bz2
9b2894e2d5050c532bfb1e4c2ff22f0edd8cf4d4a27c4dd7d60e1269c4ec130d70bd9a04a4f84c697a44d140d98c2ed543e0d99899a26e673a3fd4b642de572b  0001-buildrepo-avoid-using-i-as-loop-variable.patch"