summaryrefslogtreecommitdiff
path: root/extra/libteam/PKGBUILD
blob: fc4aedfa0fc400481378d27acc583b0c970eaecf (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
# $Id: PKGBUILD 216517 2014-07-04 21:12:04Z heftig $
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=libteam
pkgver=1.11
pkgrel=1
pkgdesc="Library for controlling team network device"
arch=(i686 x86_64)
url="http://libteam.org/"
license=(LGPL2.1)
depends=(libnl libdaemon jansson libdbus bash)
makedepends=(python python2 swig)
source=($url/files/$pkgname-$pkgver.tar.gz)
sha256sums=('b89e81258f8a8f4abd718ec1c91f85cb66d4d29e4d50095a3d2a4ffd8ce4bf7a')

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
    --disable-static --libexecdir=/usr/lib
  make

  cp -aT binding/python binding/python2

  cd binding/python
  python  ./setup.py build
  cd ../python2
  python2 ./setup.py build
}

check() {
  cd $pkgname-$pkgver
  make check
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install

  install -Dm644 teamd/redhat/systemd/teamd@.service \
    "$pkgdir/usr/lib/systemd/system/teamd@.service"
  install -Dm644 teamd/dbus/teamd.conf \
    "$pkgdir/etc/dbus-1/system.d/teamd.conf"

  cd binding/python
  python  ./setup.py install --root "$pkgdir" -O1
  cd ../python2
  python2 ./setup.py install --root "$pkgdir" -O1
}