source: npl/overig/tcp_wrappers/tcp_wrappers.SlackBuild.orig @ 2154c77

Last change on this file since 2154c77 was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100755
File size: 3.2 KB
Line 
1#!/bin/sh
2
3# Copyright 2008, 2009, 2010  Patrick J. Volkerding, Sebeka, MN, USA
4# All rights reserved.
5#
6# Redistribution and use of this script, with or without modification, is
7# permitted provided that the following conditions are met:
8#
9# 1. Redistributions of this script must retain the above copyright
10#    notice, this list of conditions and the following disclaimer.
11#
12#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
13#  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
14#  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
15#  EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
17#  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
18#  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
19#  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
20#  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
21#  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22
23
24VERSION=7.6
25BUILD=${BUILD:-1}
26
27# Automatically determine the architecture we're building on:
28if [ -z "$ARCH" ]; then
29  case "$( uname -m )" in
30    i?86) export ARCH=i486 ;;
31    arm*) export ARCH=arm ;;
32    # Unless $ARCH is already set, use uname -m for all other archs:
33       *) export ARCH=$( uname -m ) ;;
34  esac
35fi
36
37NUMJOBS=${NUMJOBS:-" -j7 "}
38
39if [ "$ARCH" = "x86_64" ]; then
40  LIBDIRSUFFIX="64"
41else
42  LIBDIRSUFFIX=""
43fi
44
45CWD=$(pwd)
46TMP=${TMP:-/tmp}
47PKG=$TMP/package-tcp_wrappers
48
49rm -rf $PKG
50mkdir -p $TMP $PKG
51
52cd $TMP
53rm -rf tcp_wrappers-$VERSION
54tar xvf $CWD/tcp_wrappers_$VERSION.tar.gz || exit 1
55cd tcp_wrappers-$VERSION || exit 1
56
57chown -R root:root .
58find . \
59  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
60  -exec chmod 755 {} \; -o \
61  \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
62  -exec chmod 644 {} \;
63
64sh extract-and-patch.sh
65cd tcp_wrappers_$VERSION || exit 1
66make REAL_DAEMON_DIR=/usr/sbin linux
67strip tcpd safe_finger tcpdchk tcpdmatch try-from
68mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}
69cat libwrap.a > $PKG/usr/lib${LIBDIRSUFFIX}/libwrap.a
70mkdir -p $PKG/usr/include
71cat tcpd.h > $PKG/usr/include/tcpd.h
72mkdir -p $PKG/usr/sbin
73cat safe_finger > $PKG/usr/sbin/safe_finger
74cat tcpd > $PKG/usr/sbin/tcpd
75cat tcpdchk > $PKG/usr/sbin/tcpdchk
76cat tcpdmatch > $PKG/usr/sbin/tcpdmatch
77cat try-from > $PKG/usr/sbin/try-from
78chmod 755 $PKG/usr/sbin/*
79mkdir -p $PKG/usr/man/man{3,5,8}
80cat hosts_access.3 | gzip -9c > $PKG/usr/man/man3/hosts_access.3.gz
81cat hosts_access.5 | gzip -9c > $PKG/usr/man/man5/hosts_access.5.gz
82cat hosts_options.5 | gzip -9c > $PKG/usr/man/man5/hosts_options.5.gz
83cat tcpd.8 | gzip -9c > $PKG/usr/man/man8/tcpd.8.gz
84cat tcpdchk.8 | gzip -9c > $PKG/usr/man/man8/tcpdchk.8.gz
85cat tcpdmatch.8 | gzip -9c > $PKG/usr/man/man8/tcpdmatch.8.gz
86
87mkdir -p $PKG/usr/doc/tcp_wrappers_$VERSION
88cp -a \
89  BLURB CHANGES DISCLAIMER README README.NIS \
90  $PKG/usr/doc/tcp_wrappers_$VERSION
91
92# Finish up the package:
93mkdir -p $PKG/install
94cat $CWD/slack-desc > $PKG/install/slack-desc
95
96# Build the package:
97cd $PKG
98/sbin/makepkg -l y -c n $TMP/tcp_wrappers-$VERSION-$ARCH-$BUILD.txz
99
Note: See TracBrowser for help on using the repository browser.