aboutsummaryrefslogtreecommitdiffstats
path: root/testing/libteam/APKBUILD
blob: 81d61873424cc35cc3e3873355181932e9d5f5ec (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
63
64
65
66
67
68
69
70
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=libteam
pkgver=1.22
pkgrel=0
pkgdesc="Library for controlling team network device"
url="http://libteam.org"
arch="all"
license="LGPL2.1"
depends_dev=""
makedepends="$depends_dev autoconf automake libtool libnl3-dev libdaemon-dev jansson-dev dbus-dev
		linux-headers bsd-compat-headers doxygen swig python-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
	"

_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"
	./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"
	mkdir -p "$subpkgdir"
	cd "$_builddir"
        cp -ar binding/python binding/python3 || return 1
        cd binding/python
        python  ./setup.py build || return 1
        cd ../python3
        python3 ./setup.py build || return 1
	cd binding/python
        python  ./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
}

md5sums="1714c3ca3f0b753384719e7aa8bf8464  libteam-1.22.tar.gz
ea78f0a9b84eb87747ddfbcfa582a122  fix-fd_set.patch
fb6662bced494fd24a107e3f7f7dc5e8  memcpy-memset-implicit-declaration.patch"
sha256sums="a46b62fe3264fa13153eb08159f41602a76f4026ce84de520cbc086505915943  libteam-1.22.tar.gz
43bff56cfd3d293ecae58b3a77e55e7a740ddcf188d6516097fbd93b13a82ac8  fix-fd_set.patch
a2982cbd9bce4367d1a6e20bfedcc24cab452538e2e0ec1af0d8a3515cf21077  memcpy-memset-implicit-declaration.patch"
sha512sums="27461d94f71078da6cbdc17c7af350ceaf6ff06626fd25f1d55bc14ae57b39ed10d72852dabcf77581076e3d98dbf6dad1f07118573dfe0397013932ff516550  libteam-1.22.tar.gz
83f8dd77cfed0f815bc0cb2aa4af25883a02567dbb35b59016d7f3a30f162e63155996d21216424f0ea4efa8e92f8f9526a018a892533c3c7dd7c7ba12b46a44  fix-fd_set.patch
1279c164960b6215e9bb9f3ee161ef9ac6a38b8066d4a1031996b8067031b9b19404681ebecf3492a26b1215ec2eaaddecae3370ec25e2593dc3ca7dc5f8ead7  memcpy-memset-implicit-declaration.patch"