Browse Source

portmap: import from packages

lilik-openwrt-22.03
Peter Wagner 11 years ago
parent
commit
28d0f1d506
3 changed files with 79 additions and 0 deletions
  1. +51
    -0
      net/portmap/Makefile
  2. +16
    -0
      net/portmap/files/portmap.init
  3. +12
    -0
      net/portmap/patches/101-no_pie.patch

+ 51
- 0
net/portmap/Makefile 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))

+ 16
- 0
net/portmap/files/portmap.init 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
}

+ 12
- 0
net/portmap/patches/101-no_pie.patch 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

Loading…
Cancel
Save