updated/fixed stage3 packages with priority <= 2 (beside ipsec-tools & rarpd)
[hdw-linux/hdw-linux.git] / packages / net / portmap / makefile.patch
index eceafa9..69511a1 100644 (file)
@@ -1,5 +1,5 @@
---- ./Makefile.orig    2003-10-27 01:49:12.000000000 +0100
-+++ ./Makefile 2003-10-27 01:55:58.000000000 +0100
+--- ./Makefile.orig    2005-08-03 22:38:49.000000000 +0200
++++ ./Makefile 2005-08-03 22:43:49.000000000 +0200
 @@ -8,7 +8,7 @@
  # if you disagree. See `man 3 syslog' for examples. Some syslog versions
  # do not provide this flexibility.
@@ -7,9 +7,19 @@
 -FACILITY=LOG_MAIL
 +FACILITY=LOG_AUTH
  
- # To disable host access control, comment out the following macro definition.
- # Note: host access control requires the strtok() and strchr() routines.
-@@ -36,7 +36,7 @@
+ # To disable tcp-wrapper style access control, comment out the following
+ # macro definitions.  Access control can also be turned off by providing
+@@ -16,7 +16,8 @@
+ # daemon, is always treated as an authorized host.
+ HOSTS_ACCESS= -DHOSTS_ACCESS
+-WRAP_LIB = $(WRAP_DIR)/libwrap.a
++#WRAP_LIB = $(WRAP_DIR)/libwrap.a
++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
+@@ -71,7 +72,7 @@
  # With verbose logging on, HP-UX 9.x and AIX 4.1 leave zombies behind when
  # SIGCHLD is not ignored. Enable next macro for a fix.
  #
  
  # Uncomment the following macro if your system does not have u_long.
  #
-@@ -46,11 +46,11 @@
+@@ -81,7 +82,7 @@
  # libwrap.a object library. WRAP_DIR should specify the directory with
  # that library.
  
 -WRAP_DIR= ../tcp_wrappers
-+WRAP_DIR= /usr/lib
++WRAP_DIR= $(TCPD_DIR)
  
  # Auxiliary object files that may be missing from your C library.
  #
--AUX   = daemon.o strerror.o
-+AUX   = daemon.o
+@@ -99,22 +100,30 @@
  
- # NEXTSTEP is a little different. The following seems to work with NS 3.2
+ # Comment out if your compiler talks ANSI and understands const
  #
+-CONST   = -Dconst=
++#CONST   = -Dconst=
+ ### End of configurable stuff.
+ ##############################
++GLIBC=$(shell grep -s -c __GLIBC__ /usr/include/features.h)
++
++ifeq ($(GLIBC),0)
++LIBS   += # -lbsd
++else
++LIBS   += -lnsl
++endif
++
+ SHELL = /bin/sh
+-COPT  = $(CONST) -Dperror=xperror $(HOSTS_ACCESS) $(CHECK_PORT) \
++COPT  = $(CONST) $(HOSTS_ACCESS) $(CHECK_PORT) \
+       $(SYS) -DFACILITY=$(FACILITY) $(ULONG) $(ZOMBIES) $(SA_LEN) \
+       $(LOOPBACK) $(SETPGRP)
+-CFLAGS        = $(COPT) -O $(NSARCHS)
++CFLAGS        = -Wall $(COPT) -O2 $(NSARCHS)
+ OBJECTS       = portmap.o pmap_check.o from_local.o $(AUX)
+ all:  portmap pmap_dump pmap_set
+-portmap: $(OBJECTS) $(WRAP_DIR)/libwrap.a
++portmap: $(OBJECTS) # $(WRAP_DIR)/libwrap.a
+       $(CC) $(CFLAGS) -o $@ $(OBJECTS) $(WRAP_LIB) $(LIBS)
+ pmap_dump: pmap_dump.c
+@@ -129,6 +139,13 @@
+ get_myaddress: get_myaddress.c
+       cc $(CFLAGS) -DTEST -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}/usr/sbin
++      install -o root -g root -m 0755 -s pmap_set ${BASEDIR}/usr/sbin
++      mkdir -p ${BASEDIR}/usr/share/doc/portmap
++      cp README ${BASEDIR}/usr/share/doc/portmap/portmapper.txt
++
+ lint: 
+       lint $(COPT) $(OBJECTS:%.o=%.c)