blob: 560435f7c52fdf78559058122bfa4c57c1204e15 (
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
40
41
42
43
44
|
# Maintainer: Marek Küthe <m.k@mk16.de>
_pkgname=libtins
pkgname=libtins-git
pkgver=v4.0.r121.g00619e0
pkgrel=1
pkgdesc="High-level, multiplatform C++ network packet sniffing and crafting library"
arch=('x86_64')
url="https://libtins.github.io/"
license=('BSD-2-Clause')
optdepends=('boost: TCP ACK tracker feature')
depends=('openssl' 'libpcap')
makedepends=('git' 'cmake')
source=(
'git+https://github.com/mfontanini/libtins.git'
'git+https://github.com/google/googletest.git'
)
md5sums=('SKIP' 'SKIP')
pkgver() {
cd "$_pkgname"
git describe --long --always | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
cd "$_pkgname"
git submodule init
git config submodule.googletest.url "$srcdir/googletest"
git -c protocol.file.allow=always submodule update
}
build() {
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DLIBTINS_ENABLE_CXX11=1 -B build -S "$_pkgname"
cmake --build build
}
check() {
cmake --build build --target tests
ctest --test-dir build --output-on-failure
}
package() {
DESTDIR="$pkgdir" cmake --install build
}
|