summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 795b7d3a60ec56e5f8ab5ded8526f75ddc35ef42 (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
# Maintainer: Tom Wambold <tom5760@gmail.com>
# Contributor: Antonin D├ęcimo <antonin dot decimo at gmail dot com>
pkgname=core
pkgver=7.5.1
pkgrel=1
pkgdesc="Common Open Research Emulator"
arch=('i686' 'x86_64')
url="https://github.com/coreemu/core/"
license=('BSD')
depends=('ebtables' 'ethtool' 'fabric' 'iproute2' 'libev' 'python'
         'python-grpcio' 'python-invoke' 'python-lxml' 'python-mako'
         'python-netaddr' 'python-pillow' 'python-protobuf' 'python-pyproj'
         'python-yaml')
makedepends=('help2man' 'imagemagick' 'python-dephell' 'python-grpcio-tools'
             'python-setuptools')
optdepends=('openvswitch: Open vSwitch SDN support'
            'tkimg: Thumbnail support in Tcl/Tk GUI')
backup=('etc/core/core.conf')
source=("https://github.com/coreemu/core/archive/release-$pkgver.tar.gz"
        'core-daemon.service')
md5sums=('8a55856c35e10539ec5fb594b64b2cc9'
         '91be51f861a0e166c643a885d1bf1eba')

prepare() {
  cd "$srcdir/core-release-$pkgver/daemon"

  dephell deps convert --from pyproject.toml --to setup.py
}

build() {
  cd "$srcdir/core-release-$pkgver"

  ./bootstrap.sh
  ./configure --prefix=/usr
  make

  cd daemon
  python setup.py build
}

package() {
  cd "$srcdir/core-release-$pkgver"
  make DESTDIR="$pkgdir/" install

  cd daemon
  python setup.py install --root="$pkgdir" --optimize=1 --skip-build

  mkdir -p "$pkgdir/usr/bin"
  cp -r scripts/* "$pkgdir/usr/bin"

  mkdir -p "$pkgdir/usr/share/core"
  cp -r examples "$pkgdir/usr/share/core"

  mkdir -p "$pkgdir/etc/core"
  cp data/core.conf data/logging.conf "$pkgdir/etc/core"

  mkdir -p "$pkgdir/usr/lib/systemd/system"
  cp "$srcdir/core-daemon.service" "$pkgdir/usr/lib/systemd/system"
}

# vim:set ts=2 sw=2 et: