void-packages/srcpkgs/tracebox/template

38 lines
1.5 KiB
Bash

# Template file for 'tracebox'
pkgname=tracebox
version=0.4.1
revision=1
_click_ver=2.0.1
_crafter_git=25e2d7bbe23692b320dd3c9165c3bce06d6e999d
_crafter_ver=0.3.2git
build_style=gnu-configure
only_for_archs="i686 x86_64"
hostmakedepends="automake pkg-config libtool unzip"
makedepends="libpcap-devel json-c-devel lua52-devel"
short_desc="A middlebox detection tool"
maintainer="Jürgen Buchmüller <pullmoll@t-online.de>"
license="GPL-2"
nocross=yes
homepage="http://www.tracebox.org/"
distfiles="
https://github.com/tracebox/tracebox/archive/v${version}.tar.gz>tracebox-${version}.tar.gz
https://github.com/bhesmans/click/archive/v${_click_ver}.tar.gz>click-${_click_ver}.tar.gz
https://github.com/pellegre/libcrafter/archive/${_crafter_git}.zip>libcrafter-${_crafter_ver}.zip"
checksum="
568cadad69074b7906c87b0020d1e5ec05d201ee8f579ce5ecbd4844c10dc817
4e48591cb385000ee8daedf3cc18d4b00a9c5a142cc001e0780f0c7ebd713764
d1daa2add6892a301054d39175f725e9f7bfb34e154437703c9db269cde23684"
CXXFLAGS="-DHAVE_LUA_PUSHGLOBALTABLE=1"
pre_configure() {
# Do what ./bootstrap.sh would have done but without using git to pull submodules
mkdir -p ${wrksrc}/test/tools ${wrksrc}/noinst/libcrafter
mv -v ../click-${_click_ver} test/tools/click
mv -v ../libcrafter-${_crafter_git}/{.gitignore,README,libcrafter} noinst/libcrafter
rmdir -v ../libcrafter-${_crafter_git}
# Set missing AM_PROG_AR
sed -e "/AC_PROG_CXX/iAM_PROG_AR=${AR}" -i noinst/libcrafter/libcrafter/configure.ac
autoreconf --force --install --verbose
}