aboutsummaryrefslogtreecommitdiffstats
path: root/main/abuild/APKBUILD
blob: db4c2cc67f5eaf48c8f28faa18da573277874fd0 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=abuild
pkgver=2.23.0
_ver=${pkgver%_git*}
pkgrel=3
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"
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-abuild-fix-circular-dependency-for-symlink-deps.patch
	0002-apkbuild-gem-resolver-fix-syntax.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="864090a6016b3424d7b6bb31e84db3f0  abuild-2.23.0.tar.xz
c8ef8f4155d445842cc20379dbe01ded  0001-abuild-fix-circular-dependency-for-symlink-deps.patch
8d96bd94711cb172586a483a089bb5c8  0002-apkbuild-gem-resolver-fix-syntax.patch"
sha256sums="4cae7d7035955d23d1f29d4d0cd00ce225b300e6e809ff240101feea97aa7262  abuild-2.23.0.tar.xz
2550d9d0dfeeb214aa0154b281a624f977d3b83ba678dc0f727f0c508996f26e  0001-abuild-fix-circular-dependency-for-symlink-deps.patch
239c9b119ba91c254b86fcb700b48dd3f8aae7bc5e902ce04bc839d95478f6b3  0002-apkbuild-gem-resolver-fix-syntax.patch"
sha512sums="50fc7649444079e5ba5552c2f4c57dedbdcd7b10727ed7b7bec8b4c85b37bbca1d76ab61bf3ab160520634e1742c3cd91fb294371bf653330ee0047337b6dfa9  abuild-2.23.0.tar.xz
4c3d1d778b60de9f9e789501e52ab0f17ef5f2ea5cb05e33cc95d59b98130907bce5ed4c4808244b22f14c17b91682447599aded1579c904cee8cd269bda7c85  0001-abuild-fix-circular-dependency-for-symlink-deps.patch
ecd774c509bf45fef15d967a185d5ab7cd4e5e2736d8979b17a8f822622db799eb2a149bedb020b7e9ce0451579a6c7e36f94eaa971b0570ecd6d7adb1a7e00a  0002-apkbuild-gem-resolver-fix-syntax.patch"