From dc6316bb2c16e117a41a773c70d72ea1765a7048 Mon Sep 17 00:00:00 2001
From: James Meyer <james.meyer@operamail.com>
Date: Thu, 11 Nov 2010 19:32:40 +0000
Subject: iputils: updated to 2010214

---
 abs/core/iputils/PKGBUILD                          | 53 +++++++++-------------
 .../iputils/iputils-20070202-no-open-max.patch     | 16 -------
 abs/core/iputils/permission-fix.patch              | 15 ++++++
 3 files changed, 36 insertions(+), 48 deletions(-)
 delete mode 100644 abs/core/iputils/iputils-20070202-no-open-max.patch
 create mode 100644 abs/core/iputils/permission-fix.patch

diff --git a/abs/core/iputils/PKGBUILD b/abs/core/iputils/PKGBUILD
index 341158b..1b62cda 100644
--- a/abs/core/iputils/PKGBUILD
+++ b/abs/core/iputils/PKGBUILD
@@ -1,38 +1,37 @@
-# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $
+# $Id: PKGBUILD 82625 2010-06-15 04:22:56Z allan $
 # Maintainer: Aaron Griffin <aaron@archlinux.org>
 
 pkgname=iputils
-pkgver=20070202
+pkgver=20100214
 _traceroutever=1.4a12
-pkgrel=13
+pkgrel=2
 pkgdesc="IP Configuration Utilities (and Ping)"
 arch=(i686 x86_64)
 license=('GPL')
-url="ftp://ftp.inr.ac.ru/ip-routing/"
+url="http://www.linuxfoundation.org/en/Net:Iputils"
 groups=('base')
 depends=('glibc')
-makedepends=('jade')
+makedepends=('opensp' 'libxslt' 'docbook-xsl')
 conflicts=('netkit-base' 'arping' 'netkit-tftpd' 'traceroute')
 replaces=('netkit-base' 'traceroute')
 source=(http://www.skbuff.net/iputils/$pkgname-s$pkgver.tar.bz2
         ftp://ftp.ee.lbl.gov/traceroute-$_traceroutever.tar.gz
-	iputils-20070202-no-open-max.patch)
+	permission-fix.patch)
 options=(!makeflags)
