1 # Build recipe for inetutils.
3 # Copyright (c) 2017-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.
21 # Set 'outdir' for a nice and well-organized output directory
22 outdir="${outdir}/${arch}/networking"
24 tarname=${program}-${version}.tar.gz
27 fetch=http://ftp.gnu.org/gnu/inetutils/$tarname
30 A collection of common network programs.
32 The inetutils package contains programs for basic networking.
35 homepage=http://www.gnu.org/software/inetutils
38 # Source documentation
39 docs="AUTHORS COPYING NEWS README THANKS TODO"
40 docsdir="${docdir}/${program}-${version}"
46 unpack "${tardir}/$tarname"
50 # Set sane permissions
51 chmod -R u+w,go-w,a+rX-s .
53 # Note about `--disable-logger':
54 # A better version is provided by the util-linux package
56 # Note about `--disable-nls':
57 # GNU Inetutils does not seem to provide locale files
59 ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS -static" \
61 --libdir=/usr/lib${libSuffix} \
77 --build="$(cc -dumpmachine)"
80 make -j${jobs} DESTDIR="$destdir" install
83 rm -f "${destdir}/usr/lib${libSuffix}/charset.alias"
84 rmdir "${destdir}/usr/lib${libSuffix}" || true
86 # Install inetd perp service
88 mkdir -p "${destdir}/etc/perp/inetd"
90 cp -p "${worktree}/archive/inetutils/etc/perp/inetd/rc.log" \
91 "${worktree}/archive/inetutils/etc/perp/inetd/rc.main" \
92 "${destdir}/etc/perp/inetd/"
94 chmod 755 "${destdir}"/etc/perp/inetd/rc.*
96 # THIS SERVICE IS DISABLED BY DEFAULT
97 chmod -t "${destdir}/etc/perp/inetd"
99 # Copy config file for inetd(8)
100 cp -p "${worktree}/archive/inetutils/etc/inetd.conf" "${destdir}/etc/"
101 chmod 644 "${destdir}/etc/inetd.conf"
103 # To handle config file(s)
104 touch "${destdir}/etc/.graft-config" \
105 "${destdir}/etc/perp/inetd/.graft-config"
107 # Compress info documents deleting index file for the package
108 if test -d "${destdir}/$infodir"
110 rm -f "${destdir}/${infodir}/dir"
111 lzip -9 "${destdir}/${infodir}"/*
114 # Compress and link man pages (if needed)
115 if test -d "${destdir}/$mandir"
118 cd "${destdir}/$mandir"
119 find . -type f -exec lzip -9 '{}' +
120 find . -type l | while read -r file
122 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
129 mkdir -p "${destdir}${docsdir}"
130 cp -p $docs "${destdir}${docsdir}"