aboutsummaryrefslogtreecommitdiffstats
path: root/community/gns3-server/APKBUILD
blob: ad94e6369afd14c2c98e0a7a41b02ae557c28623 (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
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=gns3-server
pkgver=1.5.4
pkgrel=0
pkgdesc="GNS3 network simulator. Server package."
url="https://github.com/GNS3/gns3-server"
arch="all"
license="GPL3"
depends="busybox dynamips python3 py3-psutil py3-jinja2 py3-aiohttp py3-pytest
	py3-netifaces py3-ws4py py3-zipstream py3-raven py3-jsonschema"
makedepends="$depends_dev py-setuptools python3-dev linux-headers py3-pytest"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/GNS3/$pkgname/archive/v$pkgver.tar.gz"

builddir="$srcdir"/$pkgname-$pkgver

check() {
	cd "$builddir"
	python3 setup.py check
}

prepare() {
	cd "$builddir"
	# Current upstream contains arch dependent (x86) binaries in the
	# source package. Replacing it with the binary from the build server.
	# https://github.com/GNS3/gns3-server/issues/970
	cp /bin/busybox gns3server/modules/docker/resources/bin/busybox
}

build() {
	cd "$builddir"
	python3 setup.py build
}

package() {
	cd "$builddir"
	python3 setup.py install --prefix=/usr --root="$pkgdir"
	mkdir -p "$pkgdir"/usr/share/doc/$pkgname
	cat >"$pkgdir"/usr/share/doc/$pkgname/README.alpine <<EOF
gns3-server has several optional packages that must be installed manually for additional functionality:

  apk add qemu
  apk add wiresark
  apk add ubridge
  apk add cpulimit
  apk add iouyap 
  apk add vpcs

EOF

}

sha512sums="43c737b45c6a5f8591e190ab788a716e74732ea3526e5868d411b81528520c825880f5179c6978e4939707fa7e037fbbcd857384f364acd1f6b0a4952e8e30c8  gns3-server-1.5.4.tar.gz"