123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- # Build recipe for tcp_wrappers.
- #
- # Copyright (c) 2018 Matias Fonzo, <selk@dragora.org>.
- #
- # Licensed under the Apache License, Version 2.0 (the "License");
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- program=tcp_wrappers
- version=7.6-ipv6.4
- pkgversion=7.6
- release=1
- tarname=${program}_${version}.tar.gz
- # Remote source(s)
- fetch=ftp://ftp.porcupine.org/pub/security/$tarname
- description="
- Monitor of incoming TCP connections.
- TCP Wrapper is a host-based Networking ACL system, used to
- filter network access to Internet Protocol servers on
- (Unix-like) operating systems such as Linux or BSD.
- It allows host or subnetwork IP addresses, names and/or
- ident query replies, to be used as tokens on which to
- filter for access control purposes.
- "
- homepage=ftp://ftp.porcupine.org/pub/security/index.html
- license=BSD
- # Source documentation
- docs="BLURB CHANGES DISCLAIMER README README.NIS"
- docsdir="${docdir}/${program}-${pkgversion}"
- # Source directory
- srcdir=${program}_${version}
- # Limit parallel jobs for the compiler to 1
- jobs=1
- build()
- {
- set -e
- unpack "${tardir}/$tarname"
- cd "$srcdir"
- make -j${jobs} STYLE="-DPROCESS_OPTIONS" REAL_DAEMON_DIR=/usr/sbin linux
- # Install manually
- mkdir -p "${destdir}/usr/include" \
- "${destdir}/usr/sbin" "${destdir}/usr/lib${libSuffix}"
- for file in safe_finger tcpd tcpdchk tcpdmatch try-from
- do
- cp -p $file "${destdir}/usr/sbin/"
- chmod 755 "${destdir}/usr/sbin/${file}"
- done
- cp -p libwrap.a "${destdir}/usr/lib${libSuffix}/"
- chmod 644 "${destdir}/usr/lib${libSuffix}/libwrap.a"
- cp -p tcpd.h "${destdir}/usr/include/"
- chmod 644 "${destdir}/usr/include/tcpd.h"
- mkdir -p "${destdir}${mandir}/man3" \
- "${destdir}${mandir}/man5" "${destdir}${mandir}/man8"
- lzip -9c < hosts_access.3 > "${destdir}${mandir}/man3/hosts_access.3.lz"
- lzip -9c < hosts_access.5 > "${destdir}${mandir}/man5/hosts_access.5.lz"
- lzip -9c < hosts_options.5 > "${destdir}${mandir}/man5/hosts_options.5.lz"
- lzip -9c < tcpd.8 > "${destdir}${mandir}/man8/tcpd.8.lz"
- lzip -9c < tcpdchk.8 > "${destdir}${mandir}/man8/tcpdchk.8.lz"
- lzip -9c < tcpdmatch.8 > "${destdir}${mandir}/man8/tcpdmatch.8.lz"
- # Strip remaining binaries and libraries
- find "$destdir" -type f | xargs file | \
- awk '/ELF/ && /executable/ || /shared object/' | \
- cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
- strip --strip-debug "${destdir}/usr/lib${libSuffix}/libwrap.a"
- # Copy local config files
- mkdir -p "${destdir}/etc"
- cp -p "${worktree}/archive/tcp_wrappers/etc/hosts.allow" "${destdir}/etc/"
- cp -p "${worktree}/archive/tcp_wrappers/etc/hosts.deny" "${destdir}/etc/"
- chmod 644 "${destdir}/etc/hosts.allow" "${destdir}/etc/hosts.deny"
- touch "${destdir}/etc/.graft-config"
- # Copy documentation
- mkdir -p "${destdir}${docsdir}"
- cp -p $docs "${destdir}${docsdir}/"
- }
|