1 # Build recipe for inetutils.
3 # Copyright (c) 2017-2021 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 # Exit immediately on any error
24 # Define a category for the output of the package name
25 pkgcategory=networking
27 tarname=${program}-${version}.tar.gz
30 fetch=http://ftp.gnu.org/gnu/inetutils/$tarname
33 A collection of common network programs.
35 The inetutils package contains programs for basic networking.
38 homepage=http://www.gnu.org/software/inetutils
41 # Source documentation
42 docs="AUTHORS COPYING NEWS README THANKS TODO"
43 docsdir="${docdir}/${program}-${version}"
47 unpack "${tardir}/$tarname"
51 # Set sane permissions
52 chmod -R u+w,go-w,a+rX-s .
54 # Note about `--disable-logger':
55 # A better version is provided by the util-linux package
57 ./configure CPPFLAGS="$QICPPFLAGS" CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS -static" \
59 --libdir=/usr/lib${libSuffix} \
73 --build="$(gcc -dumpmachine)"
76 make -j${jobs} DESTDIR="$destdir" install
79 rm -f "${destdir}/usr/lib${libSuffix}/charset.alias"
80 rmdir "${destdir}/usr/lib${libSuffix}" || true
82 # Install inetd perp service
84 mkdir -p "${destdir}/etc/perp/inetd"
86 cp -p "${worktree}/archive/inetutils/etc/perp/inetd/rc.log" \
87 "${worktree}/archive/inetutils/etc/perp/inetd/rc.main" \
88 "${destdir}/etc/perp/inetd/"
90 chmod 755 "${destdir}"/etc/perp/inetd/rc.*
92 # THIS SERVICE IS DISABLED BY DEFAULT
93 chmod -t "${destdir}/etc/perp/inetd"
95 # Copy config file for inetd(8)
96 cp -p "${worktree}/archive/inetutils/etc/inetd.conf" "${destdir}/etc/"
97 chmod 644 "${destdir}/etc/inetd.conf"
99 # To handle config file(s)
100 touch "${destdir}/etc/.graft-config" \
101 "${destdir}/etc/perp/inetd/.graft-config"
103 # Compress info documents deleting index file for the package
104 if test -d "${destdir}/$infodir"
106 rm -f "${destdir}/${infodir}/dir"
107 lzip -9 "${destdir}/${infodir}"/*
110 # Compress and link man pages (if needed)
111 if test -d "${destdir}/$mandir"
114 cd "${destdir}/$mandir"
115 find . -type f -exec lzip -9 {} +
116 find . -type l | while read -r file
118 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
125 mkdir -p "${destdir}${docsdir}"
126 cp -p $docs "${destdir}${docsdir}"