aboutsummaryrefslogtreecommitdiffstats
path: root/community/dynamips/APKBUILD
blob: 5c8f62bef49dc17ef5f89bf5036ac86456e996cf (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
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=dynamips
pkgver=0.2.18
pkgrel=0
pkgdesc="Cisco router emulator"
url="https://github.com/GNS3/dynamips"
arch="all"
license="GPL-2.0"
makedepends="cmake libpcap-dev libelf-dev linux-headers paxmark libnsl-dev"
subpackages="$pkgname-doc"
source="${pkgname}-${pkgver}.tar.gz::https://github.com/GNS3/${pkgname}/archive/v${pkgver}.tar.gz
	s390x-support.patch"
builddir="$srcdir"/$pkgname-$pkgver

prepare() {
	cd "$builddir"
	sed -e "s:^set ( DYNAMIPS_FLAGS:#&:" -i cmake/dependencies.cmake
	default_prepare
}

build() {
	cd "$builddir"
	if test $CARCH == x86_64; then
		export DYNAMIPS_ARCH=amd64
	fi
	export CFLAGS="$CFLAGS -Wno-enum-compare"
	export CXXFLAGS="$CXXFLAGS -Wno-enum-compare"
	cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr
}

package() {
	cd "$builddir"
	make DESTDIR=${pkgdir} install
	paxmark -m "$pkgdir"/usr/bin/dynamips
}

sha512sums="d66e32d72ecc9ebff5232377ac9aa5b966ceb08884cc7f8dc4a8cf3f56305e7cefd677624ba66278f6603a3b275c384bd0ff3905932461b1f8056106cd272a4c  dynamips-0.2.18.tar.gz
151f9c7d53c0edd9d300b3e84ce50d500018a533d6d131609ac0c25244db640d65d2322104c126e7c0e311cc0b197c07976f21fa28909a92d48cf31b6208431b  s390x-support.patch"