summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/portmap
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-09-01 18:09:11 (GMT)
committerRichard Purdie <rpurdie@linux.intel.com>2010-09-01 18:09:57 (GMT)
commitd62ee7eaf2ba025c3f64b2d4e10dc7cec4637612 (patch)
treef36fe3008f36ff75cbdd31b630f8f13f1f205ebb /meta/recipes-connectivity/portmap
parentcaab7fc509bf27706ff3248689f6afd04225cfda (diff)
downloadpoky-d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612.tar.gz
packages: Separate out most of the remaining packages into recipes
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-connectivity/portmap')
-rw-r--r--meta/recipes-connectivity/portmap/portmap-6.0/destdir-no-strip.patch44
-rw-r--r--meta/recipes-connectivity/portmap/portmap-6.0/tcpd-config.patch28
-rw-r--r--meta/recipes-connectivity/portmap/portmap.inc31
-rwxr-xr-xmeta/recipes-connectivity/portmap/portmap/portmap.init59
-rw-r--r--meta/recipes-connectivity/portmap/portmap_6.0.bb20
5 files changed, 182 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/portmap/portmap-6.0/destdir-no-strip.patch b/meta/recipes-connectivity/portmap/portmap-6.0/destdir-no-strip.patch
new file mode 100644
index 0000000..a1563c7
--- /dev/null
+++ b/meta/recipes-connectivity/portmap/portmap-6.0/destdir-no-strip.patch
@@ -0,0 +1,44 @@
1From: Mike Frysinger <vapier@gentoo.org>
2Date: Sun, 13 May 2007 21:15:12 +0000 (-0400)
3Subject: respect DESTDIR and dont use -s with install
4X-Git-Url: http://neil.brown.name/git?p=portmap;a=commitdiff_plain;h=603c59b978c04df2354f68d4a2dc676a758ff46d
5
6respect DESTDIR and dont use -s with install
7
8$(DESTDIR) is the standard for installing into other trees, not $(BASEDIR) ...
9so I've converted the Makefile to use that. I've also left in $(BASEDIR) as a
10default to support old installs; not sure if you'd just cut it.
11
12Stripping should be left to the person to handle, not automatically done by
13the install step. Also, `install -s` always calls `strip` which is
14wrong/undesired in cross-compiling scenarios.
15
16Signed-off-by: Mike Frysinger <vapier@gentoo.org>
17Signed-off-by: Neil Brown <neilb@suse.de>
18---
19
20diff --git a/Makefile b/Makefile
21index 9e9a4b4..5343428 100644
22--- a/Makefile
23+++ b/Makefile
24@@ -135,13 +135,14 @@ from_local: CPPFLAGS += -DTEST
25 portmap.man : portmap.8
26 sed $(MAN_SED) < portmap.8 > portmap.man
27
28+DESTDIR = $(BASEDIR)
29 install: all
30- install -o root -g root -m 0755 -s portmap ${BASEDIR}/sbin
31- install -o root -g root -m 0755 -s pmap_dump ${BASEDIR}/sbin
32- install -o root -g root -m 0755 -s pmap_set ${BASEDIR}/sbin
33- install -o root -g root -m 0644 portmap.man ${BASEDIR}/usr/share/man/man8/portmap.8
34- install -o root -g root -m 0644 pmap_dump.8 ${BASEDIR}/usr/share/man/man8
35- install -o root -g root -m 0644 pmap_set.8 ${BASEDIR}/usr/share/man/man8
36+ install -o root -g root -m 0755 portmap $(DESTDIR)/sbin
37+ install -o root -g root -m 0755 pmap_dump $(DESTDIR)/sbin
38+ install -o root -g root -m 0755 pmap_set $(DESTDIR)/sbin
39+ install -o root -g root -m 0644 portmap.man $(DESTDIR)/usr/share/man/man8/portmap.8
40+ install -o root -g root -m 0644 pmap_dump.8 $(DESTDIR)/usr/share/man/man8
41+ install -o root -g root -m 0644 pmap_set.8 $(DESTDIR)/usr/share/man/man8
42
43 clean:
44 rm -f *.o portmap pmap_dump pmap_set from_local \
diff --git a/meta/recipes-connectivity/portmap/portmap-6.0/tcpd-config.patch b/meta/recipes-connectivity/portmap/portmap-6.0/tcpd-config.patch
new file mode 100644
index 0000000..da55f37
--- /dev/null
+++ b/meta/recipes-connectivity/portmap/portmap-6.0/tcpd-config.patch
@@ -0,0 +1,28 @@
1From: Mike Frysinger <vapier@gentoo.org>
2Date: Sun, 13 May 2007 21:17:32 +0000 (-0400)
3Subject: fix building with tcpd support disabled
4X-Git-Url: http://neil.brown.name/git?p=portmap;a=commitdiff_plain;h=7847207aed1b44faf077eed14a9ac9c68244eba5
5
6fix building with tcpd support disabled
7
8Make sure pmap_check.c only includes tcpd.h when HOSTS_ACCESS is defined.
9
10Signed-off-by: Timothy Redaelli <drizzt@gentoo.org>
11Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12Signed-off-by: Neil Brown <neilb@suse.de>
13---
14
15diff --git a/pmap_check.c b/pmap_check.c
16index 84f2c12..443a822 100644
17--- a/pmap_check.c
18+++ b/pmap_check.c
19@@ -44,7 +44,9 @@
20 #include <netinet/in.h>
21 #include <rpc/rpcent.h>
22 #endif
23+#ifdef HOSTS_ACCESS
24 #include <tcpd.h>
25+#endif
26 #include <arpa/inet.h>
27 #include <grp.h>
28
diff --git a/meta/recipes-connectivity/portmap/portmap.inc b/meta/recipes-connectivity/portmap/portmap.inc
new file mode 100644
index 0000000..d563ad5
--- /dev/null
+++ b/meta/recipes-connectivity/portmap/portmap.inc
@@ -0,0 +1,31 @@
1DESCRIPTION = "RPC program number mapper."
2HOMEPAGE = "http://neil.brown.name/portmap/"
3SECTION = "console/network"
4LICENSE = "BSD"
5LIC_FILES_CHKSUM = "file://portmap.c;beginline=2;endline=31;md5=51ff67e66ec84b2009b017b1f94afbf4 \
6 file://from_local.c;beginline=9;endline=35;md5=1bec938a2268b8b423c58801ace3adc1"
7DEPENDS = "virtual/fakeroot-native"
8
9SRC_URI = "${DEBIAN_MIRROR}/main/p/portmap/portmap_5.orig.tar.gz \
10 ${DEBIAN_MIRROR}/main/p/portmap/portmap_${PV}.diff.gz;patch=1 \
11 file://portmap.init \
12 file://make.patch;apply=yes"
13S = "${WORKDIR}/portmap_5beta"
14
15INITSCRIPT_NAME = "portmap"
16INITSCRIPT_PARAMS = "start 43 S . start 32 0 6 . stop 81 1 ."
17
18inherit update-rc.d
19
20sbindir = "/sbin"
21
22fakeroot do_install() {
23 install -d ${D}${sysconfdir}/init.d
24 install -d ${D}${base_sbindir}
25 install -m 0755 ${WORKDIR}/portmap.init ${D}${sysconfdir}/init.d/portmap
26 oe_runmake 'docdir=${docdir}/portmap' 'DESTDIR=${D}' install
27}
28
29PACKAGES =+ "portmap-utils"
30FILES_portmap-utils = "/sbin/pmap_set /sbin/pmap_dump"
31FILES_${PN}-doc += "${docdir}"
diff --git a/meta/recipes-connectivity/portmap/portmap/portmap.init b/meta/recipes-connectivity/portmap/portmap/portmap.init
new file mode 100755
index 0000000..e46513e
--- /dev/null
+++ b/meta/recipes-connectivity/portmap/portmap/portmap.init
@@ -0,0 +1,59 @@
1#!/bin/sh
2#
3### BEGIN INIT INFO
4# Provides: portmap
5# Required-Start: $network
6# Required-Stop: $network
7# Default-Start: S 2 3 4 5
8# Default-Stop: 0 1 6
9# Short-Description: The RPC portmapper
10# Description: Portmap is a server that converts RPC (Remote
11# Procedure Call) program numbers into DARPA
12# protocol port numbers. It must be running in
13# order to make RPC calls. Services that use
14# RPC include NFS and NIS.
15### END INIT INFO
16
17test -f /sbin/portmap || exit 0
18
19case "$1" in
20 start)
21 echo "Starting portmap daemon..."
22 start-stop-daemon --start --quiet --exec /sbin/portmap
23
24 if [ -f /var/run/portmap.upgrade-state ]; then
25 echo "Restoring old RPC service information..."
26 sleep 1 # needs a short pause or pmap_set won't work. :(
27 pmap_set </var/run/portmap.upgrade-state
28 rm -f /var/run/portmap.upgrade-state
29 echo "done."
30 fi
31
32 ;;
33 stop)
34 echo "Stopping portmap daemon..."
35 start-stop-daemon --stop --quiet --exec /sbin/portmap
36 ;;
37 reload)
38 ;;
39 force-reload)
40 $0 restart
41 ;;
42 restart)
43 pmap_dump >/var/run/portmap.state
44 $0 stop
45 $0 start
46 if [ ! -f /var/run/portmap.upgrade-state ]; then
47 sleep 1
48 pmap_set </var/run/portmap.state
49 fi
50 rm -f /var/run/portmap.state
51 ;;
52 *)
53 echo "Usage: /etc/init.d/portmap {start|stop|reload|restart}"
54 exit 1
55 ;;
56esac
57
58exit 0
59
diff --git a/meta/recipes-connectivity/portmap/portmap_6.0.bb b/meta/recipes-connectivity/portmap/portmap_6.0.bb
new file mode 100644
index 0000000..49ac1d8
--- /dev/null
+++ b/meta/recipes-connectivity/portmap/portmap_6.0.bb
@@ -0,0 +1,20 @@
1require portmap.inc
2
3DEPENDS += "tcp-wrappers"
4PR = "r7"
5
6SRC_URI = "http://www.sourcefiles.org/Networking/Tools/Miscellanenous/portmap-6.0.tgz \
7 file://destdir-no-strip.patch \
8 file://tcpd-config.patch \
9 file://portmap.init"
10
11S = "${WORKDIR}/${BPN}_${PV}/"
12
13CPPFLAGS += "-DFACILITY=LOG_DAEMON -DENABLE_DNS -DHOSTS_ACCESS"
14CFLAGS += "-Wall -Wstrict-prototypes -fPIC"
15
16fakeroot do_install() {
17 install -d ${D}${mandir}/man8/ ${D}${base_sbindir} ${D}${sysconfdir}/init.d
18 install -m 0755 ${WORKDIR}/portmap.init ${D}${sysconfdir}/init.d/portmap
19 oe_runmake install DESTDIR=${D}
20}