diff options
author | Mike Frysinger <vapier@gentoo.org> | 2008-09-16 06:53:23 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2008-09-16 06:53:23 +0000 |
commit | 29c9f9e25ea0833703ef901a9ec76fe90a8701fe (patch) | |
tree | 8e4d11a41856b1910433d056e09b936bdcb6d422 /net-misc/linux-igd | |
parent | tc-export: make sure the variable requested for export is a valid variable (diff) | |
download | gentoo-2-29c9f9e25ea0833703ef901a9ec76fe90a8701fe.tar.gz gentoo-2-29c9f9e25ea0833703ef901a9ec76fe90a8701fe.tar.bz2 gentoo-2-29c9f9e25ea0833703ef901a9ec76fe90a8701fe.zip |
Clean up ebuild and install and respect build env settings.
(Portage version: 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/ChangeLog | 9 | ||||
-rw-r--r-- | net-misc/linux-igd/files/linux-igd-1.0-build.patch | 65 | ||||
-rw-r--r-- | net-misc/linux-igd/files/makefile-fix-1.0-r2.diff | 11 | ||||
-rw-r--r-- | net-misc/linux-igd/files/upnpd.initd-1.0-r2 | 11 | ||||
-rw-r--r-- | net-misc/linux-igd/linux-igd-1.0-r2.ebuild | 46 |
5 files changed, 101 insertions, 41 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/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() { |