summaryrefslogtreecommitdiff
path: root/community/dynamips/APKBUILD
blob: fd83a83f649113fe496612fce6747c9cd8f5c71a (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.17
pkgrel=0
pkgdesc="Cisco router emulator"
url="https://github.com/GNS3/dynamips"
arch="all"
license="GPL2"
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="4c24e254072f13fc10cfcea5ee169f37353d3a297b9e683cb508a8a8a69759383a030236f48d32f2b252c1d42a9f4962f769eee7f04cb1931fddc44c666a8f14  dynamips-0.2.17.tar.gz
151f9c7d53c0edd9d300b3e84ce50d500018a533d6d131609ac0c25244db640d65d2322104c126e7c0e311cc0b197c07976f21fa28909a92d48cf31b6208431b  s390x-support.patch"