# Contributor: Alan Lacerda # Maintainer: Alan Lacerda pkgname=setup-box pkgver=1.0 pkgrel=0 pkgdesc="A tool to setup a variety of Alpine Linux Environments" url="http://git.alpinelinux.org/cgit/alacerda/setup-box/" arch="noarch" license="MIT" depends="jq" depends_dev="" makedepends="$depends_dev" install="" subpackages="$pkgname-doc" source="http://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="8fef649c306e1ff5aef4ec842fcc77f8 setup-box-1.0.tar.bz2" sha256sums="ee7c14e355294c989248add189d806c4386b1468676c2467d3580267ba4d0744 setup-box-1.0.tar.bz2" sha512sums="b1370e55f93b9993805302ceab2ee319bc00d87410236f0779c5d55f3ee6cefd15a7a58b7e23fdbc5e280ed848a4a967781a6df273c74b63ae53ee6d0d26ec48 setup-box-1.0.tar.bz2"