Changeset 15572


Ignore:
Timestamp:
2009-05-03T08:54:49+02:00 (9 years ago)
Author:
nico
Message:

[package] iptables:

  • add libtool fixups
  • fix libiptc & libxtables packages, containing only symlinks but missing the actual library files
  • enable static versions of libiptc & libxtables
  • install pkgconfig .pc files as well
  • cleanup & reorg
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/iptables/Makefile

    r15550 r15572  
    11# 
    2 # Copyright (C) 2006-2008 OpenWrt.org 
     2# Copyright (C) 2006-2009 OpenWrt.org 
    33# 
    44# This is free software, licensed under the GNU General Public License v2. 
     
    1010 
    1111PKG_NAME:=iptables 
    12  
    1312PKG_VERSION:=1.4.3.2 
    1413PKG_RELEASE:=1 
     14 
    1515PKG_MD5SUM:=545698693b636cfc844aafc6729fd48a 
    16  
    17 PKG_VERSION?=<IPTABLES_VERSION> 
    18  
    1916PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 
    2017PKG_SOURCE_URL:=http://www.netfilter.org/projects/iptables/files \ 
     
    2421 
    2522PATCH_DIR:=./patches/$(PKG_VERSION) 
     23 
     24PKG_FIXUP = libtool 
    2625 
    2726include $(INCLUDE_DIR)/package.mk 
     
    3332 
    3433 
    35 define Package/libiptc 
    36   SECTION:=libs 
    37   CATEGORY:=Libraries 
    38   URL:=http://netfilter.org/ 
    39   TITLE:=IPv4/IPv6 firewall - shared libiptc library 
    40 endef 
    41  
    42 define Package/libxtables 
    43   SECTION:=libs 
    44   CATEGORY:=Libraries 
    45   URL:=http://netfilter.org/ 
    46   TITLE:=IPv4/IPv6 firewall - shared xtables library 
    47 endef 
    48  
    49  
    5034define Package/iptables/Default 
    5135  SECTION:=net 
    5236  CATEGORY:=Base system 
    5337  URL:=http://netfilter.org/ 
    54   DEPENDS:=+libiptc +libxtables 
    5538endef 
    5639 
     
    6447  TITLE:=IPv4 firewall administration tool 
    6548  MENU:=1 
    66   DEPENDS+= +kmod-ipt-core 
     49  DEPENDS+= +kmod-ipt-core +libiptc +libxtables 
    6750endef 
    6851 
     
    240223 
    241224define Package/ip6tables-utils 
     225$(call Package/iptables/Default) 
     226  DEPENDS:=ip6tables 
     227  CATEGORY:=IPv6 
     228  TITLE:=ip6tables save and restore utilities 
     229endef 
     230 
     231define Package/libiptc 
     232$(call Package/iptables/Default) 
     233  SECTION:=libs 
     234  CATEGORY:=Libraries 
     235  TITLE:=IPv4/IPv6 firewall - shared libiptc library 
     236endef 
     237 
     238define Package/libxtables 
    242239 $(call Package/iptables/Default) 
    243  DEPENDS:=ip6tables 
    244  CATEGORY:=IPv6 
    245  TITLE:=ip6tables save and restore utilities 
    246 endef 
    247  
    248 define Build/Prepare 
    249         $(call Build/Prepare/Default) 
    250 endef 
     240 SECTION:=libs 
     241 CATEGORY:=Libraries 
     242 TITLE:=IPv4/IPv6 firewall - shared xtables library 
     243endef 
     244 
    251245 
    252246TARGET_CPPFLAGS := -I$(PKG_BUILD_DIR)/include $(TARGET_CPPFLAGS) 
    253247TARGET_CFLAGS += $(FPIC) 
    254248CONFIGURE_ARGS += \ 
     249        --enable-shared \ 
     250        --enable-static \ 
    255251        --enable-devel \ 
    256252        --with-kernel="$(LINUX_DIR)" \ 
     
    270266 
    271267define Build/InstallDev 
    272         $(INSTALL_DIR) $(1)/usr/lib 
    273         $(CP) $(PKG_BUILD_DIR)/.libs/libxtables.so* $(1)/usr/lib 
    274         $(CP) $(PKG_BUILD_DIR)/libiptc/.libs/libiptc.so* $(1)/usr/lib 
    275         $(CP) $(PKG_BUILD_DIR)/include $(1)/usr 
     268        mkdir -p $(1)/usr/include 
     269        $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ 
     270        mkdir -p $(1)/usr/lib 
     271        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxtables.{a,so*} $(1)/usr/lib/ 
     272        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libiptc.{a,so*} $(1)/usr/lib/ 
     273        mkdir -p $(1)/usr/lib/pkgconfig 
     274        $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/xtables.pc $(1)/usr/lib/pkgconfig/ 
     275        $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libiptc.pc $(1)/usr/lib/pkgconfig/ 
    276276endef 
    277277 
     
    289289endef 
    290290 
    291  
    292 define Package/libiptc/install 
    293         $(INSTALL_DIR) $(1)/usr/lib 
    294         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libiptc.so.0 $(1)/usr/lib/ 
    295 endef 
    296  
    297 define Package/libxtables/install 
    298         $(INSTALL_DIR) $(1)/usr/lib 
    299         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libxtables.so.2 $(1)/usr/lib/ 
    300 endef 
    301  
    302  
    303291define Package/iptables-utils/install 
    304292        $(INSTALL_DIR) $(1)/usr/sbin 
     
    318306        $(INSTALL_DIR) $(1)/usr/sbin 
    319307        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ip6tables-{save,restore} $(1)/usr/sbin/ 
     308endef 
     309 
     310define Package/libiptc/install 
     311        $(INSTALL_DIR) $(1)/usr/lib 
     312        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libiptc.so.* $(1)/usr/lib/ 
     313endef 
     314 
     315define Package/libxtables/install 
     316        $(INSTALL_DIR) $(1)/usr/lib 
     317        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libxtables.so.* $(1)/usr/lib/ 
    320318endef 
    321319 
     
    338336        $(CP) files/l7/*.pat $$(1)/etc/l7-protocols/ 
    339337 
    340  
    341 $(eval $(call BuildPackage,libiptc)) 
    342 $(eval $(call BuildPackage,libxtables)) 
    343338 
    344339$(eval $(call BuildPackage,iptables)) 
     
    358353$(eval $(call BuildPackage,ip6tables)) 
    359354$(eval $(call BuildPackage,ip6tables-utils)) 
     355$(eval $(call BuildPackage,libiptc)) 
     356$(eval $(call BuildPackage,libxtables)) 
Note: See TracChangeset for help on using the changeset viewer.