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.
17 program=net-tools-code
18 version=0eebece8c964e3cfa8a018f42b2e7e751a7009a0
24 # Set 'outdir' for a nice and well-organized output directory
25 outdir="${outdir}/${arch}/networking"
27 tarname=${program}-${version}.zip
30 fetch=http://rsync.dragora.org/current/sources/$tarname
31 #fetch=http://sourceforge.net/code-snapshots/git/n/ne/net-tools/code.git/$tarname
34 Collection of basic networking programs.
36 A collection of programs that form the base set of the NET-3 networking
37 distribution for the GNU/Linux operating system.
39 This package includes the important tools for controlling the network
40 subsystem of the Linux kernel. This includes arp, netstat, rarp and
41 route. Additionally, this package contains utilities relating to
42 particular network hardware types (plipconfig, slattach, mii-tool)
43 and advanced aspects of IP configuration (iptunnel, ipmaddr).
46 homepage=http://net-tools.sourceforge.net/
49 # Source documentation
50 docs="COPYING README THANKS TODO"
51 docsdir="${docdir}/${pkgname}-${pkgversion}"
53 # The build system does not support parallel jobs
60 unpack "${tardir}/$tarname"
64 # Set sane permissions
65 chmod -R u+w,go-w,a+rX-s .
69 BINDIR=/usr/bin SBINDIR=/usr/sbin \
70 DESTDIR="$destdir" install
72 # Delete included programs on the inetutils packages
73 for program in hostname dnsdomainname ifconfig \
74 domainname nisdomainname ypdomainname
76 rm "${destdir}/usr/bin/${program}"
77 rm "${destdir}/${mandir}/man1/${program}.1" \
78 "${destdir}/${mandir}/man8/${program}.8" || true;
82 strip --strip-unneeded "${destdir}"/usr/bin/* \
83 "${destdir}"/usr/sbin/* 2> /dev/null || true;
85 rmdir "${destdir}/${mandir}/man1" || true;
87 # Compress and link man pages (if needed)
88 if test -d "${destdir}/$mandir"
91 cd "${destdir}/$mandir"
92 find . -type f -exec lzip -9 '{}' +
93 find . -type l | while read -r file
95 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
102 mkdir -p "${destdir}${docsdir}"
103 cp -p $docs "${destdir}${docsdir}"