084520690f
From version 0.88 mtr sends probes from a subprocess "mtr-packet", so that's what needs the privileged capabilities. Also, link with libcap which lets mtr-packet drop its privileges when they're no longer needed.
51 lines
1.2 KiB
Bash
51 lines
1.2 KiB
Bash
# Template file for 'mtr'
|
|
pkgname=mtr
|
|
version=0.92
|
|
revision=2
|
|
build_style="gnu-configure"
|
|
hostmakedepends="automake pkg-config gtk+-devel"
|
|
makedepends="ncurses-devel gtk+-devel libcap-devel"
|
|
depends="libcap-progs"
|
|
short_desc="Combines the functionality of traceroute and ping into one tool"
|
|
maintainer="Steven R <dev@styez.com>"
|
|
license="GPL-2"
|
|
homepage="http://www.bitwizard.nl/mtr/"
|
|
distfiles="https://github.com/traviscross/mtr/archive/v${version}.tar.gz"
|
|
checksum=568a52911a8933496e60c88ac6fea12379469d7943feb9223f4337903e4bc164
|
|
|
|
pre_configure() {
|
|
./bootstrap.sh
|
|
}
|
|
|
|
do_configure() {
|
|
mkdir $wrksrc/build_nox $wrksrc/build_x11
|
|
cd $wrksrc/build_nox
|
|
$wrksrc/configure ${configure_args} --without-gtk
|
|
|
|
cd $wrksrc/build_x11
|
|
$wrksrc/configure ${configure_args}
|
|
}
|
|
|
|
do_build() {
|
|
for p in $wrksrc/build_nox $wrksrc/build_x11; do
|
|
cd $p
|
|
make ${makejobs}
|
|
done
|
|
}
|
|
|
|
do_install() {
|
|
cd $wrksrc/build_nox
|
|
make DESTDIR=$DESTDIR install
|
|
chmod 0755 $DESTDIR/usr/bin/*
|
|
}
|
|
|
|
mtr-x11_package() {
|
|
provides="mtr-${version}_${revision}"
|
|
replaces="mtr>0"
|
|
short_desc+=" - X11 version"
|
|
pkg_install() {
|
|
cd $wrksrc/build_x11
|
|
make DESTDIR=$PKGDESTDIR install
|
|
chmod 0755 $PKGDESTDIR/usr/bin/*
|
|
}
|
|
}
|