aboutsummaryrefslogtreecommitdiffstats
path: root/community/xbps/APKBUILD
blob: 44852997cca7c771d064c03b00ad0185841a6f56 (plain) (blame)
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
# Contributor: André Klitzing <aklitzing@gmail.com>
# Maintainer: André Klitzing <aklitzing@gmail.com>
pkgname=xbps
pkgver=0.52
pkgrel=0
pkgdesc="The X Binary Package System"
arch="all"
url="https://github.com/voidlinux/xbps"
license="BSD"
depends="ca-certificates"
makedepends="zlib-dev libarchive-dev libressl-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/voidlinux/$pkgname/archive/$pkgver.tar.gz
	disable-Werror.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="99a86abac4e8c3a7e4d6bb72c78a1c1b72592022ab0f90f794227d8fa6194a04e0411fcedc4fffb6809dcf146aa6e7f9b12e3a9854e024458f1b9c4573b7379d  xbps-0.52.tar.gz
a761edd8fd358b500337fcef79f6163ef642fc387f97d952fec0838baa786d585f21e34cd066cba1918f474bccd7decbad2587b91f125b75e308b2dfe8f4721a  disable-Werror.patch"