aboutsummaryrefslogtreecommitdiffstats
path: root/community/dynamips/APKBUILD
blob: b86c539165c8e395a3848fe1f7bb9a13c42cc299 (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
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=dynamips
pkgver=0.2.21
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 libnsl-dev"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/GNS3/dynamips/archive/v$pkgver.tar.gz
	detect-byte-order.patch"

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

build() {
	if [ $CARCH == x86_64 ]; then
		export DYNAMIPS_ARCH=amd64
	fi
	export CFLAGS="$CFLAGS -Wno-enum-compare"
	export CXXFLAGS="$CXXFLAGS -Wno-enum-compare"
	cmake -B build . \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX:PATH=/usr
	make -C build
}

package() {
	make -C build DESTDIR="$pkgdir" install
}

sha512sums="c7251963897b65ed5696f47f03be727cea79fe2245850c86fa6b4d8718afa10002b1e39bccefe1c7f2ba86fe6b8f52fe8663ee34f72ca3d9f846522b9b9b4d29  dynamips-0.2.21.tar.gz
d3beb4ddda4ca571a36f2333609db48126c0f6629adf39a985cedb1741356f415f33c82c56b69802955869c6741655476253c4ea4e8ef1461411cc52e411e429  detect-byte-order.patch"