summaryrefslogtreecommitdiffstats
path: root/main/py-configshell/APKBUILD
blob: 299357e2eed5ba0e08fce07aa6f770d9d00fc07b (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
51
52
53
54
55
56
57
58
59
60
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=py-configshell
_realname=configshell
pkgver=1.1_p4
_ver=${pkgver/_rc/rc}
_ver=${_ver/_p/.fb}
pkgrel=2
pkgdesc="Python library that provides a framework for building simple but nice CLI-based applications"
url="https://github.com/agrover/configshell-fb"
arch="noarch"
license="AGPLv3"
depends="python"
depends_dev="python-dev py-simpleparse py-urwid"
makedepends="$depends_dev"
install=""
subpackages=
source="http://dev.alpinelinux.org/archive/configshell/$_realname-$_ver.tar.gz"

_giturl="https://github.com/agrover/configshell-fb"
_gittag=v$_ver

_builddir="$srcdir"/$_realname

snapshot() {
	mkdir -p "$srcdir"
	cd "${SRCDEST:-$srcdir}"
	if ! [ -d $_realname-fb.git ]; then
		git clone --bare  $_giturl || return 1
		cd $_realname-fb.git
	else
		cd $_realname-fb.git
		git fetch || return 1
	fi
	
	git archive --prefix=$_realname/ -o "$SRCDEST"/$_realname-$_ver.tar.gz $_gittag
	scp "$SRCDEST"/$_realname-$_ver.tar.gz dev.alpinelinux.org:/archive/$_realname/
}


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
}

build() {
	cd "$_builddir"
	python setup.py build
}

package() {
	cd "$_builddir"
	python setup.py install --skip-build --root="$pkgdir"
}

md5sums="69abc1134f16a14d481518a5378cf1b1  configshell-1.1.fb4.tar.gz"