summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2008-09-16 06:53:23 +0000
committerMike Frysinger <vapier@gentoo.org>2008-09-16 06:53:23 +0000
commitb58d3aa5a89aacf834aafc82bb17cd639a00eeb1 (patch)
treed428ddc1cb64d82b9011f39dbb52c02757f2a612 /net-misc/linux-igd
parenttc-export: make sure the variable requested for export is a valid variable (diff)
downloadhistorical-b58d3aa5a89aacf834aafc82bb17cd639a00eeb1.tar.gz
historical-b58d3aa5a89aacf834aafc82bb17cd639a00eeb1.tar.bz2
historical-b58d3aa5a89aacf834aafc82bb17cd639a00eeb1.zip
Clean up ebuild and install and respect build env settings.
Package-Manager: portage-2.2_rc8/cvs/Linux 2.6.26.2 x86_64
Diffstat (limited to 'net-misc/linux-igd')
-rw-r--r--net-misc/linux-igd/ChangeLog9
-rw-r--r--net-misc/linux-igd/Manifest18
-rw-r--r--net-misc/linux-igd/files/linux-igd-1.0-build.patch65
-rw-r--r--net-misc/linux-igd/files/makefile-fix-1.0-r2.diff11
-rw-r--r--net-misc/linux-igd/files/upnpd.initd-1.0-r211
-rw-r--r--net-misc/linux-igd/linux-igd-1.0-r2.ebuild46
6 files changed, 115 insertions, 45 deletions
diff --git a/net-misc/linux-igd/ChangeLog b/net-misc/linux-igd/ChangeLog
index 75760fe5a3d5..394b8c522f80 100644
--- a/net-misc/linux-igd/ChangeLog
+++ b/net-misc/linux-igd/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for net-misc/linux-igd
-# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/linux-igd/ChangeLog,v 1.28 2007/06/21 15:03:19 angelos Exp $
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/linux-igd/ChangeLog,v 1.29 2008/09/16 06:53:22 vapier Exp $
+
+ 16 Sep 2008; Mike Frysinger <vapier@gentoo.org> files/upnpd.initd-1.0-r2,
+ +files/linux-igd-1.0-build.patch, -files/makefile-fix-1.0-r2.diff,
+ linux-igd-1.0-r2.ebuild:
+ Clean up ebuild and install and respect build env settings.
21 Jun 2007; Christoph Mende <angelos@gentoo.org> linux-igd-1.0-r2.ebuild:
Stable on amd64 wrt bug 168279
diff --git a/net-misc/linux-igd/Manifest b/net-misc/linux-igd/Manifest
index a7b08c2bdca8..3961df5de352 100644
--- a/net-misc/linux-igd/Manifest
+++ b/net-misc/linux-igd/Manifest
@@ -1,7 +1,17 @@
-AUX makefile-fix-1.0-r2.diff 295 RMD160 b31d8e96236fd446ea56324989f87ffad622349e SHA1 fe5419acde956d6cccaa47a946331569bd2db348 SHA256 c29bff3a43fdda16b34e647a9c3d02a8f0142cc1b96f7741f197d0945200c714
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+AUX linux-igd-1.0-build.patch 2063 RMD160 bf2d2f5c4baa17e2767e7232a7ae8d91c0374e23 SHA1 38eaa0ba3bff08e2bb2c294e9fdf95804de668c2 SHA256 191d8218770840ade55501ad65c68fedc36d4dbc6d23dd041ce79c79f363b486
AUX upnpd.confd-1.0-r2 267 RMD160 59139ed0a9dca59fa8275023d944c1ec95e68453 SHA1 a1021465b04d67ad022c23dc99d6f4d40dbd983b SHA256 41e13640638909ad58fc6ce623c0e8d5254431fb03617f6d65e301f73c13bd65
-AUX upnpd.initd-1.0-r2 709 RMD160 11a7b0ab9d4f9a9137d740650354cb2303e01633 SHA1 b1b7880a1ba0ee83cc4131e8b6ee9fd358af4173 SHA256 e9b1df8c864430b768bfe9d15593e5632b6f5297794fa79ab0d922c0c10ef7f3
+AUX upnpd.initd-1.0-r2 924 RMD160 f3472bd65c94f3b6bced5d64548a190584f543d9 SHA1 aaa77449d4167b6c3157d32dc1482a8b34493183 SHA256 2dd8ba5a46bae9e1d68097b9995544ecd5ad0f0e02a47ac7849dc63f624ac099
DIST linuxigd-1.0.tar.gz 35396 RMD160 b05fe11d99766119779839766e323cfb6ada6977 SHA1 0dd71fd7c5b8a3b0609164618314f4c110aff100 SHA256 f6335273fd6bfad7fb32e94e36461e8b74f9523e7994bad8be9fac29bee9f4cd
-EBUILD linux-igd-1.0-r2.ebuild 1312 RMD160 f58a49cb25445febd0d46c30fa26b4f7d1f07276 SHA1 636a33deb6ed44d411e112656a37c1816a942117 SHA256 d18a095c893cea8b43111bcd609f0b485efacc6492737bc542d61047aa139ead
-MISC ChangeLog 3826 RMD160 1b61b40df3b0ec999a614529c9c914c24f8a3d20 SHA1 1e865c8581abeb06b52edb6ab9f8334a13c0fa0f SHA256 3209834996a75601d4bf90ab3e006bdf52b3babf271a14b2bc428ee415bed956
+EBUILD linux-igd-1.0-r2.ebuild 1099 RMD160 4755e4f690d75449cdb4ed4339062449b69dc668 SHA1 979cb21f6e2d15181c18c7689aad95ff8cde584c SHA256 b15136dada243bbce8a8d91a8796dc932244821762ef6af2b3f10d66f1d31960
+MISC ChangeLog 4060 RMD160 4244505d58ec6f957099f0bee2b97178aa959d45 SHA1 bd87bca23da7eaf7dd348abde68d2cde91c60496 SHA256 6095dc63df34d14170bf3922a8a04f30a21bcdf7e1f8f1ca6ff24cd15e07045b
MISC metadata.xml 392 RMD160 8a9cbd429d1af12c8fde9d68540e94be0f28a263 SHA1 84f1e1371f7f9974dce63b4dac43cb0c7c01812f SHA256 2e630bf305730cb61153c9eb2b6b7b182a057bff77c560669ea80f821cf18026
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.9 (GNU/Linux)
+
+iEYEARECAAYFAkjPWBcACgkQ67wieSYcaxfnlwCfYGwM8hi20xBDG7glKGgs+4od
+ZHwAoI6VFF9z6GQ0ksygYVsBYqz12xF0
+=oTgx
+-----END PGP SIGNATURE-----
diff --git a/net-misc/linux-igd/files/linux-igd-1.0-build.patch b/net-misc/linux-igd/files/linux-igd-1.0-build.patch
new file mode 100644
index 000000000000..d098e3f8e930
--- /dev/null
+++ b/net-misc/linux-igd/files/linux-igd-1.0-build.patch
@@ -0,0 +1,65 @@
+things fixed:
+ - respect env $(CC)
+ - do not override -O settings in env CFLAGS with -O2
+ - drop useless (to us) -I/-L paths -- let toolchain find upnp
+ - use standard LDLIBS rather than LIBS variable
+ - respect env LDFLAGS
+ - respect env CPPFLAGS
+ - drop pointless implicit %.o rule
+ - fix install target
+ - respect DESTDIR
+ - create paths
+ - use proper permissions
+ - install used gif files
+
+we add -D_GNU_SOURCE to get strnlen() prototype out of glibc
+
+--- linuxigd-1.0/Makefile
++++ linuxigd-1.0/Makefile
+@@ -3,11 +3,10 @@
+ #LIBIPTC_PREFIX=/usr
+
+-CC=gcc
+-INCLUDES= -I$(LIBUPNP_PREFIX)/include -I../include
+-LIBS= -lpthread -lupnp -lixml -lthreadutil -L$(LIBUPNP_PREFIX)/lib -L../libs
++LDLIBS += -lpthread -lupnp -lixml -lthreadutil
+ FILES= main.o gatedevice.o pmlist.o util.o config.o
+
+-CFLAGS += -Wall -g -O2
++CFLAGS += -Wall
++CPPFLAGS += -D_GNU_SOURCE
+
+ ifdef HAVE_LIBIPTC
+ ifdef LIBIPTC_PREFIX
+@@ -23,21 +22,18 @@
+ all: upnpd
+
+ upnpd: $(FILES)
+- $(CC) $(CFLAGS) $(FILES) $(LIBS) -o $@
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
+- @echo "make $@ finished on `date`"
+-
+-%.o: %.c
+- $(CC) $(CFLAGS) $(INCLUDES) -c $<
+
+ clean:
+ rm -f *.o upnpd
+
+ install: upnpd
+- install -d /etc/linuxigd
+- install etc/gatedesc.xml /etc/linuxigd
+- install etc/gateconnSCPD.xml /etc/linuxigd
+- install etc/gateicfgSCPD.xml /etc/linuxigd
+- install etc/dummy.xml /etc/linuxigd
+- install upnpd $(PREFIX)/sbin
+- install upnpd.8 $(PREFIX)/share/man/man8
+- if [ ! -f /etc/upnpd.conf ]; then install etc/upnpd.conf /etc; fi
++ install -d -m755 $(DESTDIR)/etc/linuxigd $(DESTDIR)$(PREFIX)/sbin $(DESTDIR)$(PREFIX)/share/man/man8
++ install -m644 etc/gatedesc.xml $(DESTDIR)/etc/linuxigd
++ install -m644 etc/ligd.gif $(DESTDIR)/etc/linuxigd
++ install -m644 etc/gateconnSCPD.xml $(DESTDIR)/etc/linuxigd
++ install -m644 etc/gateicfgSCPD.xml $(DESTDIR)/etc/linuxigd
++ install -m644 etc/dummy.xml $(DESTDIR)/etc/linuxigd
++ install -m755 upnpd $(DESTDIR)$(PREFIX)/sbin
++ install -m644 upnpd.8 $(DESTDIR)$(PREFIX)/share/man/man8
++ install -m644 etc/upnpd.conf $(DESTDIR)/etc
diff --git a/net-misc/linux-igd/files/makefile-fix-1.0-r2.diff b/net-misc/linux-igd/files/makefile-fix-1.0-r2.diff
deleted file mode 100644
index bf3ea504d9e3..000000000000
--- a/net-misc/linux-igd/files/makefile-fix-1.0-r2.diff
+++ /dev/null
@@ -1,11 +0,0 @@
---- Makefile 2007-02-27 16:49:24.000000000 +0000
-+++ Makefile 2007-02-27 16:52:56.000000000 +0000
-@@ -27,7 +27,7 @@ upnpd: $(FILES)
- @echo "make $@ finished on `date`"
-
- %.o: %.c
-- $(CC) $(CFLAGS) $(INCLUDES) -c $<
-+ $(CC) $(CFLAGS) $(INCLUDES) -D_GNU_SOURCE -c $<
-
- clean:
- rm -f *.o upnpd
diff --git a/net-misc/linux-igd/files/upnpd.initd-1.0-r2 b/net-misc/linux-igd/files/upnpd.initd-1.0-r2
index 85ecdbd570ed..6fb42ca489fc 100644
--- a/net-misc/linux-igd/files/upnpd.initd-1.0-r2
+++ b/net-misc/linux-igd/files/upnpd.initd-1.0-r2
@@ -1,4 +1,7 @@
#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/linux-igd/files/upnpd.initd-1.0-r2,v 1.2 2008/09/16 06:53:23 vapier Exp $
depend() {
need net
@@ -16,17 +19,17 @@ start() {
checkconfig || return 1
ebegin "Starting upnpd"
if [ "$ALLOW_MULTICAST" = "yes" ] ; then
- /sbin/route add -net 239.0.0.0 netmask 255.0.0.0 $INTERNAL_INTERFACE
+ route add -net 239.0.0.0 netmask 255.0.0.0 $INTERNAL_INTERFACE
fi
- start-stop-daemon --start --exec /usr/bin/upnpd -- $EXTERNAL_INTERFACE $INTERNAL_INTERFACE
+ start-stop-daemon --start --exec /usr/sbin/upnpd -- $EXTERNAL_INTERFACE $INTERNAL_INTERFACE
eend $?
}
stop() {
ebegin "Stopping upnpd"
if [ "$ALLOW_MULTICAST" = "yes" ] ; then
- /sbin/route del -net 239.0.0.0 netmask 255.0.0.0 $INTERNAL_INTERFACE
+ route del -net 239.0.0.0 netmask 255.0.0.0 $INTERNAL_INTERFACE
fi
- start-stop-daemon --stop --exec /usr/bin/upnpd
+ start-stop-daemon --stop --exec /usr/sbin/upnpd
eend $?
}
diff --git a/net-misc/linux-igd/linux-igd-1.0-r2.ebuild b/net-misc/linux-igd/linux-igd-1.0-r2.ebuild
index fec7ba6a167e..98d7b6634181 100644
--- a/net-misc/linux-igd/linux-igd-1.0-r2.ebuild
+++ b/net-misc/linux-igd/linux-igd-1.0-r2.ebuild
@@ -1,11 +1,11 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/linux-igd/linux-igd-1.0-r2.ebuild,v 1.6 2007/06/21 15:03:19 angelos Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/linux-igd/linux-igd-1.0-r2.ebuild,v 1.7 2008/09/16 06:53:22 vapier Exp $
-inherit eutils
-DESCRIPTION="Deamon that emulates Microsoft's Internet Connection Sharing (ICS)
- for UPnP-aware clients"
-HOMEPAGE="http://linux-igd.sourceforge.net"
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Deamon that emulates Microsoft's Internet Connection Sharing (ICS) for UPnP-aware clients"
+HOMEPAGE="http://linux-igd.sourceforge.net/"
SRC_URI="mirror://sourceforge/linux-igd/linuxigd-${PV}.tar.gz"
LICENSE="GPL-2"
@@ -14,31 +14,29 @@ KEYWORDS="amd64 ppc sparc x86"
IUSE=""
DEPEND=">=net-libs/libupnp-1.4.1"
-RDEPEND="net-firewall/iptables"
+RDEPEND="${DEPEND}
+ net-firewall/iptables"
+
S=${WORKDIR}/linuxigd-${PV}
-src_compile() {
- epatch ${FILESDIR}/makefile-fix-${PVR}.diff
- sed -i -e "s|/etc/linuxigd|${D}/etc/linuxigd|" -e "s|/usr/bin|${D}/usr/bin|" Makefile
- sed -i -e "s|/etc/upnpd.conf|/etc/linuxigd/upnpd.conf|" globals.h
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-build.patch
+}
+src_compile() {
+ tc-export CC
emake || die "compile failed"
}
src_install() {
- dobin upnpd
- insinto /etc/linuxigd
- doins etc/dummy.xml
- doins etc/gateconnSCPD.xml
- doins etc/gatedesc.xml
- doins etc/gateicfgSCPD.xml
- doins etc/ligd.gif
- doins etc/upnpd.conf
-
- newinitd ${FILESDIR}/upnpd.initd-${PVR} upnpd
- newconfd ${FILESDIR}/upnpd.confd-${PVR} upnpd
-
- dodoc CHANGES INSTALL LICENSE
+ emake install DESTDIR="${D}" || die
+
+ newinitd "${FILESDIR}"/upnpd.initd-${PVR} upnpd
+ newconfd "${FILESDIR}"/upnpd.confd-${PVR} upnpd
+
+ dodoc CHANGES TODO INSTALL doc/*
}
pkg_postinst() {