aboutsummaryrefslogtreecommitdiffstats
path: root/community/dynamips/APKBUILD
blob: f129e46e12bbc154d9127a67f69b0ec7c13d628a (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.20
pkgrel=1
pkgdesc="Cisco router emulator"
url="https://github.com/GNS3/dynamips"
arch="all"
license="GPL-2.0"
makedepends="cmake libpcap-dev elfutils-dev linux-headers paxmark libnsl-dev"
subpackages="$pkgname-doc"
source="${pkgname}-${pkgver}.tar.gz::https://github.com/GNS3/${pkgname}/archive/v${pkgver}.tar.gz
	detect-byte-order.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="d00c9ba42785508f9c0572462914992d8d75b7ad3da02d5f1086e1a06d31cc697f651f94e63adc368f78eab8f4ef1f87e04b9cdf02f6ee34e1776453d8f87241  dynamips-0.2.20.tar.gz
d3beb4ddda4ca571a36f2333609db48126c0f6629adf39a985cedb1741356f415f33c82c56b69802955869c6741655476253c4ea4e8ef1461411cc52e411e429  detect-byte-order.patch"