CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
Added COPYING and COPYRIGHT to the repository
[crossrootfs.git] / tcp_wrappers / Pkgfile
index 0702bf4c3d654bc33dcad04b8a37ce180fd1e553..3c93b15444346c5cb6f8fbaf73c25f7f96da159b 100644 (file)
@@ -1,31 +1,52 @@
 # Description: Monitors and Controls incoming TCP connections
 # URL: ftp://ftp.porcupine.org/pub/security/index.html
 # Maintainer: CRUX System Team, core-ports at crux dot nu
-# Ach Maintainer: CRUX ARM System Team
+# Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu
 # Depends on:
 
 name=tcp_wrappers
 version=7.6
-release=6
-source=(ftp://ftp.porcupine.org/pub/security/tcp_wrappers_$version.tar.gz \
-        http://www.imasy.org/~ume/ipv6/tcp_wrappers_7.6-ipv6-1.14.diff.gz \
-        hosts.allow hosts.deny try-from.8 safe_finger.8 $name-$version.patch)
+release=10
+source=(ftp://ftp.porcupine.org/pub/security/${name}_${version}.tar.gz \
+        ftp://ftp.uni-frankfurt.de/pub/Mirrors/gentoo.org/distfiles/tcp-wrappers-$version-patches-1.0.tar.bz2 \
+        hosts.allow hosts.deny try-from.8 safe_finger.8)
 
 build() {
-  cd tcp_wrappers_$version
-  zcat ../tcp_wrappers_7.6-ipv6-1.14.diff.gz | patch -p2
-  patch -p1 < ../$name-$version.patch
-  make REAL_DAEMON_DIR=/usr/sbin STYLE="-DSYS_ERRLIST_DEFINED -DPROCESS_OPTIONS" linux
-  mkdir -p $PKG/usr/{sbin,lib,include} $PKG/etc $PKG/usr/man/{man3,man5,man8}
-  cp safe_finger tcpd tcpdchk tcpdmatch try-from $PKG/usr/sbin
-  cp tcpd.h $PKG/usr/include
-  cp libwrap.a $PKG/usr/lib
-  cp hosts_access.3 $PKG/usr/man/man3
-  cp hosts_access.5 hosts_options.5 $PKG/usr/man/man5
-  cp ../hosts.{deny,allow} $PKG/etc
-  cp ../try-from.8 ../safe_finger.8 tcpd.8 tcpdchk.8 tcpdmatch.8 $PKG/usr/man/man8
-  chmod -R +w $PKG
-  ln -sf hosts_access.3.gz $PKG/usr/man/man3/hosts_ctl.3.gz
-  ln -sf hosts_access.3.gz $PKG/usr/man/man3/request_init.3.gz
-  ln -sf hosts_access.3.gz $PKG/usr/man/man3/request_set.3.gz
+  cd ${name}_${version}
+
+  patch -p1 -i $SRC/$version/tcp-wrappers-$version-makefile.patch
+  patch -p1 -i $SRC/$version/generic/01_all_redhat-bug11881.patch
+  patch -p0 -i $SRC/$version/generic/02_all_redhat-bug17795.patch
+  patch -p0 -i $SRC/$version/generic/03_all_wildcard.patch
+  patch -p1 -i $SRC/$version/generic/04_all_fixgethostbyname.patch
+  patch -p1 -i $SRC/$version/generic/07_all_sig.patch
+  patch -p1 -i $SRC/$version/generic/08_all_strerror.patch
+  patch -p1 -i $SRC/$version/generic/09_all_gcc-3.4.patch
+  patch -p1 -i $SRC/$version/generic/10_all_more-headers.patch
+  patch -p1 -i $SRC/$version/tcp-wrappers-$version-shared.patch
+  patch -p2 -i $SRC/$version/tcp-wrappers-$version-ipv6-1.14.diff
+    
+  export GENTOO_OPT="-DHAVE_WEAKSYMS -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len" 
+  export RANLIB=$RANLIB 
+  export MAJOR=0 MINOR=${version:0:1} REL=${version:2:3}
+  make config-check
+  make linux
+
+  install -d $PKG/{etc,usr/{sbin,lib,include,man/{man3,man5,man8}}}
+
+  install -m 0755 safe_finger tcpd tcpdchk tcpdmatch try-from $PKG/usr/sbin
+  install -m 0644 tcpd.h $PKG/usr/include
+  install -m 0644 libwrap.a $PKG/usr/lib
+  cp --no-dereference --preserve=links libwrap.so* $PKG/usr/lib
+
+  install -m 0644 *.3 $PKG/usr/man/man3
+  install -m 0644 *.5 $PKG/usr/man/man5
+  install -m 0644 $SRC/*.8 *.8 $PKG/usr/man/man8
+  ln -s hosts_access.3.gz $PKG/usr/man/man3/hosts_ctl.3.gz
+  ln -s hosts_access.3.gz $PKG/usr/man/man3/request_init.3.gz
+  ln -s hosts_access.3.gz $PKG/usr/man/man3/request_set.3.gz
+  ln -s hosts_access.5.gz $PKG/usr/man/man5/host.allow.5.gz
+  ln -s hosts_access.5.gz $PKG/usr/man/man5/host.deny.5.gz
+
+  install -m 0644 $SRC/hosts.{deny,allow} $PKG/etc
 }