aboutsummaryrefslogtreecommitdiffstats
path: root/community/xbps/APKBUILD
blob: b6d4077d2696f1159832cb67c7a8f0cb7334d664 (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
# Contributor: André Klitzing <aklitzing@gmail.com>
# Maintainer: André Klitzing <aklitzing@gmail.com>
pkgname=xbps
pkgver=0.53
pkgrel=1
pkgdesc="The X Binary Package System"
arch="all"
url="https://github.com/voidlinux/xbps"
license="BSD"
depends="ca-certificates"
makedepends="zlib-dev libarchive-dev openssl-dev"
subpackages="$pkgname-dev $pkgname-doc
	$pkgname-bash-completion:bashcomp:noarch
	$pkgname-zsh-completion:zshcomp:noarch"
options="!check"
source="$pkgname-$pkgver.tar.gz::https://github.com/void-linux/$pkgname/archive/$pkgver.tar.gz
	0f338597015271ee504100c32fd2c4926efdb423.patch
	disable-Werror.patch
	openssl-1.1.patch
	"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"

	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--bindir=/usr/bin \
		--localstatedir=/var/lib/xbps
	make
}

package() {
	cd "$builddir"

	make DESTDIR="$pkgdir/" install

	install -D -m 644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
	install -D -m 644 COPYING.3RDPARTY \
		"$pkgdir/usr/share/licenses/$pkgname/COPYING.3RDPARTY"
}

bashcomp() {
	pkgdesc="Bash completions for $pkgname"
	depends=""
	install_if="$pkgname=$pkgver-r$pkgrel bash-completion"

	_submv usr/share/bash-completion/completions
}

zshcomp() {
	pkgdesc="ZSH completions for $pkgname"
	depends=""
	install_if="$pkgname=$pkgver-r$pkgrel zsh"

	_submv usr/share/zsh/site-functions
}

_submv() {
	local path="$1"
	mkdir -p "$subpkgdir"/${path%/*}
	mv "$pkgdir"/$path "$subpkgdir"/${path%/*}/
}

sha512sums="f40a479196e95cd1c01962230cd3e61f424474ceb454c3d7a31d59b636a0f17138023ae2822bb1666765f15618e3fa7e4fa48786c5530eb975f637b6abf6418f  xbps-0.53.tar.gz
5ae4fa6c5fc8d115b01d74c85121e13933b17a09404d53923a316ce7cc30325227019db33a2efe891ed2be5f61600e3003c37f07c24639ef32786d5b8d4d9c2b  0f338597015271ee504100c32fd2c4926efdb423.patch
a761edd8fd358b500337fcef79f6163ef642fc387f97d952fec0838baa786d585f21e34cd066cba1918f474bccd7decbad2587b91f125b75e308b2dfe8f4721a  disable-Werror.patch
c61d64f618ee21bdf120512ada3d67babeded06830384b800754e586fd66d16772984d6fe325e4674098a1e07caf737e8293848008d068591656808f267fafcb  openssl-1.1.patch"