portmap: import from packages

This commit is contained in:
Peter Wagner 2014-06-30 15:42:44 +02:00
parent 48340d616f
commit 28d0f1d506
3 changed files with 79 additions and 0 deletions

51
net/portmap/Makefile Normal file
View File

@ -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))

View File

@ -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
}

View File

@ -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