summaryrefslogtreecommitdiff
path: root/openwrt
diff options
context:
space:
mode:
Diffstat (limited to 'openwrt')
-rw-r--r--openwrt/package/tcp_wrappers/Config.in13
-rw-r--r--openwrt/package/tcp_wrappers/Makefile70
-rw-r--r--openwrt/package/tcp_wrappers/patches/opt_cflags.patch12
3 files changed, 62 insertions, 33 deletions
diff --git a/openwrt/package/tcp_wrappers/Config.in b/openwrt/package/tcp_wrappers/Config.in
new file mode 100644
index 0000000000..d737fcf969
--- /dev/null
+++ b/openwrt/package/tcp_wrappers/Config.in
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_LIBWRAP
+ tristate "libwrap - Security wrapper library for TCP services"
+ default m if CONFIG_DEVEL
+ help
+ Security wrapper library for TCP services.
+
+ ftp://ftp.porcupine.org/pub/security/index.html
+
+
+config BR2_PACKAGE_TCP_WRAPPERS
+ tristate
+ default BR2_PACKAGE_LIBWRAP
+
diff --git a/openwrt/package/tcp_wrappers/Makefile b/openwrt/package/tcp_wrappers/Makefile
index 40e7331af1..17f8c29777 100644
--- a/openwrt/package/tcp_wrappers/Makefile
+++ b/openwrt/package/tcp_wrappers/Makefile
@@ -2,36 +2,30 @@
include $(TOPDIR)/rules.mk
-PKG_NAME := tcp_wrappers
-PKG_VERSION := 7.6
-PKG_RELEASE := 1
-PKG_MD5SUM := e6fa25f71226d090f34de3f6b122fb5a
+PKG_NAME:=tcp_wrappers
+PKG_VERSION:=7.6
+PKG_RELEASE:=1
+PKG_MD5SUM:=e6fa25f71226d090f34de3f6b122fb5a
-PKG_SOURCE_SITE := ftp://ftp.porcupine.org/pub/security
-PKG_SOURCE_FILE := $(PKG_NAME)_$(PKG_VERSION).tar.gz
-PKG_SOURCE_CAT := zcat
-PKG_SOURCE_DIR := $(PKG_NAME)_$(PKG_VERSION)
-PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_SOURCE_DIR)
+PKG_SOURCE_URL:=ftp://ftp.porcupine.org/pub/security
+PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
+PKG_CAT:=zcat
-# only need libwrap.a at the moment
-#PKG_IPK := $(PACKAGE_DIR)/zlib_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)
-.NOTPARALLEL:
+include $(TOPDIR)/package/rules.mk
+
+#$(eval $(call PKG_template,LIBWRAP,libwrap,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
-$(DL_DIR)/$(PKG_SOURCE_FILE):
- mkdir -p $(DL_DIR)
- $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE_FILE) $(PKG_MD5SUM) $(PKG_SOURCE_SITE)
+.NOTPARALLEL:
-$(PKG_BUILD_DIR)/.patched: $(DL_DIR)/$(PKG_SOURCE_FILE)
- mkdir -p $(TOOL_BUILD_DIR)
- $(PKG_SOURCE_CAT) $(DL_DIR)/$(PKG_SOURCE_FILE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
- $(PATCH) $(PKG_BUILD_DIR) ./patches
- touch $(PKG_BUILD_DIR)/.patched
+$(PKG_BUILD_DIR)/.configured:
+ touch $@
-$(PKG_BUILD_DIR)/libwrap.a: $(PKG_BUILD_DIR)/.patched
+$(PKG_BUILD_DIR)/.built:
$(MAKE) -j1 -C $(PKG_BUILD_DIR) \
$(TARGET_CONFIGURE_OPTS) \
- COPTS="$(TARGET_CFLAGS)" \
+ OPT_CFLAGS="$(TARGET_CFLAGS)" \
LIBS=-lnsl \
NETGROUP= \
VSYSLOG= \
@@ -43,18 +37,28 @@ $(PKG_BUILD_DIR)/libwrap.a: $(PKG_BUILD_DIR)/.patched
REAL_DAEMON_DIR=/usr/sbin \
STYLE="-DPROCESS_OPTIONS" \
tidy all
+ touch $@
-$(STAGING_DIR)/lib/libwrap.a: $(PKG_BUILD_DIR)/libwrap.a
- mkdir -p $(STAGING_DIR)/include/
- cp -f $(PKG_BUILD_DIR)/tcpd.h $(STAGING_DIR)/include/
- cp -f $^ $@
+$(IPKG_LIBWRAP):
+ install -d -m0755 $(IDIR_LIBWRAP)/usr/lib
+ cp -fp $(PKG_BUILD_DIR)/shared/libwrap.so.* $(IDIR_LIBWRAP)/usr/lib/
+ $(RSTRIP) $(IDIR_LIBWRAP)
+ $(IPKG_BUILD) $(IDIR_LIBWRAP) $(PACKAGE_DIR)
+
+$(STAGING_DIR)/usr/lib/libwrap.a: $(PKG_BUILD_DIR)/.built
+ mkdir -p $(STAGING_DIR)/usr/include
+ cp -fp $(PKG_BUILD_DIR)/tcpd.h $(STAGING_DIR)/usr/include/
+ mkdir -p $(STAGING_DIR)/usr/lib
+ cp -fp $(PKG_BUILD_DIR)/libwrap.a $(STAGING_DIR)/usr/lib/
+# cp -fp $(PKG_BUILD_DIR)/shared/libwrap.so* $(STAGING_DIR)/usr/lib/
+ touch $@
-source: $(DL_DIR)/$(PKG_SOURCE_FILE)
-prepare: $(PKG_BUILD_DIR)/.patched
-compile: $(STAGING_DIR)/lib/libwrap.a
-install:
+install-dev: $(STAGING_DIR)/usr/lib/libwrap.a
-clean:
- rm -rf $(PKG_BUILD_DIR)
- rm -f $(STAGING_DIR)/lib/libwrap.a
+uninstall-dev:
+ rm -rf \
+ $(STAGING_DIR)/usr/include/tcpd.h \
+ $(STAGING_DIR)/usr/lib/libwrap.{a,so*} \
+compile: install-dev
+clean: uninstall-dev
diff --git a/openwrt/package/tcp_wrappers/patches/opt_cflags.patch b/openwrt/package/tcp_wrappers/patches/opt_cflags.patch
new file mode 100644
index 0000000000..7b76333938
--- /dev/null
+++ b/openwrt/package/tcp_wrappers/patches/opt_cflags.patch
@@ -0,0 +1,12 @@
+--- tcp_wrappers_7.6/Makefile.orig 2005-05-21 18:11:32.000000000 +0200
++++ tcp_wrappers_7.6/Makefile 2005-05-21 18:14:28.000000000 +0200
+@@ -689,7 +689,8 @@
+ shared/%.o: %.c
+ $(CC) $(CFLAGS) $(SHCFLAGS) -c $< -o $@
+
+-CFLAGS = -O2 -g -DFACILITY=$(FACILITY) $(ACCESS) $(PARANOID) $(NETGROUP) \
++OPT_CFLAGS = -O2 -g
++CFLAGS = $(OPT_CFLAGS) -DFACILITY=$(FACILITY) $(ACCESS) $(PARANOID) $(NETGROUP) \
+ $(BUGS) $(SYSTYPE) $(AUTH) $(UMASK) \
+ -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" $(STYLE) $(KILL_OPT) \
+ -DSEVERITY=$(SEVERITY) -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) \