aboutsummaryrefslogtreecommitdiffstats
path: root/main/abuild/APKBUILD
blob: 4dccaa7928ddd3c88bf26fc639bfa5b62a74d824 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgdesc="Script to build Alpine Packages"
pkgname=abuild
pkgver=2.15.0
_ver=${pkgver%_git*}
pkgrel=2
url=http://git.alpinelinux.org/cgit/abuild/
depends="fakeroot sudo pax-utils openssl apk-tools>=2.0.7-r1 abuildhelper
	libc-utils"
if [ "$CBUILD" = "$CHOST" ]; then
	depends="$depends curl"
fi
makedepends="openssl-dev pkgconfig"
install="$pkgname.pre-install $pkgname.pre-upgrade"
subpackages="apkbuild-cpan:cpan"
pkggroups="abuild"
arch="all"
license=GPL-2
source="http://dev.alpinelinux.org/archive/abuild/abuild-$pkgver.tar.xz
	0001-abuild-fix-ldpath-handling.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="ba2a10bed1efbe31c52de6f64dd9bbf2  abuild-2.15.0.tar.xz
b0ab439f64579ad231de83e5979d6214  0001-abuild-fix-ldpath-handling.patch"
sha256sums="5518079b8897746d9603cf3692400ec1c6b6af5f57fb003c27edcbd35511dd74  abuild-2.15.0.tar.xz
3658b6a34747f77e91706568d594aa2a9c250dfcbfa0d5da53379d00c527cc6a  0001-abuild-fix-ldpath-handling.patch"
sha512sums="d7f2c38f81743e2c8c787d2a9a7c7fa7ec2fbf89c32e72e8a84e66fd517686456e201108388f36250d37804b422ecfacbca4a463172d05359deb9d65e6b20426  abuild-2.15.0.tar.xz
79eddd7fb2ca3a9cd9bd61aa54578b16bdd711471d9915b0236896562b1233aec1c03246aa2306ce70113847f0dcc959825c01ac93410927732fe4ed48b64cdb  0001-abuild-fix-ldpath-handling.patch"