summaryrefslogtreecommitdiffstats
path: root/testing/awake/APKBUILD
blob: 2456dcc201b1a31c3fc9d2763de41e4105aa3cfd (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
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=awake
_pkgname=awake
pkgver=1.0
pkgrel=0
pkgdesc="A command and library to 'wake on lan' a remote host"
url="https://github.com/cyraxjoe/awake"
arch="noarch"
license="GPL3"
depends="python"
depends_dev=""
makedepends="python-dev"
install=""
subpackages="$pkgname-doc py-$pkgname:py"
source="$_pkgname-$pkgver.tar.gz::https://github.com/cyraxjoe/awake/archive/v$pkgver.tar.gz"

_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
}

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

package() {
	cd "$_builddir"
	python setup.py install --prefix=/usr --root="$pkgdir" || return 1
}

py() {
	cd "$_builddir"
	pkgdesc="$pkgname python bindings"
	install -d "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/
}

doc() {
	# Doc files
	_docs="CHANGES LICENSE README"
	for _doc in $_docs; do
		install -Dm644 "$srcdir"/$_pkgname-$pkgver/$_doc \
			"$subpkgdir"/usr/share/doc/$pkgname/$_doc || return 1
	done
}

md5sums="3ecbe84d477e280e020f69c508f76ef6  awake-1.0.tar.gz"
sha256sums="81369a21dd32c44284ee68b1fc283d0edd0da483f3e1655877ec1db2f1c22df5  awake-1.0.tar.gz"
sha512sums="65d7c7344b1478431be59e4cebfd3b043d9034bb0bbc3562979b79064539669f496ef163ae9e71b47dac8289d3b5e6488f994135ee49e305c3ba9c95ea59c42f  awake-1.0.tar.gz"