summaryrefslogtreecommitdiffstats
path: root/meta/packages/portmap/files
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/files
parent2cf0eadf9f730027833af802d7e6c90b44248f80 (diff)
downloadpoky-b2f192faabe412adce79534e22efe9fb69ee40e2.tar.gz
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/files')
-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
3 files changed, 159 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 @@
1
2#
3# Patch managed by http://www.holgerschurig.de/patcher.html
4#
5
6--- portmap_5beta/Makefile~make.patch
7+++ portmap_5beta/Makefile
8@@ -105,6 +105,13 @@
9 #
10 #CONST = -Dconst=
11
12+DESTDIR =
13+prefix = /usr
14+sbindir = /sbin
15+datadir = $(prefix)/share
16+mandir = $(datadir)/man
17+docdir = $(datadir)/doc/portmap
18+
19 ### End of configurable stuff.
20 ##############################
21
22@@ -122,35 +129,38 @@
23 COPT = $(CONST) $(HOSTS_ACCESS) $(CHECK_PORT) \
24 $(SYS) -DFACILITY=$(FACILITY) $(ULONG) $(ZOMBIES) $(SA_LEN) \
25 $(LOOPBACK) $(SETPGRP)
26-CFLAGS = -Wall $(COPT) -O2 $(NSARCHS)
27+CFLAGS = -Wall -O2 $(NSARCHS)
28 OBJECTS = portmap.o pmap_check.o from_local.o $(AUX)
29
30 all: portmap pmap_dump pmap_set
31
32 portmap: $(OBJECTS) # $(WRAP_DIR)/libwrap.a
33- $(CC) $(CFLAGS) -o $@ $(OBJECTS) $(WRAP_LIB) $(LIBS)
34+ $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(WRAP_LIB) $(LIBS)
35
36-pmap_dump: pmap_dump.c
37- $(CC) $(CFLAGS) -o $@ $? $(LIBS)
38+pmap_dump: pmap_dump.o
39+ $(CC) $(LDFLAGS) -o $@ $? $(LIBS)
40
41-pmap_set: pmap_set.c
42- $(CC) $(CFLAGS) -o $@ $? $(LIBS)
43+pmap_set: pmap_set.o
44+ $(CC) $(LDFLAGS) -o $@ $? $(LIBS)
45
46 from_local: from_local.c
47- cc $(CFLAGS) -DTEST -o $@ from_local.c
48+ $(CC) $(COPT) -DTEST $(CFLAGS) $(LDFLAGS) -o $@ from_local.c
49
50 get_myaddress: get_myaddress.c
51- cc $(CFLAGS) -DTEST -o $@ get_myaddress.c $(LIBS)
52+ $(CC) $(COPT) -DTEST $(CFLAGS) $(LDFLAGS) -o $@ get_myaddress.c $(LIBS)
53
54 install: all
55- install -o root -g root -m 0755 -s portmap ${BASEDIR}/sbin
56- install -o root -g root -m 0755 -s pmap_dump ${BASEDIR}/sbin
57- install -o root -g root -m 0755 -s pmap_set ${BASEDIR}/sbin
58- install -o root -g root -m 0644 portmap.8 ${BASEDIR}/usr/share/man/man8
59- install -o root -g root -m 0644 pmap_dump.8 ${BASEDIR}/usr/share/man/man8
60- install -o root -g root -m 0644 pmap_set.8 ${BASEDIR}/usr/share/man/man8
61- cat BLURB >${BASEDIR}/usr/share/doc/portmap/portmapper.txt
62- gzip -9f ${BASEDIR}/usr/share/doc/portmap/portmapper.txt
63+ install -d $(DESTDIR)/$(sbindir) \
64+ $(DESTDIR)/$(docdir) \
65+ $(DESTDIR)/$(mandir)/man8
66+ install -m 0755 portmap $(DESTDIR)/$(sbindir)
67+ install -m 0755 pmap_dump $(DESTDIR)/$(sbindir)
68+ install -m 0755 pmap_set $(DESTDIR)/$(sbindir)
69+ install -m 0644 portmap.8 $(DESTDIR)/$(mandir)/man8
70+ install -m 0644 pmap_dump.8 $(DESTDIR)/$(mandir)/man8
71+ install -m 0644 pmap_set.8 $(DESTDIR)/$(mandir)/man8
72+ cat BLURB >$(DESTDIR)/$(docdir)/portmapper.txt
73+ gzip -9f $(DESTDIR)/$(docdir)/portmapper.txt
74
75
76 lint:
77@@ -176,3 +186,6 @@
78 portmap.o: portmap.c
79 portmap.o: pmap_check.h Makefile
80 strerror.o: strerror.c
81+
82+%.o: %.c
83+ $(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 @@
1--- Makefile~ 2004-06-03 11:19:23.000000000 +0100
2+++ Makefile 2004-06-03 11:24:53.000000000 +0100
3@@ -15,9 +15,9 @@
4 # no access control tables. The local system, since it runs the portmap
5 # daemon, is always treated as an authorized host.
6
7-HOSTS_ACCESS= -DHOSTS_ACCESS
8+#HOSTS_ACCESS= -DHOSTS_ACCESS
9 #WRAP_LIB = $(WRAP_DIR)/libwrap.a
10-WRAP_LIB = -lwrap
11+#WRAP_LIB = -lwrap
12
13 # Comment out if your RPC library does not allocate privileged ports for
14 # requests from processes with root privilege, or the new portmap will
15--- pmap_check.c~ 2004-06-03 11:24:20.000000000 +0100
16+++ pmap_check.c 2004-06-03 11:24:33.000000000 +0100
17@@ -48,7 +48,9 @@
18 #endif
19 #include <sys/types.h>
20 #include <unistd.h>
21+#ifdef HOSTS_ACCESS
22 #include <tcpd.h>
23+#endif
24
25 extern char *inet_ntoa();
26
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 @@
1#!/bin/sh
2#
3# start/stop portmap daemon.
4
5test -f /sbin/portmap || exit 0
6
7case "$1" in
8 start)
9 echo -n "Starting portmap daemon:"
10 echo -n " portmap"
11 start-stop-daemon --start --quiet --exec /sbin/portmap
12 echo "."
13
14 if [ -f /var/run/portmap.upgrade-state ]; then
15 echo -n "Restoring old RPC service information..."
16 sleep 1 # needs a short pause or pmap_set won't work. :(
17 pmap_set </var/run/portmap.upgrade-state
18 rm -f /var/run/portmap.upgrade-state
19 echo "done."
20 fi
21
22 ;;
23 stop)
24 echo -n "Stopping portmap daemon:"
25 echo -n " portmap" ; start-stop-daemon --stop --quiet --exec /sbin/portmap
26 echo "."
27 ;;
28 reload)
29 ;;
30 force-reload)
31 $0 restart
32 ;;
33 restart)
34 pmap_dump >/var/run/portmap.state
35 $0 stop
36 $0 start
37 if [ ! -f /var/run/portmap.upgrade-state ]; then
38 sleep 1
39 pmap_set </var/run/portmap.state
40 fi
41 rm -f /var/run/portmap.state
42 ;;
43 *)
44 echo "Usage: /etc/init.d/portmap {start|stop|reload|restart}"
45 exit 1
46 ;;
47esac
48
49exit 0
50