PKGBUILDs/extra/netperf/PKGBUILD

60 lines
1.7 KiB
Bash
Raw Normal View History

2015-08-15 20:43:10 +00:00
# Maintainer: Sébastien Luttringer <seblu@archlinux.org>
# Contributor: Kaiting Chen <kaitocracy@gmail.com>
# Contributor: Tilman Blumenbach <tilman (at) ax86 (dot) net>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - remove libsmbios depend
pkgname=netperf
pkgver=2.7.0
2020-07-10 01:21:16 +00:00
pkgrel=6
2015-08-15 20:43:10 +00:00
pkgdesc='Benchmarking tool for many different types of networking'
2017-07-08 16:12:55 +00:00
url='https://github.com/HewlettPackard/netperf/'
2015-08-15 20:43:10 +00:00
license=('custom')
2018-11-13 19:42:10 +00:00
arch=('x86_64')
2015-08-15 20:43:10 +00:00
depends=('glibc' 'lksctp-tools')
2019-10-18 18:43:07 +00:00
install=netperf.install
2017-07-08 16:12:55 +00:00
source=("https://github.com/HewlettPackard/netperf/archive/$pkgname-$pkgver.tar.gz"
2019-10-18 18:43:07 +00:00
'netserver.service'
2015-08-15 20:43:10 +00:00
'001-fix-inlining.patch')
2019-10-18 18:43:07 +00:00
sha224sums=('6ab49c94d6231d4848bc43c8d56ad4a2611862f800a61009f3b2f2fe'
'c5c48a480d62e82d1e65cc3ef8472864bf12d2cc527d6a9c12dca613'
'7a30925a46ab5e40ccc2b966a5d7e57a15967b9116c8773cd75030f5')
2015-08-15 20:43:10 +00:00
prepare() {
2017-07-08 16:12:55 +00:00
cd netperf-netperf-$pkgver
2016-05-14 15:46:02 +00:00
# apply patch from the source array (should be a pacman feature)
2019-10-18 18:43:07 +00:00
local src
for src in "${source[@]}"; do
src="${src%%::*}"
src="${src##*/}"
[[ $src = *.patch ]] || continue
msg2 "Applying patch $src..."
patch -Np1 < "../$src"
2016-05-14 15:46:02 +00:00
done
:
2015-08-15 20:43:10 +00:00
}
build() {
2017-07-08 16:12:55 +00:00
cd netperf-netperf-$pkgver
2020-07-10 01:21:16 +00:00
CFLAGS+=' -fcommon' # https://wiki.gentoo.org/wiki/Gcc_10_porting_notes/fno_common
2015-08-15 20:43:10 +00:00
./configure \
--prefix=/usr \
--enable-demo \
--enable-unixdomain \
--enable-dccp \
--enable-sctp
make
}
package() {
2017-07-08 16:12:55 +00:00
cd netperf-netperf-$pkgver
2015-08-15 20:43:10 +00:00
make DESTDIR="$pkgdir" install
# license
install -D -m 644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
# systemd
2019-10-18 18:43:07 +00:00
install -D -m 644 {..,"$pkgdir"/usr/lib/systemd/system}/netserver.service
2015-08-15 20:43:10 +00:00
}
# vim:set ts=2 sw=2 et: