aboutsummaryrefslogtreecommitdiffstats
path: root/main/abuild/APKBUILD
blob: 2cb9906bddfca0aa79e9a665800f524d555874d4 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=abuild
pkgver=2.19.0
_ver=${pkgver%_git*}
pkgrel=1
pkgdesc="Script to build Alpine Packages"
url="http://git.alpinelinux.org/cgit/abuild/"
arch="all"
license="GPL2"
depends="fakeroot sudo pax-utils openssl apk-tools>=2.0.7-r1 libc-utils"
if [ "$CBUILD" = "$CHOST" ]; then
	depends="$depends curl"
fi
makedepends_build="pkgconfig"
makedepends_host="openssl-dev"
makedepends="$makedepends_host $makedepends_build"
install="$pkgname.pre-install $pkgname.pre-upgrade"
subpackages="apkbuild-cpan:cpan"
pkggroups="abuild"
source="http://dev.alpinelinux.org/archive/abuild/abuild-$pkgver.tar.xz
	0001-abuild-use-posix-syntax-for-find.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"
	arch="noarch"
	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/apkbuild-cpan "$subpkgdir"/usr/bin/
}

md5sums="9f8bb4b065382317124e26c483c21282  abuild-2.19.0.tar.xz
e75906e82d80cdf43f4ca76198b4c3b7  0001-abuild-use-posix-syntax-for-find.patch"
sha256sums="659d5ca457e6a0a552115018dc903039d54731f6cf291a9b00e1a700a8e3ce83  abuild-2.19.0.tar.xz
a0e6d0dfbbd1c6c08b35cab197ca8801b52a57fefef5353426ca5ba6a1dd034a  0001-abuild-use-posix-syntax-for-find.patch"
sha512sums="f46c38efb1645759c0bd3908a03bc1d27e588801dd138ea6e18390bdcf617eb56f2b49301737558d2509fcdf9cbc2ac4cd5152888d1c41e300ca68f719194d64  abuild-2.19.0.tar.xz
0c72f411e807e3c4aaabaa88c61bca09ef53d59d6ad0408fc7e6ba1f663f259256c13c90747656cbe3cb4660807242748252fbfc8c7619a0a6bfec0d14978039  0001-abuild-use-posix-syntax-for-find.patch"