aboutsummaryrefslogtreecommitdiffstats
path: root/main/abuild/APKBUILD
blob: 5e93df766dccceb11e595e01e52bf2d616ef8fd1 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgdesc="Script to build Alpine Packages"
pkgname=abuild
pkgver=2.14.1
_ver=${pkgver%_git*}
pkgrel=3
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-parse-APKBUILDs-in-subshell.patch
	0001-buildrepo-set-REPODEST-when-running-abuild.patch
	0001-abuild-add-support-for-optional-remote-logging.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="ec7c8e453d4331ac20c164c263234f02  abuild-2.14.1.tar.bz2
d44821805530e9e57a4e27f8fe7f2970  0001-buildrepo-parse-APKBUILDs-in-subshell.patch
1b0e56775cace496612afc9e2e233ff9  0001-buildrepo-set-REPODEST-when-running-abuild.patch
63379b334ed76c562ee07fb3a0ba506a  0001-abuild-add-support-for-optional-remote-logging.patch"
sha256sums="e9ee3df70118f4f5eb6aca00570c8fb8fb5cf79ed08eb653929116384af77c35  abuild-2.14.1.tar.bz2
d30ff115fe3595c1dbc8efaeb13233527148ac72c966521f04b9c166a5cceee3  0001-buildrepo-parse-APKBUILDs-in-subshell.patch
e33d919078c122b426d09bab7a761bb880fee0d36cc23a4de5114e6f3829f235  0001-buildrepo-set-REPODEST-when-running-abuild.patch
5a191d2f984c65cdc3d1cb496d04711c0f6b33906974e4864536a7ef373b5081  0001-abuild-add-support-for-optional-remote-logging.patch"
sha512sums="3eb14b4d4a104c459a7689d862e9efc29b0a5585101af25604248ad6453c7538c56bfe59f4250e3c56357db37dbf7c04115338c55a4ac0231bb3a61545a83cdf  abuild-2.14.1.tar.bz2
775f1ae3128b4083b33c162e572ce2ef438385f5a40145e719331feb60e10e6ad4d0d2c9a9c7f639a7bd53bb01d93b6e23de030b2a22916f275fcaa1fd34e043  0001-buildrepo-parse-APKBUILDs-in-subshell.patch
caea0aad0efbc67b4fe8989d5cc9a07c4d99b4882ec7215fb3c769f2f3f7e0a9ab4ac7f0ebbaced05435a797af03328a146c963b5ade6139a7c8fffad167e1c1  0001-buildrepo-set-REPODEST-when-running-abuild.patch
0d7625621f85fa4798463c83170a6bad4e26521baa99338009e699939fd09897b68334f950ded22e379acb3542a5002af0d47d8beea27d939a4b3a2b8970cfd2  0001-abuild-add-support-for-optional-remote-logging.patch"