f11d6a3488
The symlink is ifconfig.1. It was pointing to net-tools-ifconfig.8 in man1, so it was broken.
60 lines
1.8 KiB
Bash
60 lines
1.8 KiB
Bash
# Template file for 'net-tools'
|
|
pkgname=net-tools
|
|
version=1.60.20150526git
|
|
revision=3
|
|
hostmakedepends="git"
|
|
short_desc="Basic networking tools"
|
|
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
|
homepage="http://sourceforge.net/projects/$pkgname/"
|
|
license="GPL-2"
|
|
|
|
alternatives="
|
|
ifconfig:ifconfig:/usr/bin/${pkgname}-ifconfig
|
|
ifconfig:/usr/share/man/man1/ifconfig.1:/usr/share/man/man8/${pkgname}-ifconfig.8"
|
|
|
|
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
|
|
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
|
|
}
|
|
do_build() {
|
|
replace_interpreter bash configure.sh
|
|
yes "" | make
|
|
}
|
|
do_install() {
|
|
make DESTDIR=${DESTDIR}/usr update
|
|
# Rename ifconfig for alternatives.
|
|
mv ${DESTDIR}/usr/bin/{ifconfig,${pkgname}-ifconfig}
|
|
mv ${DESTDIR}/usr/share/man/man8/{ifconfig,${pkgname}-ifconfig}.8
|
|
# 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*
|
|
}
|