aboutsummaryrefslogtreecommitdiffstats
path: root/main/setup-box/APKBUILD
blob: 1f079110bb409864fc5be6f82e68051c50d18395 (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
# 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
}

md5sums="4fde92c55bada419c2fa91d1558d8665  setup-box-1.0.1.tar.bz2"
sha256sums="14a6d966f31a7e9509d21af01e2e37f38bdb14af5ec568a4e03446f8458144e5  setup-box-1.0.1.tar.bz2"
sha512sums="22891037b4a0ed8a60103959e21b2d99e4bdf0a518419141623373b6a7a1c0160c8bd761ca81637bef069078849d06952817eaef83fd5c426ae9693329c29e48  setup-box-1.0.1.tar.bz2"