diff options
Diffstat (limited to 'package/portmap')
-rw-r--r-- | package/portmap/Config.in | 14 | ||||
-rw-r--r-- | package/portmap/Makefile | 40 | ||||
-rw-r--r-- | package/portmap/files/portmap.init | 27 | ||||
-rw-r--r-- | package/portmap/ipkg/portmap.control | 4 | ||||
-rw-r--r-- | package/portmap/ipkg/portmap.postinst | 5 | ||||
-rw-r--r-- | package/portmap/patches/patch-pmap_check_c | 16 |
6 files changed, 106 insertions, 0 deletions
diff --git a/package/portmap/Config.in b/package/portmap/Config.in new file mode 100644 index 000000000..ac4415a05 --- /dev/null +++ b/package/portmap/Config.in @@ -0,0 +1,14 @@ +config ADK_PACKAGE_PORTMAP + prompt "portmap........................... RPC Portmapper" + tristate + default n + help + Portmap is a server that converts RPC (Remote Procedure Call) program + numbers into DARPA protocol port numbers. It must be running in order + to make RPC calls. Services that use RPC include NFS and NIS. + +config ADK_PACKAGE_PORTMAP_LIBWRAP + bool " Use tcp_wrappers" + default n + depends on ADK_PACKAGE_PORTMAP + select ADK_PACKAGE_LIBWRAP diff --git a/package/portmap/Makefile b/package/portmap/Makefile new file mode 100644 index 000000000..68732581c --- /dev/null +++ b/package/portmap/Makefile @@ -0,0 +1,40 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= portmap +PKG_VERSION:= 6.0 +PKG_RELEASE:= 1 +PKG_MD5SUM:= ac108ab68bf0f34477f8317791aaf1ff +MASTER_SITES:= http://neil.brown.name/portmap/ +DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tgz +WRKDIST= ${WRKDIR}/${PKG_NAME}_${PKG_VERSION} + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,PORTMAP,portmap,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +ifneq ($(strip ${ADK_PACKAGE_PORTMAP_LIBWRAP}),) +MAKE_FLAGS+= WRAP_LIB='-L${STAGING_DIR}/usr/lib -lwrap' +else +MAKE_FLAGS+= NO_TCP_WRAPPER=1 +endif +TCPPFLAGS+= -DDAEMON_UID=20 -DDAEMON_GID=20 +BUILD_STYLE:= auto +MAKE_FLAGS+= ${TARGET_CONFIGURE_OPTS} \ + CFLAGS='${TCFLAGS}' + +do-install: + ${INSTALL_DIR} ${IDIR_PORTMAP}/etc/init.d + ${INSTALL_DIR} ${IDIR_PORTMAP}/usr/sbin + ${INSTALL_BIN} ./files/portmap.init \ + ${IDIR_PORTMAP}/etc/init.d/portmap + ${INSTALL_BIN} ${WRKBUILD}/portmap ${IDIR_PORTMAP}/usr/sbin/ +ifneq ($(strip ${ADK_PACKAGE_PORTMAP_LIBWRAP}),) + echo 'Depends: libwrap' >>${IDIR_PORTMAP}/CONTROL/control +endif + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/portmap/files/portmap.init b/package/portmap/files/portmap.init new file mode 100644 index 000000000..19e54ee77 --- /dev/null +++ b/package/portmap/files/portmap.init @@ -0,0 +1,27 @@ +#!/bin/sh +#FWINIT 60 +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"${portmap:-NO}" = x"NO" && exit 0 + exec sh $0 start + ;; +start) + mkdir -p /tmp/.portmap + portmap -t /tmp/.portmap + ;; +stop) + kill $(pidof portmap|cut -d ' ' -f 3) + ;; +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "Usage: $0 {start | stop | restart}" + exit 1 + ;; +esac +exit $? diff --git a/package/portmap/ipkg/portmap.control b/package/portmap/ipkg/portmap.control new file mode 100644 index 000000000..88fc963fa --- /dev/null +++ b/package/portmap/ipkg/portmap.control @@ -0,0 +1,4 @@ +Package: portmap +Priority: optional +Section: net +Description: The RPC Portmapper diff --git a/package/portmap/ipkg/portmap.postinst b/package/portmap/ipkg/portmap.postinst new file mode 100644 index 000000000..1017d2251 --- /dev/null +++ b/package/portmap/ipkg/portmap.postinst @@ -0,0 +1,5 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +add_rcconf portmap +add_group portmap 20 +add_user portmap 20 20 /tmp/.portmap diff --git a/package/portmap/patches/patch-pmap_check_c b/package/portmap/patches/patch-pmap_check_c new file mode 100644 index 000000000..9dc7cd67f --- /dev/null +++ b/package/portmap/patches/patch-pmap_check_c @@ -0,0 +1,16 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ + +* do not include tcpd.h, when hosts access disabled + +--- portmap_6.0.orig/pmap_check.c 2007-05-11 05:02:10.000000000 +0200 ++++ portmap_6.0/pmap_check.c 2009-04-24 12:26:06.041879543 +0200 +@@ -44,7 +44,9 @@ + #include <netinet/in.h> + #include <rpc/rpcent.h> + #endif ++#ifdef HOSTS_ACCESS + #include <tcpd.h> ++#endif + #include <arpa/inet.h> + #include <grp.h> + |