aboutsummaryrefslogtreecommitdiffstats
path: root/community/libteam/APKBUILD
blob: d172f642fcf27b209dce0eeba0fc0e2827cf2482 (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
61
62
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=libteam
pkgver=1.27
pkgrel=0
pkgdesc="Library for controlling team network device"
url="http://libteam.org"
arch="all"
license="LGPL-2.1"
makedepends="autoconf automake libtool libnl3-dev libdaemon-dev jansson-dev
	dbus-dev linux-headers bsd-compat-headers doxygen swig
	python2-dev python3-dev"
subpackages="$pkgname-dev $pkgname-doc py-$pkgname:py"
source="$pkgname-$pkgver.tar.gz::https://github.com/jpirko/$pkgname/archive/v$pkgver.tar.gz
	fix-fd_set.patch
	memcpy-memset-implicit-declaration.patch
	fix-redefinition-struct-ethhdr.patch
	"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	./autogen.sh
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--mandir=/usr/share/man \
		|| return 1
	make || return 1
}

py() {
	pkgdesc="Python 2/3 Bindings for libteam"

	cd "$builddir"

	mkdir -p "$subpkgdir"
	cp -ar binding/python binding/python3 || return 1

	cd binding/python
	python2 ./setup.py build || return 1

	cd ../python3
	python3 ./setup.py build || return 1

	cd ../python
	python2 ./setup.py install --root "$subpkgdir" -O1 || return 1

	cd ../python3
	python3 ./setup.py install --root "$subpkgdir" -O1 || return 1
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install || return 1
}

sha512sums="f1c8ca6996aaab73d638ef6ade3fbf4c9f50080eea24d684d594a1e49cedd6fe0920e91a12709e583409dade00e2dfb53be59447be95c397441be0852d7e1ba0  libteam-1.27.tar.gz
83f8dd77cfed0f815bc0cb2aa4af25883a02567dbb35b59016d7f3a30f162e63155996d21216424f0ea4efa8e92f8f9526a018a892533c3c7dd7c7ba12b46a44  fix-fd_set.patch
1279c164960b6215e9bb9f3ee161ef9ac6a38b8066d4a1031996b8067031b9b19404681ebecf3492a26b1215ec2eaaddecae3370ec25e2593dc3ca7dc5f8ead7  memcpy-memset-implicit-declaration.patch
db2f374018a8b60c099e5b41abf5a9d20912bddc0436788b246815459c97498fb47d237376f87a623438f2f48d486d91d65fe5b49aeeabc83cbd41bdb66d7bfc  fix-redefinition-struct-ethhdr.patch"