Changeset d419478 in freewrt for package/iptables


Ignore:
Timestamp:
Jul 21, 2006, 1:56:32 AM (19 years ago)
Author:
Thorsten Glaser <tg@…>
Branches:
freewrt_1_0, freewrt_2_0
Children:
50d34d3
Parents:
2029b2e
Message:
  • whitespace cleanup, while here
  • move WRKDIR and DISTFILES definition into PKG_template
  • define WRKDIR via parent BUILD_DIR instead of going up from WRKSRC
  • use a sub-directory as WRKDIR, like BSD
  • rename PKG_BUILD_DIR into WRKBUILD
  • define WRKBUILD relative via WRKDIR
  • rename PKG_INSTALL_DIR into WRKINST
  • fix a few dependencies
  • make use of common cases in the definition of WRKBUILD and WRKINST, removing many redundant lines
  • use WRKDIR instead of BUILD_DIR in places where the latter was used previously
  • while here, remove PKG_CAT stuff

this only affects packages, for now

git-svn-id: svn://www.freewrt.org/trunk/freewrt@303 afb5a338-a214-0410-bd46-81f09a774fd1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • package/iptables/Makefile

    r2029b2e rd419478  
    1313        ftp://ftp.no.netfilter.org/pub/netfilter/iptables/
    1414PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
    15 PKG_CAT:=bzcat
    1615
    17 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
    18 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
    1916
    2017define IPKG_plugin_template
     
    2320        install -m0755 -d $$(IDIR_$(1))/usr/lib/iptables
    2421        for m in $$(patsubst xt_%,ipt_%,$(2)); do \
    25                 $(CP) $(PKG_INSTALL_DIR)/usr/lib/iptables/lib$$$${m}.so $$(IDIR_$(1))/usr/lib/iptables/ ; \
     22                $(CP) $(WRKINST)/usr/lib/iptables/lib$$$${m}.so $$(IDIR_$(1))/usr/lib/iptables/ ; \
    2623        done
    2724        @[ -z "$(3)" ] || $(MAKE) $(3)
     
    5855$(eval $(call IPKG_plugin_template,IPTABLES_MOD_ULOG,$(IPT_ULOG-m)))
    5956
    60 $(PKG_BUILD_DIR)/.configured:
     57$(WRKBUILD)/.configured:
    6158        touch $@
    6259
    63 $(PKG_BUILD_DIR)/.built:
    64         chmod a+x $(PKG_BUILD_DIR)/extensions/.*-test*
    65         mkdir -p $(PKG_INSTALL_DIR)
    66         $(MAKE) -C $(PKG_BUILD_DIR) \
     60$(WRKBUILD)/.built:
     61        chmod a+x $(WRKBUILD)/extensions/.*-test*
     62        mkdir -p $(WRKINST)
     63        $(MAKE) -C $(WRKBUILD) \
    6764                $(TARGET_CONFIGURE_OPTS) \
    6865                CC=$(TARGET_CC) COPT_FLAGS="$(TARGET_CFLAGS)" \
    6966                KERNEL_DIR=$(LINUX_DIR) PREFIX=/usr \
    70                 DESTDIR="$(PKG_INSTALL_DIR)" \
     67                DESTDIR="$(WRKINST)" \
    7168                all install install-devel
    7269        touch $@
     
    7673        install -m0755 ./files/firewall.init $(IDIR_IPTABLES)/etc/init.d/S45firewall
    7774        install -d -m0755 $(IDIR_IPTABLES)/usr/sbin
    78         $(CP) $(PKG_INSTALL_DIR)/usr/sbin/iptables $(IDIR_IPTABLES)/usr/sbin/
     75        $(CP) $(WRKINST)/usr/sbin/iptables $(IDIR_IPTABLES)/usr/sbin/
    7976        install -d -m0755 $(IDIR_IPTABLES)/usr/lib/iptables
    80         (cd $(PKG_INSTALL_DIR)/usr/lib/iptables ; \
     77        (cd $(WRKINST)/usr/lib/iptables ; \
    8178                $(CP) $(patsubst %,lib%.so,$(IPT_BUILTIN:xt_%=ipt_%)) $(IDIR_IPTABLES)/usr/lib/iptables/ \
    8279        )
     
    8986$(IPKG_IPTABLES_UTILS):
    9087        install -d -m0755 $(IDIR_IPTABLES_UTILS)/usr/sbin
    91         $(CP) $(PKG_INSTALL_DIR)/usr/sbin/iptables-{save,restore} $(IDIR_IPTABLES_UTILS)/usr/sbin/
     88        $(CP) $(WRKINST)/usr/sbin/iptables-{save,restore} $(IDIR_IPTABLES_UTILS)/usr/sbin/
    9289        $(RSTRIP) $(IDIR_IPTABLES_UTILS)
    9390        $(IPKG_BUILD) $(IDIR_IPTABLES_UTILS) $(PACKAGE_DIR)
     
    9592$(IPKG_IP6TABLES):
    9693        install -d -m0755 $(IDIR_IP6TABLES)/usr/sbin
    97         $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ip6tables $(IDIR_IP6TABLES)/usr/sbin/
     94        $(CP) $(WRKINST)/usr/sbin/ip6tables $(IDIR_IP6TABLES)/usr/sbin/
    9895        install -d -m0755 $(IDIR_IP6TABLES)/usr/lib/iptables
    99         (cd $(PKG_INSTALL_DIR)/usr/lib/iptables ; \
     96        (cd $(WRKINST)/usr/lib/iptables ; \
    10097                $(CP) libip6t_*.so $(IDIR_IP6TABLES)/usr/lib/iptables/ \
    10198        )
     
    103100        $(IPKG_BUILD) $(IDIR_IP6TABLES) $(PACKAGE_DIR)
    104101
    105 $(STAGING_DIR)/usr/lib/libipq.a: $(PKG_BUILD_DIR)/.built
    106         $(MAKE) -C $(PKG_BUILD_DIR) \
     102$(STAGING_DIR)/usr/lib/libipq.a: $(WRKBUILD)/.built
     103        $(MAKE) -C $(WRKBUILD) \
    107104                $(TARGET_CONFIGURE_OPTS) \
    108105                CC=$(TARGET_CC) COPT_FLAGS="$(TARGET_CFLAGS)" \
Note: See TracChangeset for help on using the changeset viewer.