summaryrefslogtreecommitdiffstats
path: root/main/apk-tools/APKBUILD
blob: c6f429c7a62ad80df22edef3f0b56fbd32328276 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=apk-tools
pkgver=2.1.0_rc1
pkgrel=2
pkgdesc="Alpine Package Keeper - package manager for alpine"
subpackages="$pkgname-static"
depends=
makedepends="zlib-dev openssl-dev pkgconfig"
source="http://git.alpinelinux.org/cgit/$pkgname.git/snapshot/$pkgname-$pkgver.tar.bz2
	0001-fetch-fix-fetching-of-packages-with-arch.patch
	0002-upgrade-Improve-english-messages-on-apk-tools-baseli.patch
	0003-state-make-the-progress-bar-look-nice.patch
	0004-db-Allow-override-arch-when-using-root.patch
	0005-apk-default-screen-width-70-if-ioctl-says-0-as-width.patch
	0006-db-remount-ro-cache-to-rw-earlier-for-update-to-work.patch
	0007-state-make-some-of-the-interactive-messages-line-up-.patch
	"

url="http://git.alpinelinux.org/cgit/apk-tools/"
arch="all"
license=GPL-2

prepare() {
	cd "$srcdir/$pkgname-$pkgver"
	sed -i -e 's:-Werror::' Make.rules
	for i in $source; do
		case $i in
		*.patch) patch -p1 -i "$srcdir"/$i || return 1
		esac
	done
}

build() {
	cd "$srcdir/$pkgname-$pkgver"
	make FULL_VERSION="$pkgver-r$pkgrel" || return 1
	make FULL_VERSION="$pkgver-r$pkgrel" static || return 1
}

package() {
	cd "$srcdir/$pkgname-$pkgver"
	make FULL_VERSION="$pkgver-r$pkgrel" DESTDIR="$pkgdir" install
	cd "$pkgdir/sbin"
	ln -s apk apk_add
	ln -s apk apk_audit
	ln -s apk apk_del
	ln -s apk apk_index
	ln -s apk apk_info
	ln -s apk apk_version
	install -d "$pkgdir"/var/lib/apk "$pkgdir"/var/cache/misc
}

static() {
	pkgdesc="Alpine Package Keeper - static binary"
	install -Dm755 "$srcdir"/$pkgname-$pkgver/src/apk.static \
		"$subpkgdir"/sbin/apk.static
}

md5sums="cc3ee58fa9672bc003cadc2b20bf33d2  apk-tools-2.1.0_rc1.tar.bz2
b13a24a11604d4e6fc8384c5a254ca67  0001-fetch-fix-fetching-of-packages-with-arch.patch
f7af0d74f4d59c56b3fd92145be11592  0002-upgrade-Improve-english-messages-on-apk-tools-baseli.patch
83561b3c964a78f790d818bcc13e5ee3  0003-state-make-the-progress-bar-look-nice.patch
5cd969ed8464432c9372eac456b4db8e  0004-db-Allow-override-arch-when-using-root.patch
665ef14de27cce640799013b175f8826  0005-apk-default-screen-width-70-if-ioctl-says-0-as-width.patch
46a25e0a2cee674235850e337e685f3b  0006-db-remount-ro-cache-to-rw-earlier-for-update-to-work.patch
321e42a3b13ec6451ac9747230e6c974  0007-state-make-some-of-the-interactive-messages-line-up-.patch"