-md5sums=('1d38fb3cfc2b71496e43cf646bfc1d6e'
+md5sums=('37596c8b3eed537294e77464b9804726'
          '964d599ef696efccdeebe7721cd4828d'
-	 'a2cbc0174dd883f68297aa7f3e7c4f5c')
+         '66109966cad06e425bb12a78bab85b70')
 
 build()
 {
   #build iptuils
-  cd $startdir/src/$pkgname-s$pkgver
-  patch -Np1 -i ../iputils-20070202-no-open-max.patch || return 1
+  cd $srcdir/$pkgname-s$pkgver
   make KERNEL_INCLUDE=/usr/include || return 1   # for i686
   for i in arping clockdiff rarpd rdisc tftpd tracepath tracepath6; do
-    install -D -m755 $i $startdir/pkg/usr/sbin/$i
+    install -D -m755 $i $pkgdir/usr/sbin/$i
   done
   for i in ping ping6 traceroute6; do
-    install -D -m4755 $i $startdir/pkg/bin/$i
+    install -D -m4755 $i $pkgdir/bin/$i
   done
 
   msg ":: building docs"
@@ -42,31 +41,21 @@ build()
   cd doc
   for file in *.sgml; do
       xf=${file/.sgml/.xml}
-      sx -xlower -xno-nl-in-tag $file > $xf
+      osx -xlower -xno-nl-in-tag $file > $xf || true
       sed -i "s|<refname>\(.*\), \(.*\)</refname>|<refname>\1</refname>, <refname>\2</refname>|g" $xf
-      xsltproc /usr/share/xml/docbook/xsl-stylesheets-1.73.1/manpages/docbook.xsl $xf
+      xsltproc /usr/share/xml/docbook/xsl-stylesheets-1.76.0/manpages/docbook.xsl $xf
   done
 
-  mkdir -p $startdir/pkg/usr/man/man8
+  mkdir -p $pkgdir/usr/share/man/man8
   install -m644 arping.8 clockdiff.8 ping.8 ping6.8 rarpd.8 rdisc.8 \
-                    tftpd.8 tracepath.8 tracepath6.8 traceroute6 \
-                    $startdir/pkg/usr/man/man8/
-  #make man
-  #for i in arping clockdiff ping rarpd rdisc tftpd tracepath traceroute6; do
-  #  install -D -m644 $i.8 $startdir/pkg/usr/man/man8/$i.8
-  #done
+                    tftpd.8 tracepath.8 tracepath6.8 traceroute6.8 \
+                    $pkgdir/usr/share/man/man8/
 
   # build traceroute
   # this is combined in this package because it's awkward as a separate package
-  cd ${startdir}/src/traceroute-$_traceroutever
-  ./configure --prefix=/usr --sbindir=/bin
-  #if [ "${CARCH}" = "x86_64" ]; then
-    make CFLAGS="${CFLAGS} -Ilinux-include/" || return 1
-  #else
-  #  make || return 1
-  #fi
-  make DESTDIR=${startdir}/pkg install install-man
-
-  chmod 4775 ${startdir}/pkg/bin/traceroute
+  cd ${srcdir}/traceroute-$_traceroutever
+  patch -Np1 -i ../permission-fix.patch || return 1
+  ./configure --prefix=/usr --sbindir=/bin --mandir=/usr/share/man
+  make CFLAGS="${CFLAGS} -Ilinux-include/" || return 1
+  make DESTDIR=${pkgdir} install install-man
 }
-
diff --git a/abs/core/iputils/iputils-20070202-no-open-max.patch b/abs/core/iputils/iputils-20070202-no-open-max.patch
deleted file mode 100644
index 5013ba4..0000000
--- a/abs/core/iputils/iputils-20070202-no-open-max.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-the OPEN_MAX define has been removed in newer kernel headers so use the
-proper method of getting the value dynamically
-
-http://bugs.gentoo.org/195861
-
---- a/rdisc.c
-+++ b/rdisc.c
-@@ -247,7 +247,7 @@ void do_fork(void)
- 	if ((pid=fork()) != 0)
- 		exit(0);
- 
--	for (t = 0; t < OPEN_MAX; t++)
-+	for (t = 0; t < sysconf(_SC_OPEN_MAX); t++)
- 		if (t != s)
- 			close(t);
- 
diff --git a/abs/core/iputils/permission-fix.patch b/abs/core/iputils/permission-fix.patch
new file mode 100644
index 0000000..c47636f
--- /dev/null
+++ b/abs/core/iputils/permission-fix.patch
@@ -0,0 +1,15 @@
+--- traceroute-1.4a12/Makefile.in.old	2000-11-23 21:05:29.000000000 +0100
++++ traceroute-1.4a12/Makefile.in	2008-09-27 20:04:30.000000000 +0200
+@@ -90,10 +90,10 @@
+ 	sed -e 's/.*/char version[] = "&";/' $(srcdir)/VERSION > $@
+ 
+ install: force
+-	$(INSTALL) -m 4555 -o root -g bin traceroute $(DESTDIR)$(BINDEST)
++	$(INSTALL) -m 4555 -o root -g root traceroute $(DESTDIR)$(BINDEST)
+ 
+ install-man: force
+-	$(INSTALL) -m 444 -o bin -g bin traceroute.8 $(DESTDIR)$(MANDEST)/man8
++	$(INSTALL) -m 644 -o root -g root traceroute.8 $(DESTDIR)$(MANDEST)/man8
+ 
+ lint: $(GENSRC) force
+ 	lint -hbxn $(SRC) | \
-- 
cgit v0.12

