From 28d0f1d506d0f344abc44226487e650642811252 Mon Sep 17 00:00:00 2001 From: Peter Wagner Date: Mon, 30 Jun 2014 15:42:44 +0200 Subject: [PATCH] portmap: import from packages --- net/portmap/Makefile | 51 ++++++++++++++++++++++++++++ net/portmap/files/portmap.init | 16 +++++++++ net/portmap/patches/101-no_pie.patch | 12 +++++++ 3 files changed, 79 insertions(+) create mode 100644 net/portmap/Makefile create mode 100644 net/portmap/files/portmap.init create mode 100644 net/portmap/patches/101-no_pie.patch diff --git a/net/portmap/Makefile b/net/portmap/Makefile new file mode 100644 index 000000000..c1cf452d3 --- /dev/null +++ b/net/portmap/Makefile @@ -0,0 +1,51 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=portmap +PKG_VERSION:=6.0 +PKG_RELEASE:=4 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz +PKG_SOURCE_URL:=http://neil.brown.name/portmap/ +PKG_MD5SUM:=ac108ab68bf0f34477f8317791aaf1ff + +PKG_LICENSE:=BSD-4c +PKG_LICENSE_FILES:=portmap.man + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/portmap + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libwrap $(LIBRPC_DEPENDS) + TITLE:=The RPC Portmapper + URL:=http://neil.brown.name/portmap/ +endef + +define Package/portmap/description + Portmap is a server that converts RPC (Remote Procedure Call) program + numbers into DARPA protocol port numbers. +endef + +MAKE_FLAGS += \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -DHOSTS_ACCESS -DFACILITY=LOG_DAEMON -DIGNORE_SIGCHLD" \ + RPCUSER="rpc" \ + LDLIBS="$(TARGET_LDFLAGS) -lwrap $(LIBRPC)" \ + all + +define Package/portmap/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/portmap $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/portmap.init $(1)/etc/init.d/portmap +endef + +$(eval $(call BuildPackage,portmap)) diff --git a/net/portmap/files/portmap.init b/net/portmap/files/portmap.init new file mode 100644 index 000000000..e3e27b7ed --- /dev/null +++ b/net/portmap/files/portmap.init @@ -0,0 +1,16 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2006-2011 OpenWrt.org + +START=19 +STOP=19 + +USE_PROCD=1 + +start_service() { + user_exists rpc 65533 || user_add rpc 65533 65533 rpc /var/empty + group_exists rpc 65533 || group_add rpc 65533 + + procd_open_instance + procd_set_param command /usr/sbin/portmap -f + procd_close_instance +} diff --git a/net/portmap/patches/101-no_pie.patch b/net/portmap/patches/101-no_pie.patch new file mode 100644 index 000000000..6cbdece92 --- /dev/null +++ b/net/portmap/patches/101-no_pie.patch @@ -0,0 +1,12 @@ +diff -ur portmap_6.0.org/Makefile portmap_6.0/Makefile +--- portmap_6.0.org/Makefile 2008-04-19 22:44:35.000000000 +0200 ++++ portmap_6.0/Makefile 2008-04-19 00:02:01.000000000 +0200 +@@ -127,7 +127,7 @@ + CPPFLAGS += $(HOSTS_ACCESS) + portmap: CFLAGS += -fpie + portmap: LDLIBS += $(WRAP_LIB) +-portmap: LDFLAGS += -pie ++#portmap: LDFLAGS += -pie + portmap: portmap.o pmap_check.o from_local.o + + from_local: CPPFLAGS += -DTEST