void-packages/srcpkgs/net-tools/template

54 lines
1.5 KiB
Bash
Raw Normal View History

# Template file for 'net-tools'
pkgname=net-tools
2015-06-29 20:01:06 +00:00
version=1.60.20150526git
revision=1
hostmakedepends="git"
short_desc="Basic networking tools"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
2015-06-29 20:01:06 +00:00
homepage="http://sourceforge.net/projects/$pkgname/"
2012-07-09 13:48:24 +00:00
license="GPL-2"
2014-02-21 15:13:55 +00:00
do_fetch() {
git clone git://git.code.sf.net/p/net-tools/code ${pkgname}-${version}
}
pre_build() {
sed -i "s#/sbin#/bin#" Makefile
sed -i "s#/usr##" man/Makefile
2015-06-29 20:01:06 +00:00
case "$XBPS_TARGET_MACHINE" in
*-musl)
# Include file is <linux/ipv6_route.h>
sed -i ${wrksrc}/lib/inet6_gr.c \
-e "s#netinet6/#linux/#"
sed -i ${wrksrc}/lib/inet6_sr.c \
-e "s#netinet6/#linux/#"
# HZ is defined in <asm/param.h>
sed -i ${wrksrc}/lib/inet_sr.c \
-e "/#include <sys\/param.h>/a #include <asm\/param.h>"
sed -i ${wrksrc}/netstat.c \
-e "/#include <sys\/param.h>/a #include <asm\/param.h>"
# Need <termios.h> for tty constants and structure
sed -i ${wrksrc}/slattach.c \
-e "/#include <limits.h>/a #include <termios.h>"
# Disable obsolete non-glibc includes
sed -i ${wrksrc}/mii-tool.c \
-e "s/#ifndef __GLIBC__/#if 0/"
esac
2014-02-21 15:13:55 +00:00
}
2012-07-09 13:48:24 +00:00
do_build() {
replace_interpreter bash configure.sh
2012-07-09 13:48:24 +00:00
yes "" | make
}
2012-07-09 13:48:24 +00:00
do_install() {
2014-02-21 15:13:55 +00:00
make DESTDIR=${DESTDIR}/usr update
# Remove hostname(1), conflicts with coreutils/busybox.
rm ${DESTDIR}/usr/bin/hostname
rm ${DESTDIR}/usr/share/man/man1/hostname.1
# Remove dnsdomainname(1), conflicts with busybox/inetutils.
rm ${DESTDIR}/usr/bin/*domainname
rm ${DESTDIR}/usr/share/man/man1/*domainname*
}