* add mtr

This commit is contained in:
Alexander Baldeck 2019-08-07 10:29:10 +00:00
parent 03eb91a422
commit 617d44e5e7
2 changed files with 70 additions and 0 deletions

61
mtr/PKGBUILD Normal file
View File

@ -0,0 +1,61 @@
# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Ionut Biru <ibiru@archlinux.org>
# Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
pkgbase=mtr
pkgname=('mtr' 'mtr-gtk')
pkgver=0.93
pkgrel=2
pkgdesc='Combines the functionality of traceroute and ping into one tool'
url='https://www.bitwizard.nl/mtr/'
arch=(x86_64 powerpc64le)
license=('GPL2')
makedepends=('ncurses' 'gtk2' 'libcap')
install=mtr.install
source=(https://github.com/traviscross/mtr/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz)
sha512sums=('865c394d8dfa234c472832dc205ddc9ec3cf0552475f565782fd4f4e878251c03f1473e2d28d6799e59da4fcb33c5355049f1e6f02e8610c6bbf681ffb78f53e')
prepare() {
(cd ${pkgbase}-${pkgver}
echo "${pkgver}" > .tarball-version
autoreconf -fiv
)
cp -ra ${pkgbase}-${pkgver}{,-cli}
}
build() {
(cd ${pkgbase}-${pkgver}-cli
./configure \
--prefix=/usr \
--without-gtk \
--sbindir=/usr/bin
make
)
(cd ${pkgbase}-${pkgver}
./configure \
--prefix=/usr \
--sbindir=/usr/bin
make
)
}
package_mtr() {
pkgdesc='Combines the functionality of traceroute and ping into one tool (CLI version)'
depends=('ncurses' 'libcap')
optdepends=('bash-completion: bash completion support')
cd ${pkgbase}-${pkgver}-cli
make DESTDIR="${pkgdir}" install
}
package_mtr-gtk() {
pkgdesc='Combines the functionality of traceroute and ping into one tool (GTK version)'
depends=('ncurses' 'libcap' 'gtk2')
optdepends=('bash-completion: bash completion support')
conflicts=('mtr')
provides=("mtr=${pkgver}")
cd ${pkgbase}-${pkgver}
make DESTDIR="${pkgdir}" install
}
# vim: ts=2 sw=2 et:

9
mtr/mtr.install Normal file
View File

@ -0,0 +1,9 @@
post_install() {
setcap cap_net_bind_service,cap_net_raw+ep usr/bin/mtr-packet
}
post_upgrade() {
post_install
}
# vim: ts=2 sw=2 et: