Port tcp_wrappers to -ng
[openwrt/svn-archive/archive.git] / net / tcp_wrappers / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=tcp_wrappers
12 PKG_VERSION:=7.6
13 PKG_RELEASE:=1
14 PKG_MD5SUM:=e6fa25f71226d090f34de3f6b122fb5a
15
16 PKG_SOURCE_URL:=ftp://ftp.porcupine.org/pub/security
17 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_VERSION)
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/libwrap
25 SECTION:=net
26 CATEGORY:=Network
27 TITLE:=Security wrapper library for TCP services
28 DESCRIPTION:=Security wrapper library for TCP services.
29 URL:=ftp://ftp.porcupine.org/pub/security/index.html
30 endef
31
32 define Build/Compile
33 $(MAKE) -j1 -C $(PKG_BUILD_DIR) \
34 $(TARGET_CONFIGURE_OPTS) \
35 OPT_CFLAGS="$(TARGET_CFLAGS)" \
36 LIBS=-lnsl \
37 NETGROUP= \
38 VSYSLOG= \
39 BUGS= \
40 EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT -DINET6=1 \
41 -Dss_family=__ss_family -Dss_len=__ss_len" \
42 FACILITY=LOG_DAEMON \
43 SEVERITY=LOG_INFO \
44 REAL_DAEMON_DIR=/usr/sbin \
45 STYLE="-DPROCESS_OPTIONS" \
46 tidy all
47 endef
48
49 define Package/libwrap/install
50 install -d -m0755 $(1)/usr/lib
51 $(CP) $(PKG_BUILD_DIR)/shared/libwrap.so.* $(1)/usr/lib/
52 endef
53
54 define Build/InstallDev
55 mkdir -p $(STAGING_DIR)/usr/include
56 $(CP) $(PKG_BUILD_DIR)/tcpd.h $(STAGING_DIR)/usr/include/
57 mkdir -p $(STAGING_DIR)/usr/lib
58 $(CP) $(PKG_BUILD_DIR)/libwrap.a $(STAGING_DIR)/usr/lib/
59 $(CP) $(PKG_BUILD_DIR)/shared/libwrap.so* $(STAGING_DIR)/usr/lib/
60 endef
61
62 define Build/UninstallDev
63 rm -rf \
64 $(STAGING_DIR)/usr/include/tcpd.h \
65 $(STAGING_DIR)/usr/lib/libwrap.{a,so*}
66 endef
67
68 $(eval $(call BuildPackage,libwrap))