diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-01 19:09:11 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-01 19:09:57 +0100 |
commit | d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612 (patch) | |
tree | f36fe3008f36ff75cbdd31b630f8f13f1f205ebb /meta/recipes-connectivity/portmap | |
parent | caab7fc509bf27706ff3248689f6afd04225cfda (diff) | |
download | poky-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')
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 0000000000..a1563c7141 --- /dev/null +++ b/meta/recipes-connectivity/portmap/portmap-6.0/destdir-no-strip.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | From: Mike Frysinger <vapier@gentoo.org> | ||
2 | Date: Sun, 13 May 2007 21:15:12 +0000 (-0400) | ||
3 | Subject: respect DESTDIR and dont use -s with install | ||
4 | X-Git-Url: http://neil.brown.name/git?p=portmap;a=commitdiff_plain;h=603c59b978c04df2354f68d4a2dc676a758ff46d | ||
5 | |||
6 | respect DESTDIR and dont use -s with install | ||
7 | |||
8 | $(DESTDIR) is the standard for installing into other trees, not $(BASEDIR) ... | ||
9 | so I've converted the Makefile to use that. I've also left in $(BASEDIR) as a | ||
10 | default to support old installs; not sure if you'd just cut it. | ||
11 | |||
12 | Stripping should be left to the person to handle, not automatically done by | ||
13 | the install step. Also, `install -s` always calls `strip` which is | ||
14 | wrong/undesired in cross-compiling scenarios. | ||
15 | |||
16 | Signed-off-by: Mike Frysinger <vapier@gentoo.org> | ||
17 | Signed-off-by: Neil Brown <neilb@suse.de> | ||
18 | --- | ||
19 | |||
20 | diff --git a/Makefile b/Makefile | ||
21 | index 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 0000000000..da55f3799d --- /dev/null +++ b/meta/recipes-connectivity/portmap/portmap-6.0/tcpd-config.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | From: Mike Frysinger <vapier@gentoo.org> | ||
2 | Date: Sun, 13 May 2007 21:17:32 +0000 (-0400) | ||
3 | Subject: fix building with tcpd support disabled | ||
4 | X-Git-Url: http://neil.brown.name/git?p=portmap;a=commitdiff_plain;h=7847207aed1b44faf077eed14a9ac9c68244eba5 | ||
5 | |||
6 | fix building with tcpd support disabled | ||
7 | |||
8 | Make sure pmap_check.c only includes tcpd.h when HOSTS_ACCESS is defined. | ||
9 | |||
10 | Signed-off-by: Timothy Redaelli <drizzt@gentoo.org> | ||
11 | Signed-off-by: Mike Frysinger <vapier@gentoo.org> | ||
12 | Signed-off-by: Neil Brown <neilb@suse.de> | ||
13 | --- | ||
14 | |||
15 | diff --git a/pmap_check.c b/pmap_check.c | ||
16 | index 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 0000000000..d563ad5b5a --- /dev/null +++ b/meta/recipes-connectivity/portmap/portmap.inc | |||
@@ -0,0 +1,31 @@ | |||
1 | DESCRIPTION = "RPC program number mapper." | ||
2 | HOMEPAGE = "http://neil.brown.name/portmap/" | ||
3 | SECTION = "console/network" | ||
4 | LICENSE = "BSD" | ||
5 | LIC_FILES_CHKSUM = "file://portmap.c;beginline=2;endline=31;md5=51ff67e66ec84b2009b017b1f94afbf4 \ | ||
6 | file://from_local.c;beginline=9;endline=35;md5=1bec938a2268b8b423c58801ace3adc1" | ||
7 | DEPENDS = "virtual/fakeroot-native" | ||
8 | |||
9 | SRC_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" | ||
13 | S = "${WORKDIR}/portmap_5beta" | ||
14 | |||
15 | INITSCRIPT_NAME = "portmap" | ||
16 | INITSCRIPT_PARAMS = "start 43 S . start 32 0 6 . stop 81 1 ." | ||
17 | |||
18 | inherit update-rc.d | ||
19 | |||
20 | sbindir = "/sbin" | ||
21 | |||
22 | fakeroot 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 | |||
29 | PACKAGES =+ "portmap-utils" | ||
30 | FILES_portmap-utils = "/sbin/pmap_set /sbin/pmap_dump" | ||
31 | FILES_${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 0000000000..e46513e115 --- /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 | |||
17 | test -f /sbin/portmap || exit 0 | ||
18 | |||
19 | case "$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 | ;; | ||
56 | esac | ||
57 | |||
58 | exit 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 0000000000..49ac1d8332 --- /dev/null +++ b/meta/recipes-connectivity/portmap/portmap_6.0.bb | |||
@@ -0,0 +1,20 @@ | |||
1 | require portmap.inc | ||
2 | |||
3 | DEPENDS += "tcp-wrappers" | ||
4 | PR = "r7" | ||
5 | |||
6 | SRC_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 | |||
11 | S = "${WORKDIR}/${BPN}_${PV}/" | ||
12 | |||
13 | CPPFLAGS += "-DFACILITY=LOG_DAEMON -DENABLE_DNS -DHOSTS_ACCESS" | ||
14 | CFLAGS += "-Wall -Wstrict-prototypes -fPIC" | ||
15 | |||
16 | fakeroot 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 | } | ||