summaryrefslogtreecommitdiff
path: root/recipes/portmap
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/portmap
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/portmap')
-rw-r--r--recipes/portmap/files/make.patch83
-rw-r--r--recipes/portmap/files/no-libwrap.patch26
-rwxr-xr-xrecipes/portmap/files/portmap.init50
-rw-r--r--recipes/portmap/portmap-5-25/make.patch73
-rw-r--r--recipes/portmap/portmap-5-26/make.patch73
-rw-r--r--recipes/portmap/portmap-6.0/destdir-no-strip.patch44
-rw-r--r--recipes/portmap/portmap-6.0/no-libwrap.patch15
-rw-r--r--recipes/portmap/portmap-6.0/no-pie.patch14
-rw-r--r--recipes/portmap/portmap-6.0/no-tcpd-support.patch28
-rw-r--r--recipes/portmap/portmap-unslung_5-9.bb22
-rw-r--r--recipes/portmap/portmap.inc33
-rw-r--r--recipes/portmap/portmap_5-25.bb1
-rw-r--r--recipes/portmap/portmap_5-26.bb1
-rw-r--r--recipes/portmap/portmap_5-9.bb3
-rw-r--r--recipes/portmap/portmap_6.0.bb22
15 files changed, 488 insertions, 0 deletions
diff --git a/recipes/portmap/files/make.patch b/recipes/portmap/files/make.patch
new file mode 100644
index 0000000000..2b83130437
--- /dev/null
+++ b/recipes/portmap/files/make.patch
@@ -0,0 +1,83 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+--- portmap_5beta/Makefile~make.patch
++++ portmap_5beta/Makefile
+@@ -105,6 +105,13 @@
+ #
+ #CONST = -Dconst=
+
++DESTDIR =
++prefix = /usr
++sbindir = /sbin
++datadir = $(prefix)/share
++mandir = $(datadir)/man
++docdir = $(datadir)/doc/portmap
++
+ ### End of configurable stuff.
+ ##############################
+
+@@ -122,35 +129,38 @@
+ COPT = $(CONST) $(HOSTS_ACCESS) $(CHECK_PORT) \
+ $(SYS) -DFACILITY=$(FACILITY) $(ULONG) $(ZOMBIES) $(SA_LEN) \
+ $(LOOPBACK) $(SETPGRP)
+-CFLAGS = -Wall $(COPT) -O2 $(NSARCHS)
++CFLAGS = -Wall -O2 $(NSARCHS)
+ OBJECTS = portmap.o pmap_check.o from_local.o $(AUX)
+
+ all: portmap pmap_dump pmap_set
+
+ portmap: $(OBJECTS) # $(WRAP_DIR)/libwrap.a
+- $(CC) $(CFLAGS) -o $@ $(OBJECTS) $(WRAP_LIB) $(LIBS)
++ $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(WRAP_LIB) $(LIBS)
+
+-pmap_dump: pmap_dump.c
+- $(CC) $(CFLAGS) -o $@ $? $(LIBS)
++pmap_dump: pmap_dump.o
++ $(CC) $(LDFLAGS) -o $@ $? $(LIBS)
+
+-pmap_set: pmap_set.c
+- $(CC) $(CFLAGS) -o $@ $? $(LIBS)
++pmap_set: pmap_set.o
++ $(CC) $(LDFLAGS) -o $@ $? $(LIBS)
+
+ from_local: from_local.c
+- cc $(CFLAGS) -DTEST -o $@ from_local.c
++ $(CC) $(COPT) -DTEST $(CFLAGS) $(LDFLAGS) -o $@ from_local.c
+
+ get_myaddress: get_myaddress.c
+- cc $(CFLAGS) -DTEST -o $@ get_myaddress.c $(LIBS)
++ $(CC) $(COPT) -DTEST $(CFLAGS) $(LDFLAGS) -o $@ get_myaddress.c $(LIBS)
+
+ install: all
+- install -o root -g root -m 0755 -s portmap ${BASEDIR}/sbin
+- install -o root -g root -m 0755 -s pmap_dump ${BASEDIR}/sbin
+- install -o root -g root -m 0755 -s pmap_set ${BASEDIR}/sbin
+- install -o root -g root -m 0644 portmap.8 ${BASEDIR}/usr/share/man/man8
+- install -o root -g root -m 0644 pmap_dump.8 ${BASEDIR}/usr/share/man/man8
+- install -o root -g root -m 0644 pmap_set.8 ${BASEDIR}/usr/share/man/man8
+- cat BLURB >${BASEDIR}/usr/share/doc/portmap/portmapper.txt
+- gzip -9f ${BASEDIR}/usr/share/doc/portmap/portmapper.txt
++ install -d $(DESTDIR)/$(sbindir) \
++ $(DESTDIR)/$(docdir) \
++ $(DESTDIR)/$(mandir)/man8
++ install -m 0755 portmap $(DESTDIR)/$(sbindir)
++ install -m 0755 pmap_dump $(DESTDIR)/$(sbindir)
++ install -m 0755 pmap_set $(DESTDIR)/$(sbindir)
++ install -m 0644 portmap.8 $(DESTDIR)/$(mandir)/man8
++ install -m 0644 pmap_dump.8 $(DESTDIR)/$(mandir)/man8
++ install -m 0644 pmap_set.8 $(DESTDIR)/$(mandir)/man8
++ cat BLURB >$(DESTDIR)/$(docdir)/portmapper.txt
++ gzip -9f $(DESTDIR)/$(docdir)/portmapper.txt
+
+
+ lint:
+@@ -176,3 +186,6 @@
+ portmap.o: portmap.c
+ portmap.o: pmap_check.h Makefile
+ strerror.o: strerror.c
++
++%.o: %.c
++ $(CC) $(COPT) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $*.c -o $*.o
diff --git a/recipes/portmap/files/no-libwrap.patch b/recipes/portmap/files/no-libwrap.patch
new file mode 100644
index 0000000000..751200bf12
--- /dev/null
+++ b/recipes/portmap/files/no-libwrap.patch
@@ -0,0 +1,26 @@
+--- Makefile~ 2004-06-03 11:19:23.000000000 +0100
++++ Makefile 2004-06-03 11:24:53.000000000 +0100
+@@ -15,9 +15,9 @@
+ # no access control tables. The local system, since it runs the portmap
+ # daemon, is always treated as an authorized host.
+
+-HOSTS_ACCESS= -DHOSTS_ACCESS
++#HOSTS_ACCESS= -DHOSTS_ACCESS
+ #WRAP_LIB = $(WRAP_DIR)/libwrap.a
+-WRAP_LIB = -lwrap
++#WRAP_LIB = -lwrap
+
+ # Comment out if your RPC library does not allocate privileged ports for
+ # requests from processes with root privilege, or the new portmap will
+--- pmap_check.c~ 2004-06-03 11:24:20.000000000 +0100
++++ pmap_check.c 2004-06-03 11:24:33.000000000 +0100
+@@ -48,7 +48,9 @@
+ #endif
+ #include <sys/types.h>
+ #include <unistd.h>
++#ifdef HOSTS_ACCESS
+ #include <tcpd.h>
++#endif
+
+ extern char *inet_ntoa();
+
diff --git a/recipes/portmap/files/portmap.init b/recipes/portmap/files/portmap.init
new file mode 100755
index 0000000000..6dac207350
--- /dev/null
+++ b/recipes/portmap/files/portmap.init
@@ -0,0 +1,50 @@
+#!/bin/sh
+#
+# start/stop portmap daemon.
+
+test -f /sbin/portmap || exit 0
+
+case "$1" in
+ start)
+ echo -n "Starting portmap daemon:"
+ echo -n " portmap"
+ start-stop-daemon --start --quiet --exec /sbin/portmap
+ echo "."
+
+ if [ -f /var/run/portmap.upgrade-state ]; then
+ echo -n "Restoring old RPC service information..."
+ sleep 1 # needs a short pause or pmap_set won't work. :(
+ pmap_set </var/run/portmap.upgrade-state
+ rm -f /var/run/portmap.upgrade-state
+ echo "done."
+ fi
+
+ ;;
+ stop)
+ echo -n "Stopping portmap daemon:"
+ echo -n " portmap" ; start-stop-daemon --stop --quiet --exec /sbin/portmap
+ echo "."
+ ;;
+ reload)
+ ;;
+ force-reload)
+ $0 restart
+ ;;
+ restart)
+ pmap_dump >/var/run/portmap.state
+ $0 stop
+ $0 start
+ if [ ! -f /var/run/portmap.upgrade-state ]; then
+ sleep 1
+ pmap_set </var/run/portmap.state
+ fi
+ rm -f /var/run/portmap.state
+ ;;
+ *)
+ echo "Usage: /etc/init.d/portmap {start|stop|reload|restart}"
+ exit 1
+ ;;
+esac
+
+exit 0
+
diff --git a/recipes/portmap/portmap-5-25/make.patch b/recipes/portmap/portmap-5-25/make.patch
new file mode 100644
index 0000000000..7726846b7c
--- /dev/null
+++ b/recipes/portmap/portmap-5-25/make.patch
@@ -0,0 +1,73 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+Index: portmap_5beta/Makefile
+===================================================================
+--- portmap_5beta.orig/Makefile 2006-12-19 10:32:58.000000000 +0000
++++ portmap_5beta/Makefile 2006-12-19 10:35:54.000000000 +0000
+@@ -110,6 +110,13 @@
+ #
+ #CONST = -Dconst=
+
++DESTDIR =
++prefix = /usr
++sbindir = /sbin
++datadir = $(prefix)/share
++mandir = $(datadir)/man
++docdir = $(datadir)/doc/portmap
++
+ ### End of configurable stuff.
+ ##############################
+
+@@ -127,7 +134,7 @@
+ COPT = $(CONST) $(HOSTS_ACCESS) $(CHECK_PORT) \
+ $(SYS) -DFACILITY=$(FACILITY) $(ULONG) $(ZOMBIES) $(BROKEN_PIPE) \
+ $(SA_LEN) $(LOOPBACK) $(SETPGRP)
+-CFLAGS = -Wall $(COPT) -O2 $(NSARCHS)
++CFLAGS = -Wall -O2 $(NSARCHS)
+ OBJECTS = portmap.o pmap_check.o from_local.o $(AUX)
+
+ all: portmap pmap_dump pmap_set
+@@ -142,20 +149,23 @@
+ $(CC) $(CFLAGS) -o $@ $? $(LIBS)
+
+ from_local: from_local.c
+- cc $(CFLAGS) -DTEST -o $@ from_local.c
++ $(CC) $(COPT) -DTEST $(CFLAGS) $(LDFLAGS) -o $@ from_local.c
+
+ get_myaddress: get_myaddress.c
+- cc $(CFLAGS) -DTEST -o $@ get_myaddress.c $(LIBS)
++ $(CC) $(COPT) -DTEST $(CFLAGS) $(LDFLAGS) -o $@ get_myaddress.c $(LIBS)
+
+ install: all
+- install -o root -g root -m 0755 -s portmap ${BASEDIR}/sbin
+- install -o root -g root -m 0755 -s pmap_dump ${BASEDIR}/sbin
+- install -o root -g root -m 0755 -s pmap_set ${BASEDIR}/sbin
+- install -o root -g root -m 0644 portmap.8 ${BASEDIR}/usr/share/man/man8
+- install -o root -g root -m 0644 pmap_dump.8 ${BASEDIR}/usr/share/man/man8
+- install -o root -g root -m 0644 pmap_set.8 ${BASEDIR}/usr/share/man/man8
+- cat BLURB >${BASEDIR}/usr/share/doc/portmap/portmapper.txt
+- gzip -9f ${BASEDIR}/usr/share/doc/portmap/portmapper.txt
++ install -d $(DESTDIR)/$(sbindir) \
++ $(DESTDIR)/$(docdir) \
++ $(DESTDIR)/$(mandir)/man8
++ install -m 0755 portmap ${DESTDIR}/sbin
++ install -m 0755 pmap_dump ${DESTDIR}/sbin
++ install -m 0755 pmap_set ${DESTDIR}/sbin
++ install -m 0644 portmap.8 ${DESTDIR}/usr/share/man/man8
++ install -m 0644 pmap_dump.8 ${DESTDIR}/usr/share/man/man8
++ install -m 0644 pmap_set.8 ${DESTDIR}/usr/share/man/man8
++ cat BLURB >${DESTDIR}/usr/share/doc/portmap/portmapper.txt
++ gzip -9f ${DESTDIR}/usr/share/doc/portmap/portmapper.txt
+
+
+ lint:
+@@ -181,3 +191,6 @@
+ portmap.o: portmap.c
+ portmap.o: pmap_check.h Makefile
+ strerror.o: strerror.c
++
++%.o: %.c
++ $(CC) $(COPT) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $*.c -o $*.o
diff --git a/recipes/portmap/portmap-5-26/make.patch b/recipes/portmap/portmap-5-26/make.patch
new file mode 100644
index 0000000000..7726846b7c
--- /dev/null
+++ b/recipes/portmap/portmap-5-26/make.patch
@@ -0,0 +1,73 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+Index: portmap_5beta/Makefile
+===================================================================
+--- portmap_5beta.orig/Makefile 2006-12-19 10:32:58.000000000 +0000
++++ portmap_5beta/Makefile 2006-12-19 10:35:54.000000000 +0000
+@@ -110,6 +110,13 @@
+ #
+ #CONST = -Dconst=
+
++DESTDIR =
++prefix = /usr
++sbindir = /sbin
++datadir = $(prefix)/share
++mandir = $(datadir)/man
++docdir = $(datadir)/doc/portmap
++
+ ### End of configurable stuff.
+ ##############################
+
+@@ -127,7 +134,7 @@
+ COPT = $(CONST) $(HOSTS_ACCESS) $(CHECK_PORT) \
+ $(SYS) -DFACILITY=$(FACILITY) $(ULONG) $(ZOMBIES) $(BROKEN_PIPE) \
+ $(SA_LEN) $(LOOPBACK) $(SETPGRP)
+-CFLAGS = -Wall $(COPT) -O2 $(NSARCHS)
++CFLAGS = -Wall -O2 $(NSARCHS)
+ OBJECTS = portmap.o pmap_check.o from_local.o $(AUX)
+
+ all: portmap pmap_dump pmap_set
+@@ -142,20 +149,23 @@
+ $(CC) $(CFLAGS) -o $@ $? $(LIBS)
+
+ from_local: from_local.c
+- cc $(CFLAGS) -DTEST -o $@ from_local.c
++ $(CC) $(COPT) -DTEST $(CFLAGS) $(LDFLAGS) -o $@ from_local.c
+
+ get_myaddress: get_myaddress.c
+- cc $(CFLAGS) -DTEST -o $@ get_myaddress.c $(LIBS)
++ $(CC) $(COPT) -DTEST $(CFLAGS) $(LDFLAGS) -o $@ get_myaddress.c $(LIBS)
+
+ install: all
+- install -o root -g root -m 0755 -s portmap ${BASEDIR}/sbin
+- install -o root -g root -m 0755 -s pmap_dump ${BASEDIR}/sbin
+- install -o root -g root -m 0755 -s pmap_set ${BASEDIR}/sbin
+- install -o root -g root -m 0644 portmap.8 ${BASEDIR}/usr/share/man/man8
+- install -o root -g root -m 0644 pmap_dump.8 ${BASEDIR}/usr/share/man/man8
+- install -o root -g root -m 0644 pmap_set.8 ${BASEDIR}/usr/share/man/man8
+- cat BLURB >${BASEDIR}/usr/share/doc/portmap/portmapper.txt
+- gzip -9f ${BASEDIR}/usr/share/doc/portmap/portmapper.txt
++ install -d $(DESTDIR)/$(sbindir) \
++ $(DESTDIR)/$(docdir) \
++ $(DESTDIR)/$(mandir)/man8
++ install -m 0755 portmap ${DESTDIR}/sbin
++ install -m 0755 pmap_dump ${DESTDIR}/sbin
++ install -m 0755 pmap_set ${DESTDIR}/sbin
++ install -m 0644 portmap.8 ${DESTDIR}/usr/share/man/man8
++ install -m 0644 pmap_dump.8 ${DESTDIR}/usr/share/man/man8
++ install -m 0644 pmap_set.8 ${DESTDIR}/usr/share/man/man8
++ cat BLURB >${DESTDIR}/usr/share/doc/portmap/portmapper.txt
++ gzip -9f ${DESTDIR}/usr/share/doc/portmap/portmapper.txt
+
+
+ lint:
+@@ -181,3 +191,6 @@
+ portmap.o: portmap.c
+ portmap.o: pmap_check.h Makefile
+ strerror.o: strerror.c
++
++%.o: %.c
++ $(CC) $(COPT) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $*.c -o $*.o
diff --git a/recipes/portmap/portmap-6.0/destdir-no-strip.patch b/recipes/portmap/portmap-6.0/destdir-no-strip.patch
new file mode 100644
index 0000000000..a1563c7141
--- /dev/null
+++ b/recipes/portmap/portmap-6.0/destdir-no-strip.patch
@@ -0,0 +1,44 @@
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sun, 13 May 2007 21:15:12 +0000 (-0400)
+Subject: respect DESTDIR and dont use -s with install
+X-Git-Url: http://neil.brown.name/git?p=portmap;a=commitdiff_plain;h=603c59b978c04df2354f68d4a2dc676a758ff46d
+
+respect DESTDIR and dont use -s with install
+
+$(DESTDIR) is the standard for installing into other trees, not $(BASEDIR) ...
+so I've converted the Makefile to use that. I've also left in $(BASEDIR) as a
+default to support old installs; not sure if you'd just cut it.
+
+Stripping should be left to the person to handle, not automatically done by
+the install step. Also, `install -s` always calls `strip` which is
+wrong/undesired in cross-compiling scenarios.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+Signed-off-by: Neil Brown <neilb@suse.de>
+---
+
+diff --git a/Makefile b/Makefile
+index 9e9a4b4..5343428 100644
+--- a/Makefile
++++ b/Makefile
+@@ -135,13 +135,14 @@ from_local: CPPFLAGS += -DTEST
+ portmap.man : portmap.8
+ sed $(MAN_SED) < portmap.8 > portmap.man
+
++DESTDIR = $(BASEDIR)
+ install: all
+- install -o root -g root -m 0755 -s portmap ${BASEDIR}/sbin
+- install -o root -g root -m 0755 -s pmap_dump ${BASEDIR}/sbin
+- install -o root -g root -m 0755 -s pmap_set ${BASEDIR}/sbin
+- install -o root -g root -m 0644 portmap.man ${BASEDIR}/usr/share/man/man8/portmap.8
+- install -o root -g root -m 0644 pmap_dump.8 ${BASEDIR}/usr/share/man/man8
+- install -o root -g root -m 0644 pmap_set.8 ${BASEDIR}/usr/share/man/man8
++ install -o root -g root -m 0755 portmap $(DESTDIR)/sbin
++ install -o root -g root -m 0755 pmap_dump $(DESTDIR)/sbin
++ install -o root -g root -m 0755 pmap_set $(DESTDIR)/sbin
++ install -o root -g root -m 0644 portmap.man $(DESTDIR)/usr/share/man/man8/portmap.8
++ install -o root -g root -m 0644 pmap_dump.8 $(DESTDIR)/usr/share/man/man8
++ install -o root -g root -m 0644 pmap_set.8 $(DESTDIR)/usr/share/man/man8
+
+ clean:
+ rm -f *.o portmap pmap_dump pmap_set from_local \
diff --git a/recipes/portmap/portmap-6.0/no-libwrap.patch b/recipes/portmap/portmap-6.0/no-libwrap.patch
new file mode 100644
index 0000000000..a880da6253
--- /dev/null
+++ b/recipes/portmap/portmap-6.0/no-libwrap.patch
@@ -0,0 +1,15 @@
+Index: Makefile
+===================================================================
+--- Makefile.orig 2007-05-15 16:00:17.000000000 +0200
++++ Makefile 2007-05-15 16:00:55.000000000 +0200
+@@ -19,8 +19,8 @@
+ # USE_DNS to add hostname tests in hosts.allow/deny.
+
+ ifeq ($(NO_TCP_WRAPPER),)
+-CPPFLAGS += -DHOSTS_ACCESS
+-WRAP_LIB = -lwrap
++#CPPFLAGS += -DHOSTS_ACCESS
++#WRAP_LIB = -lwrap
+ ifdef USE_DNS
+ CPPFLAGS += -DENABLE_DNS
+ MAN_SED += -e 's/USE_DNS/yes/'
diff --git a/recipes/portmap/portmap-6.0/no-pie.patch b/recipes/portmap/portmap-6.0/no-pie.patch
new file mode 100644
index 0000000000..4d7e2daae4
--- /dev/null
+++ b/recipes/portmap/portmap-6.0/no-pie.patch
@@ -0,0 +1,14 @@
+--- portmap_6.0/Makefile.orig 2007-11-21 00:35:52.000000000 -0600
++++ portmap_6.0/Makefile 2007-11-21 00:37:23.000000000 -0600
+@@ -125,9 +125,9 @@
+ all: portmap pmap_dump pmap_set portmap.man
+
+ CPPFLAGS += $(HOSTS_ACCESS)
+-portmap: CFLAGS += -fpie
++#portmap: CFLAGS += -fpie
+ portmap: LDLIBS += $(WRAP_LIB)
+-portmap: LDFLAGS += -pie
++#portmap: LDFLAGS += -pie
+ portmap: portmap.o pmap_check.o from_local.o
+
+ from_local: CPPFLAGS += -DTEST
diff --git a/recipes/portmap/portmap-6.0/no-tcpd-support.patch b/recipes/portmap/portmap-6.0/no-tcpd-support.patch
new file mode 100644
index 0000000000..da55f3799d
--- /dev/null
+++ b/recipes/portmap/portmap-6.0/no-tcpd-support.patch
@@ -0,0 +1,28 @@
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sun, 13 May 2007 21:17:32 +0000 (-0400)
+Subject: fix building with tcpd support disabled
+X-Git-Url: http://neil.brown.name/git?p=portmap;a=commitdiff_plain;h=7847207aed1b44faf077eed14a9ac9c68244eba5
+
+fix building with tcpd support disabled
+
+Make sure pmap_check.c only includes tcpd.h when HOSTS_ACCESS is defined.
+
+Signed-off-by: Timothy Redaelli <drizzt@gentoo.org>
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+Signed-off-by: Neil Brown <neilb@suse.de>
+---
+
+diff --git a/pmap_check.c b/pmap_check.c
+index 84f2c12..443a822 100644
+--- a/pmap_check.c
++++ b/pmap_check.c
+@@ -44,7 +44,9 @@
+ #include <netinet/in.h>
+ #include <rpc/rpcent.h>
+ #endif
++#ifdef HOSTS_ACCESS
+ #include <tcpd.h>
++#endif
+ #include <arpa/inet.h>
+ #include <grp.h>
+
diff --git a/recipes/portmap/portmap-unslung_5-9.bb b/recipes/portmap/portmap-unslung_5-9.bb
new file mode 100644
index 0000000000..c86ae1e892
--- /dev/null
+++ b/recipes/portmap/portmap-unslung_5-9.bb
@@ -0,0 +1,22 @@
+DESCRIPTION = "RPC program number mapper."
+SECTION = "console/network"
+LICENSE = "GPL"
+PR = "r2"
+COMPATIBLE_MACHINE = "nslu2"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/p/portmap/portmap_5.orig.tar.gz \
+ ${DEBIAN_MIRROR}/main/p/portmap/portmap_${PV}.diff.gz;patch=1 \
+ file://no-libwrap.patch;patch=1;pnum=0 \
+ file://portmap.init \
+ file://make.patch;patch=1"
+S = "${WORKDIR}/portmap_5beta"
+
+sbindir = "/sbin"
+
+do_compile() {
+ oe_runmake
+}
+
+do_install() {
+ oe_runmake 'docdir=${datadir}/doc/portmap' 'DESTDIR=${D}' install
+}
diff --git a/recipes/portmap/portmap.inc b/recipes/portmap/portmap.inc
new file mode 100644
index 0000000000..f73ac0e048
--- /dev/null
+++ b/recipes/portmap/portmap.inc
@@ -0,0 +1,33 @@
+DESCRIPTION = "RPC program number mapper."
+SECTION = "console/network"
+LICENSE = "GPL"
+DEPENDS = "fakeroot-native"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/p/portmap/portmap_5.orig.tar.gz \
+ ${DEBIAN_MIRROR}/main/p/portmap/portmap_${PV}.diff.gz;patch=1 \
+ file://no-libwrap.patch;patch=1;pnum=0 \
+ file://portmap.init \
+ file://make.patch;patch=1"
+S = "${WORKDIR}/portmap_5beta"
+
+INITSCRIPT_NAME = "portmap"
+INITSCRIPT_PARAMS = "start 43 S . start 32 0 6 . stop 81 1 ."
+
+inherit update-rc.d
+
+sbindir = "/sbin"
+
+do_compile() {
+ oe_runmake
+}
+
+fakeroot do_install() {
+ install -d ${D}${sysconfdir}/init.d
+ install -d ${D}${base_sbindir}
+ install -m 0755 ${WORKDIR}/portmap.init ${D}${sysconfdir}/init.d/portmap
+ oe_runmake 'docdir=${docdir}/portmap' 'DESTDIR=${D}' install
+}
+
+PACKAGES =+ "portmap-utils"
+FILES_portmap-utils = "/sbin/pmap_set /sbin/pmap_dump"
+FILES_${PN}-doc += "${docdir}"
diff --git a/recipes/portmap/portmap_5-25.bb b/recipes/portmap/portmap_5-25.bb
new file mode 100644
index 0000000000..064679e7f0
--- /dev/null
+++ b/recipes/portmap/portmap_5-25.bb
@@ -0,0 +1 @@
+require portmap.inc
diff --git a/recipes/portmap/portmap_5-26.bb b/recipes/portmap/portmap_5-26.bb
new file mode 100644
index 0000000000..064679e7f0
--- /dev/null
+++ b/recipes/portmap/portmap_5-26.bb
@@ -0,0 +1 @@
+require portmap.inc
diff --git a/recipes/portmap/portmap_5-9.bb b/recipes/portmap/portmap_5-9.bb
new file mode 100644
index 0000000000..348a3060e4
--- /dev/null
+++ b/recipes/portmap/portmap_5-9.bb
@@ -0,0 +1,3 @@
+require portmap.inc
+
+PR = "r5"
diff --git a/recipes/portmap/portmap_6.0.bb b/recipes/portmap/portmap_6.0.bb
new file mode 100644
index 0000000000..cb94a48fb7
--- /dev/null
+++ b/recipes/portmap/portmap_6.0.bb
@@ -0,0 +1,22 @@
+require portmap.inc
+
+PR = "r3"
+
+SRC_URI = "http://www.sourcefiles.org/Networking/Tools/Miscellanenous/portmap-6.0.tgz \
+ file://destdir-no-strip.patch;patch=1 \
+ file://no-tcpd-support.patch;patch=1 \
+ file://no-libwrap.patch;patch=1;pnum=0 \
+ file://portmap.init "
+
+# Remove this patch when SlugOS upgrades to binutils 1.18
+SRC_URI_append_slugos = " file://no-pie.patch;patch=1 "
+
+S = "${WORKDIR}/${PN}_${PV}/"
+
+CPPFLAGS += "-DFACILITY=LOG_DAEMON -DENABLE_DNS"
+
+fakeroot do_install() {
+ install -d ${D}${mandir}/man8/ ${D}${base_sbindir} ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/portmap.init ${D}${sysconfdir}/init.d/portmap
+ oe_runmake install DESTDIR=${D}
+}