# Maintainer: Stephan Springer # Contributor: Hyacinthe Cartiaux # Contributor: korjjj pkgname=gns3-server pkgver=2.2.47 # TODO: jsonschema>=4.22.0 aiohttp>=3.9.5 Jinja2>=3.1.4 pkgrel=1 pkgdesc='GNS3 network simulator, Server package' arch=('x86_64' 'aarch64') url='https://github.com/GNS3/gns3-server' license=('GPL3') groups=('gns3') depends=( 'busybox' 'python-aiofiles' 'python-aiohttp' 'python-aiohttp-cors' 'python-async-timeout' 'python-distro' 'python-jinja' 'python-jsonschema' 'python-platformdirs' 'python-psutil' 'python-py-cpuinfo' 'python-sentry_sdk' 'python-setuptools' 'python-truststore' ) optdepends=( 'dynamips: Cisco router emulator' 'gns3-gui: graphical user interface for GNS3 server' 'qemu: Used by GNS3 to run Cisco ASA, PIX and IDS' 'libvirt: needed for the NAT cloud' 'vpcs: Simple PC emulation for basic network operations' 'ubridge: Bridge for UDP tunnels, Ethernet, TAP and VMnet interfaces' ) install="$pkgname".install source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz" "$pkgname@.service" "fix_requirements_for_Arch.diff") sha256sums=('6576988fe185433ca7a6b3b6dbbda42d57095c64f6bd77605e02e2420041db5b' 'b43f0ead963a06e613d3303d2c66372b57f46c750b3d6df20eb99c11078de65f' '37c9e6ea3b25ddc28aba3822638c529dfd067a352f57ab7387013e65a35a1e7a') prepare() { cd "$pkgname-$pkgver" # Arch usually has the latest versions. Patch requirements to allow them. patch --strip=2 -i "$srcdir"/fix_requirements_for_Arch.diff } build() { cd "$pkgname-$pkgver" python setup.py build } package() { cd "$pkgname-$pkgver" python setup.py install --root="$pkgdir" --optimize=1 install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" install -Dm644 "$srcdir/$pkgname@.service" "$pkgdir/usr/lib/systemd/system/$pkgname@.service" }