aboutsummaryrefslogtreecommitdiffstats
path: root/community/gns3-server/APKBUILD
blob: 7b5a05e028ab86c78a308584418f554c10a13f0f (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
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=gns3-server
pkgver=2.2.0
pkgrel=2
pkgdesc="GNS3 network simulator. Server package."
url="https://github.com/GNS3/gns3-server"
arch="all"
license="GPL-3.0-or-later"
depends="busybox dynamips python3 
	py3-aiohttp-gns3 py3-aiohttp-cors-gns3 
	py3-async-timeout-gns3 py3-jsonschema-gns3
	py3-pytest py3-raven
	py3-psutil py3-jinja2
	py3-async_generator py3-aiofiles
	py3-distro"
makedepends="busybox-static py-setuptools python3-dev linux-headers"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/GNS3/$pkgname/archive/v$pkgver.tar.gz"

build() {
	# 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() {
	python3 setup.py check
}

package() {
	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="c3666b69b37eaf6419ff497f05e0c2895a995c59ece8ae4683a006898ddbdbf8055eb2d00b749b5e18082ab8b32a7d715f94a26acae8570675584220787d126b  gns3-server-2.2.0.tar.gz"