4f75cf25fd
```sh git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" | while read template; do for p in ${template%/template}/patches/*; do sed -i ' \,^[+-][+-][+-] /dev/null,b /^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b s,^[*][*][*] ,&a/, /^--- /{ s,\(^--- \)\(./\)*,\1a/, s,[.-][Oo][Rr][Ii][Gg]\([ /]\),\1, s/[.-][Oo][Rr][Ii][Gg]$// s/[.]patched[.]\([^.]\)/.\1/ h } /^+++ -/{ g s/^--- a/+++ b/ b } s,\(^+++ \)\(./\)*,\1b/, ' "$p" done sed -i '/^patch_args=/d' $template done ```
30 lines
995 B
Bash
30 lines
995 B
Bash
# Template file for 'traceroute'
|
|
pkgname=traceroute
|
|
version=2.1.0
|
|
revision=3
|
|
short_desc="Traces the route taken by packets over an IPv4/IPv6 network"
|
|
maintainer="Enno Boland <gottox@voidlinux.org>"
|
|
license="GPL-2"
|
|
homepage="http://traceroute.sourceforge.net"
|
|
distfiles="$SOURCEFORGE_SITE/$pkgname/$pkgname-$version.tar.gz"
|
|
checksum=3669d22a34d3f38ed50caba18cd525ba55c5c00d5465f2d20d7472e5d81603b6
|
|
|
|
alternatives="
|
|
traceroute:traceroute:/usr/bin/linux-traceroute
|
|
traceroute:traceroute.8:/usr/share/man/man8/linux-traceroute.8
|
|
"
|
|
|
|
do_build() {
|
|
if [ "$CROSS_BUILD" ]; then
|
|
make LDFLAGS="-L${wrksrc}/libsupp $LDFLAGS" CFLAGS="$CFLAGS $CPPFLAGS" CROSS=${XBPS_CROSS_TRIPLET}- ${makejobs}
|
|
else
|
|
make CFLAGS="$CFLAGS $CPPFLAGS" LDFLAGS="$LDFLAGS" ${makejobs}
|
|
fi
|
|
}
|
|
do_install() {
|
|
vbin traceroute/traceroute linux-traceroute
|
|
vman traceroute/traceroute.8 linux-traceroute.8
|
|
|
|
ln -s linux-traceroute $DESTDIR/usr/bin/traceroute6
|
|
ln -s linux-traceroute.8 $DESTDIR/usr/share/man/man8/traceroute6.8
|
|
}
|