community/netperf to 2.7.0-5

This commit is contained in:
Kevin Mihelich 2019-10-18 18:43:07 +00:00
parent 6bd56f8f51
commit d58996e746
3 changed files with 28 additions and 13 deletions

View file

@ -7,28 +7,30 @@
pkgname=netperf
pkgver=2.7.0
pkgrel=4
pkgrel=5
pkgdesc='Benchmarking tool for many different types of networking'
url='https://github.com/HewlettPackard/netperf/'
license=('custom')
arch=('x86_64')
depends=('glibc' 'lksctp-tools')
install=netperf.install
source=("https://github.com/HewlettPackard/netperf/archive/$pkgname-$pkgver.tar.gz"
"$pkgname.service"
'netserver.service'
'001-fix-inlining.patch')
md5sums=('e0d45b5bca1eee2aef0155de82366202'
'7bce5056b2a24d76fcc0c20e4b527416'
'0160c47c86ff1fca8df64cfb4cd4d9f2')
sha224sums=('6ab49c94d6231d4848bc43c8d56ad4a2611862f800a61009f3b2f2fe'
'c5c48a480d62e82d1e65cc3ef8472864bf12d2cc527d6a9c12dca613'
'7a30925a46ab5e40ccc2b966a5d7e57a15967b9116c8773cd75030f5')
prepare() {
cd netperf-netperf-$pkgver
# apply patch from the source array (should be a pacman feature)
local filename
for filename in "${source[@]}"; do
if [[ "$filename" =~ \.patch$ ]]; then
msg2 "Applying patch ${filename##*/}"
patch -p1 -N -i "$srcdir/${filename##*/}"
fi
local src
for src in "${source[@]}"; do
src="${src%%::*}"
src="${src##*/}"
[[ $src = *.patch ]] || continue
msg2 "Applying patch $src..."
patch -Np1 < "../$src"
done
:
}
@ -50,8 +52,7 @@ package() {
# license
install -D -m 644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
# systemd
install -D -m 644 ../$pkgname.service \
"$pkgdir/usr/lib/systemd/system/$pkgname.service"
install -D -m 644 {..,"$pkgdir"/usr/lib/systemd/system}/netserver.service
}
# vim:set ts=2 sw=2 et:

View file

@ -0,0 +1,14 @@
#/bin/bash
# arg 1: the new package version
# arg 2: the old package version
post_upgrade() {
# change
if (( $(vercmp $2 2.7.0-5) < 0 )); then
echo '==> netperf.service renamed to netserver.service'
echo '==> You have to enable the new unit manually'
fi
:
}
# vim:set ts=2 sw=2 ft=sh et: