aboutsummaryrefslogtreecommitdiffstats
path: root/main/abuild/APKBUILD
blob: 7ea7adf2e86f062774eb689197bdd9ba7ac7d050 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgdesc="Script to build Alpine Packages"
pkgname=abuild
pkgver=2.12.1
pkgrel=3
url=http://git.alpinelinux.org/cgit/abuild/
source="http://git.alpinelinux.org/cgit/abuild/snapshot/abuild-$pkgver.tar.bz2
	0001-abuild-add-support-for-uncompressed-tar-archives.patch
	0001-abuild-use-scanelf-soname-to-find-the-provides-so.patch
	0002-abuild-add-provides-information.patch
	0001-abuild-add-version-number-to-provides.patch

	"
depends="fakeroot file sudo pax-utils openssl apk-tools>=2.0.7-r1 uclibc-utils
	abuildhelper curl"
makedepends="openssl-dev pkgconfig"
install="$pkgname.pre-install $pkgname.pre-upgrade"
subpackages="apkbuild-cpan:cpan"
pkggroups="abuild"
arch="all"
license=GPL-2

prepare() {
	cd "$srcdir/$pkgname-$pkgver"
	for i in $source; do
		case $i in
		*.patch)
			msg "Applying $i"
			patch -p1 -i "$srcdir"/$i || return 1
			;;
		esac
	done
}

build() {
	cd "$srcdir/$pkgname-$pkgver"
	make
}

package() {
	cd "$srcdir/$pkgname-$pkgver"
	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="92348750a3354c3ec7b811716543b8e5  abuild-2.12.1.tar.bz2
b04eb6325bf8014ea9fc974344f71a82  0001-abuild-add-support-for-uncompressed-tar-archives.patch
8ba51a92d24d9e54bfdd1133bc2f0f8d  0001-abuild-use-scanelf-soname-to-find-the-provides-so.patch
454e0c6a8a3ee97ec4b00874203f700c  0002-abuild-add-provides-information.patch
e8e910f86ed1892bd46facb88164a27b  0001-abuild-add-version-number-to-provides.patch"