aboutsummaryrefslogtreecommitdiffstats
path: root/main/setup-box/APKBUILD
blob: 678a14984fd2c4b372f5b7b31a7286530aeb87bc (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
# Contributor: Alan Lacerda <alacerda@alpinelinux.org>
# Maintainer: Alan Lacerda <alacerda@alpinelinux.org>
pkgname=setup-box
pkgver=1.0.1
pkgrel=0
pkgdesc="A tool to setup a variety of Alpine Linux Environments"
url="https://git.alpinelinux.org/cgit/alacerda/setup-box/"
arch="noarch"
license="MIT"
depends="jq"
depends_dev=""
makedepends="$depends_dev"
install=""
subpackages="$pkgname-doc"
source="https://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.bz2"

_builddir="$srcdir/$pkgname-$pkgver"
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

doc () {
	mkdir -p "$subpkgdir"/usr/share/man/man1 || return 1
	mv "$_builddir"/usr/share/man/setup-box.1.gz "$subpkgdir"/usr/share/man/man1/ || return 1
}

build() {
	cd "$_builddir"
}

package() {
	cd "$_builddir"
	mkdir -p "$pkgdir"/etc/setup-box/json
	mkdir "$pkgdir"/sbin
	install -m 755 setup-box "$pkgdir"/sbin/$pkgname
	cp json/* "$pkgdir"/etc/setup-box/json
	sed -e 's:@CONFIG_DIR@:/etc/setup-box:g' -i "$pkgdir"/sbin/$pkgname
	sed -e 's:@JSON_DIR@:/etc/setup-box/json:g' -i "$pkgdir"/sbin/$pkgname
	sed -e 's:@VERSION@:v$pkgver:g' -i "$pkgdir"/sbin/$pkgname
}

sha512sums="22891037b4a0ed8a60103959e21b2d99e4bdf0a518419141623373b6a7a1c0160c8bd761ca81637bef069078849d06952817eaef83fd5c426ae9693329c29e48  setup-box-1.0.1.tar.bz2"