aboutsummaryrefslogtreecommitdiffstats
path: root/community/gns3-server/APKBUILD
blob: 7de1b648cf0f8a7e86887cf0643fae74c3b58fab (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
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=gns3-server
pkgver=2.1.0
pkgrel=3
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-aiohttp-cors py3-pytest py3-netifaces py3-ws4py py3-zipstream
	py3-raven py3-jsonschema py3-yarl py3-multidict py3-prompt_toolkit"
makedepends="busybox-static 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
	dropped-requirements.patch
	aiohttp-support.patch"
builddir="$srcdir"/$pkgname-$pkgver

build() {
	cd "$builddir"
	# Upstream includes busybox binary for x86_64. We want to replace it by
	# $CARCH binary
	if [ "$CARCH" != "x86_64" ] ; then
		busybox_bin=$(find . -name busybox -type f)
		cp /bin/busybox.static $busybox_bin
	fi
	python3 setup.py build
}

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

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="fe85cee40308912c1b530e74301302cdbc44c60092f245cf87da4ee1355dc577c69d6f2c4f6c2018208c425e1b7e51671397494b73c810b6cde8a35c07a0bff3  gns3-server-2.1.0.tar.gz
2a9339bc681cd4c670e622ec331af77d41d6e5311f694ed7d39bdad70e6c3fe1ac7e387393b4765aafb3d7388656e9ddf9069640e4de54d59632b5d2a9a94994  dropped-requirements.patch
761956ae0870bd734c6bc30b7297f624d33b37082a26b2227395606fdd373b7946f132f8fcb2fe2d6dddeb5ad91f6c7506905ff63faea6e10b823ece203b67a1  aiohttp-support.patch"