aboutsummaryrefslogtreecommitdiffstats
path: root/main/abuild/APKBUILD
blob: 400e978cf942375a6d833153e89d3796189d16ef (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=abuild
pkgver=2.27.2
_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
	attr tar pkgconf patch"
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 apkbuild-gem-resolver:gems"
options="suid"
pkggroups="abuild"
source="http://dev.alpinelinux.org/archive/abuild/abuild-$_ver.tar.xz
0001-newapkbuild-redirect-find-1-stderr-to-dev-null.patch
0002-abuild-fix-cross-compilation-undeps.patch
0003-abuild-perform-unzip-operations-quietly.patch
0004-abuild-support-arch-all-armhf.patch
0005-add-aarch64-architecture.patch
0006-abuild-rename-distfile-copy-when-checksum-does-not-m.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/
}

gems() {
	pkgdesc="APKBUILD dependency resolver for RubyGems"
	depends="ruby ruby-augeas"
	arch="noarch"
	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/apkbuild-gem-resolver "$subpkgdir"/usr/bin/
}

md5sums="cabaec423ced69b85aac19583a11af84  abuild-2.27.2.tar.xz
5d5d3337a0d225fbad8815484f7c2038  0001-newapkbuild-redirect-find-1-stderr-to-dev-null.patch
10c61c48f539c612e636eedb3b843be2  0002-abuild-fix-cross-compilation-undeps.patch
95c947183ec5d3a89d92dc84f7713bb8  0003-abuild-perform-unzip-operations-quietly.patch
40255290bbf152dc41ee46674dfc4bcc  0004-abuild-support-arch-all-armhf.patch
664363db603e041925764d0b67106295  0005-add-aarch64-architecture.patch
5933163515ad5c7d16b4f5a19300a5f6  0006-abuild-rename-distfile-copy-when-checksum-does-not-m.patch"
sha256sums="8b84207e7588991929570845f6f73c6e3b0fc87ed3823c5096a41d355b331175  abuild-2.27.2.tar.xz
3c9ed9d33651ac345cfd46916c511ad44ce29c258fae2fa5872974316dcbf146  0001-newapkbuild-redirect-find-1-stderr-to-dev-null.patch
aa88d3660d1f634cfa848c0195ddb41082caa8268fab7096b0909e22425d2e07  0002-abuild-fix-cross-compilation-undeps.patch
4ff1b50e8f0909c5727b51dd8f75151ee0ca8400ee4afa9cf14757aa9fa9cfed  0003-abuild-perform-unzip-operations-quietly.patch
d342dfc5284058e874137eb03bc21645738a445e107d25eaad32b5e4b4cb9d99  0004-abuild-support-arch-all-armhf.patch
aa1ef6f318e8b270b10ef62b01c2f24a153ad335ded7331d038397aae3fc794f  0005-add-aarch64-architecture.patch
755532a992850c5c68028bab37049406c1a3a6e33b0e0726237942ec8d392d67  0006-abuild-rename-distfile-copy-when-checksum-does-not-m.patch"
sha512sums="60f47a0f103c7b7d0f5bd6aea2030971d91dec1ba3d7ffb3ebacd4bba6d5666927ec7e8ecf969ca8acdb345d01cd953a04bab593334b89587b238af603b4d6d5  abuild-2.27.2.tar.xz
772f845cbb15524e2e827f1ae9afce396ae4593ab03ee83f81ca01d2adeee6bc70e36b4d391e6f1b97cb749f66f2ba8f288fef38476a629c767b0f1973549448  0001-newapkbuild-redirect-find-1-stderr-to-dev-null.patch
9072b908f8ecd7996b3666bc3e89c940bbc407dece6499b32f7c4894d51416e0c4aa15fb875f5f37ebca7512902c2bde72e7eddf9d4dcb9b9ad6a9a83e0310a7  0002-abuild-fix-cross-compilation-undeps.patch
0a988221ccf99014e6152d4a269267702d7392a1bb8d2a1f64abb52aaec1076b2142d7c910b9f07788a0c9682cbf1d3506dff2d25cd32ef76f367deb60880bac  0003-abuild-perform-unzip-operations-quietly.patch
d990db97c2e5f6ce9c842928cd01f4e3402e7ca3d2a6a63f0063abe4d83b5d4040ceb26b27eaa9b6db40af38aaea34cdc9b98a6dfc888b5d2051ffa32eb7bf62  0004-abuild-support-arch-all-armhf.patch
17596581f4f1bf35e0a06c6b0437015c38cd3527919f0db133aa1df064d8c42c4375be7282cb7a949841cb3d6cb509bbbc1a0caaffb6f40add6594982b68b4b5  0005-add-aarch64-architecture.patch
498c105f8ee5f7e0ae639b62372a6f7bebfb1cafaeeaa3a4334cdba919a7be7419a996e981fe6a659d38d342c3278140a53525b42929047b6de8cbcd4df4011d  0006-abuild-rename-distfile-copy-when-checksum-does-not-m.patch"