summaryrefslogtreecommitdiff
path: root/meta/packages/portmap
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-07-21 10:10:31 +0000
committerRichard Purdie <richard@openedhand.com>2006-07-21 10:10:31 +0000
commitb2f192faabe412adce79534e22efe9fb69ee40e2 (patch)
tree7076c49d4286f8a1733650bd8fbc7161af200d57 /meta/packages/portmap
parent2cf0eadf9f730027833af802d7e6c90b44248f80 (diff)
downloadopenembedded-core-b2f192faabe412adce79534e22efe9fb69ee40e2.tar.gz
openembedded-core-b2f192faabe412adce79534e22efe9fb69ee40e2.tar.bz2
openembedded-core-b2f192faabe412adce79534e22efe9fb69ee40e2.zip
Rename /openembedded/ -> /meta/
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@530 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/portmap')
-rw-r--r--meta/packages/portmap/files/make.patch83
-rw-r--r--meta/packages/portmap/files/no-libwrap.patch26
-rwxr-xr-xmeta/packages/portmap/files/portmap.init50
-rw-r--r--meta/packages/portmap/portmap_5-9.bb33
4 files changed, 192 insertions, 0 deletions
diff --git a/meta/packages/portmap/files/make.patch b/meta/packages/portmap/files/make.patch
new file mode 100644
index 0000000000..2b83130437
--- /dev/null
+++ b/meta/packages/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/meta/packages/portmap/files/no-libwrap.patch b/meta/packages/portmap/files/no-libwrap.patch
new file mode 100644
index 0000000000..751200bf12
--- /dev/null
+++ b/meta/packages/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/meta/packages/portmap/files/portmap.init b/meta/packages/portmap/files/portmap.init
new file mode 100755
index 0000000000..6dac207350
--- /dev/null
+++ b/meta/packages/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/meta/packages/portmap/portmap_5-9.bb b/meta/packages/portmap/portmap_5-9.bb
new file mode 100644
index 0000000000..76d66e9ad9
--- /dev/null
+++ b/meta/packages/portmap/portmap_5-9.bb
@@ -0,0 +1,33 @@
+DESCRIPTION = "RPC program number mapper."
+SECTION = "console/network"
+LICENSE = "GPL"
+PR = "r5"
+
+SRC_URI = "http://www.uk.debian.org/debian/pool/main/p/portmap/portmap_5.orig.tar.gz \
+ http://www.uk.debian.org/debian/pool/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"
+
+PACKAGES =+ "portmap-utils"
+FILES_portmap-utils = "/sbin/pmap_set /sbin/pmap_dump"
+FILES_${PN}-doc += "${docdir}"
+
+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
+}
+
+do_install() {
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/portmap.init ${D}${sysconfdir}/init.d/portmap
+ oe_runmake 'docdir=${docdir}/portmap' \
+ 'DESTDIR=${D}' install
+}