1 # Build recipe for net-tools.
3 # Copyright (c) 2018-2019 Matias Fonzo, <selk@dragora.org>.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
18 version=20181103_0eebece
21 # Define a category for the output of the package name
22 pkgcategory=networking
24 tarname=${program}-${version}.tar.lz
28 http://rsync.dragora.org/current/sources/$tarname
29 http://mirror.cedia.org.ec/dragora/current/sources/$tarname
33 Collection of basic networking programs.
35 A collection of programs that form the base set of the NET-3 networking
36 distribution for the GNU/Linux operating system.
38 This package includes the important tools for controlling the network
39 subsystem of the Linux kernel. This includes arp, netstat, rarp and
40 route. Additionally, this package contains utilities relating to
41 particular network hardware types (plipconfig, slattach, mii-tool)
42 and advanced aspects of IP configuration (iptunnel, ipmaddr).
45 homepage=http://net-tools.sourceforge.net/
48 # Source documentation
49 docs="COPYING README THANKS TODO"
50 docsdir="${docdir}/${program}-${version}"
52 # The build system does not support parallel jobs
59 unpack "${tardir}/$tarname"
63 # Set sane permissions
64 chmod -R u+w,go-w,a+rX-s .
68 BINDIR=/usr/bin SBINDIR=/usr/sbin \
69 DESTDIR="$destdir" install
71 # Delete included programs on the inetutils packages
72 for program in hostname dnsdomainname ifconfig \
73 domainname nisdomainname ypdomainname
75 rm "${destdir}/usr/bin/${program}"
76 rm "${destdir}/${mandir}/man1/${program}.1" \
77 "${destdir}/${mandir}/man8/${program}.8" || true;
81 strip --strip-unneeded "${destdir}"/usr/bin/* \
82 "${destdir}"/usr/sbin/* 2> /dev/null || true;
84 rmdir "${destdir}/${mandir}/man1" || true;
86 # Compress and link man pages (if needed)
87 if test -d "${destdir}/$mandir"
90 cd "${destdir}/$mandir"
91 find . -type f -exec lzip -9 '{}' +
92 find . -type l | while read -r file
94 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
101 mkdir -p "${destdir}${docsdir}"
102 cp -p $docs "${destdir}${docsdir}"