aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ettercap/APKBUILD
blob: 7f029c97fa90a1426c47d871a179cad5483f0dea (plain) (blame)
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
40
41
42
43
44
# Contributor: Karim Kanso <kaz.kanso@gmail.com>
# Maintainer: Karim Kanso <kaz.kanso@gmail.com>
pkgname=ettercap
pkgver=0.8.3
pkgrel=1
pkgdesc="Multipurpose sniffer/interceptor/logger for switched LAN"
url="https://www.ettercap-project.org/"
arch="all"
license="GPL-2.0-or-later"
makedepends="cmake make gcc musl-dev ncurses-dev curl-dev libpcap-dev
	libnet-dev pcre-dev flex bison linux-headers geoip-dev
	check-dev"
subpackages="$pkgname-doc lib$pkgname:libs"
source="https://github.com/Ettercap/ettercap/releases/download/v$pkgver/ettercap-$pkgver.tar.gz"

build() {
	mkdir build
	cd build
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_C_FLAGS="$CFLAGS" \
		${CMAKE_CROSSOPTS} \
		-DENABLE_GTK=OFF \
		-DINSTALL_DESKTOP=OFF \
		-DBUNDLED_LIBS=OFF \
		-DENABLE_TESTS=ON \
		..
	make
}

check() {
	make -C build test
}

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

sha512sums="d7058c1c633647bb5ae8575826c0c03e2adcc079e79b2cb188b2ab99cd7980ca439170571b8f80a98cc3327ce2cae9ad906391c1d79cfd763bacb3e6abf61b27  ettercap-0.8.3.tar.gz"