summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b6f6f5cfdd986138c4dd92dfc5722949aa1fea9e (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
# Maintainer: Patrick Northon <northon_patrick3@yahoo.ca>

_pkgname='pat-aur'
pkgbase=${_pkgname}-git
pkgname=(${_pkgname}-client-git ${_pkgname}-host-git)
pkgver=r270.994b87e
pkgrel=1
pkgdesc='AUR helper and tool to build Arch Linux packages in clean containers.'
url="https://gitlab.com/patlefort/${_pkgname}"
license=('GPL3')
depends=('elvish')
makedepends=('git' 'libxslt' 'docbook-xsl' 'rsync')
arch=('any')
source=("git+${url}.git")
sha256sums=('SKIP')

_srcdir="${_pkgname}"

pkgver() {
	cd "${_srcdir}"
	( set -o pipefail
		git describe --tags --abbrev=7 --long 2>/dev/null | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' ||
		printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
	)
}

package_pat-aur-client-git() {
	depends+=('pacutils')
	provides=(${_pkgname}-client)
	conflicts=(${_pkgname}-client)
	pkgdesc+=' (client only)'

	cd "${_srcdir}"
	DESTDIR="${pkgdir}" ./install system
}

package_pat-aur-host-git() {
	depends+=('pat-aur-client-git' 'parallel' 'dumb-init' 'devtools' 'pacutils' 'aurutils' 'bubblewrap-overlayfs' 'ninja-jobserver' 'git')
	optdepends+=(
		'seccomp-filtered-run: seccomp filters.'
		'sshfs: remote connection.'
		'socat: remote connection.'
		'systemd: cgroups support.'
	)
	provides=(${_pkgname}-host)
	conflicts=(${_pkgname}-host)
	pkgdesc+=' (host machine)'
	install="${pkgbase}.install"
}