aboutsummaryrefslogtreecommitdiffstats
path: root/main/abuild/APKBUILD
blob: 17b8ffc80ab274fe29cc56f76aa57d53a8cb9e3d (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgdesc="Script to build Alpine Packages"
pkgname=abuild
pkgver=2.17.0
_ver=${pkgver%_git*}
pkgrel=3
url=http://git.alpinelinux.org/cgit/abuild/
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"
arch="all"
license=GPL-2
source="http://dev.alpinelinux.org/archive/abuild/abuild-$pkgver.tar.xz
	0001-abuild-support-qt5-mkspecs.patch
	0001-abuild-add-cmake-files-to-dev.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
}

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="e3000a6841f865a4404733185d9a2eff  abuild-2.17.0.tar.xz
7b1b5016e26bdef9f95034724f60d3f2  0001-abuild-support-qt5-mkspecs.patch
2757c4c799a3732df559a1c50e2996b8  0001-abuild-add-cmake-files-to-dev.patch"
sha256sums="9238fedc66e2af99b041cb9096d982027650fa7ece79fcfc22d6abdae11ed6de  abuild-2.17.0.tar.xz
7a7e1f63be5da6bf15da272e7043147336a383d4277f6342e0faf8a596d32ef9  0001-abuild-support-qt5-mkspecs.patch
ca9be2ec6f21891f7129c2e5109e6b258364489b99445bf80813120523d06617  0001-abuild-add-cmake-files-to-dev.patch"
sha512sums="26385f6a3e39851826d170c2b379205a51f034412b03b4a2b86ff61b14e34cbe2300d0f2280a14439d4342c1495d67d07e47910d5cba73c29b44d46d77120635  abuild-2.17.0.tar.xz
91c543695677d34a3353d667d79f302587e72ad13d5c221a930bce5dbb74524933f2d30cdd045cd77539f2526bb25a6d1d1491e396d59c654a3ddd534da06cd4  0001-abuild-support-qt5-mkspecs.patch
604db060c43d28ebb5b326841daf8e48c132246cd21d556f1269e5b3dcd1c28141046360f33794839a2915b0d05311fb4f8f748448e63e5e668221fd4f7efa2e  0001-abuild-add-cmake-files-to-dev.patch"