void-packages/srcpkgs/mtr/template
2020-09-28 21:09:52 -04:00

52 lines
1.2 KiB
Bash

# Template file for 'mtr'
pkgname=mtr
version=0.94
revision=1
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.0-only"
homepage="http://www.bitwizard.nl/mtr/"
distfiles="https://github.com/traviscross/mtr/archive/v${version}.tar.gz"
checksum=ea036fdd45da488c241603f6ea59a06bbcfe6c26177ebd34fff54336a44494b8
pre_configure() {
echo $version >.tarball-version
./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/*
}
}