Changeset d419478 in freewrt for package/snort/Makefile


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/snort/Makefile

    r2029b2e rd419478  
    1010PKG_SOURCE_URL:=http://www.snort.org/dl/current/
    1111PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
    12 PKG_CAT:=zcat
    1312
    14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
    15 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
    1613
    1714include $(TOPDIR)/package/rules.mk
     
    9087
    9188ifneq ($(BR2_PACKAGE_$(1)),)
    92 BUILD_TARGETS += $(PKG_BUILD_DIR)/$(2)
     89BUILD_TARGETS += $(WRKBUILD)/$(2)
    9390endif
    9491
    95 $(PKG_BUILD_DIR)/$(2): $(PKG_BUILD_DIR)/.prepared
    96         touch -r $(PKG_BUILD_DIR)/Makefile.am $(PKG_BUILD_DIR)/configure.in
    97         touch -r $(PKG_BUILD_DIR)/Makefile.in $(PKG_BUILD_DIR)/configure
    98         -$(MAKE) -C $(PKG_BUILD_DIR) distclean
    99         (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
     92$(WRKBUILD)/$(2): $(WRKBUILD)/.prepared
     93        touch -r $(WRKBUILD)/Makefile.am $(WRKBUILD)/configure.in
     94        touch -r $(WRKBUILD)/Makefile.in $(WRKBUILD)/configure
     95        -$(MAKE) -C $(WRKBUILD) distclean
     96        (cd $(WRKBUILD); rm -rf config.{cache,status} ; \
    10097                $(TARGET_CONFIGURE_OPTS) \
    10198                CFLAGS="$(TARGET_CFLAGS)" \
     
    106103                  $$($(1)_CONFIGURE_OPTS) \
    107104        );
    108         $(MAKE) -C $(PKG_BUILD_DIR)
    109         mv $(PKG_BUILD_DIR)/src/snort $(PKG_BUILD_DIR)/$(2)
     105        $(MAKE) -C $(WRKBUILD)
     106        mv $(WRKBUILD)/src/snort $(WRKBUILD)/$(2)
    110107
    111 $$(IPKG_$(1)): $(PKG_BUILD_DIR)/.installed $(PKG_BUILD_DIR)/$(2)
     108$$(IPKG_$(1)): $(WRKBUILD)/.installed $(WRKBUILD)/$(2)
    112109        install -m0644 ./ipkg/snort.conffiles $$(IDIR_$(1))/CONTROL/conffiles
    113110        install -d -m0755 $$(IDIR_$(1))/etc/default
     
    116113        install -m0755 ./files/snort.init $$(IDIR_$(1))/etc/init.d/snort
    117114        install -d -m0755 $$(IDIR_$(1))/etc/snort
    118         install -m0644 $(PKG_BUILD_DIR)/etc/snort.conf $$(IDIR_$(1))/etc/snort/
    119         install -m0644 $(PKG_BUILD_DIR)/etc/classification.config $$(IDIR_$(1))/etc/snort/
    120         install -m0644 $(PKG_BUILD_DIR)/etc/gen-msg.map $$(IDIR_$(1))/etc/snort/
    121         install -m0644 $(PKG_BUILD_DIR)/etc/reference.config $$(IDIR_$(1))/etc/snort/
    122         install -m0644 $(PKG_BUILD_DIR)/etc/sid-msg.map $$(IDIR_$(1))/etc/snort/
    123         install -m0644 $(PKG_BUILD_DIR)/etc/threshold.conf $$(IDIR_$(1))/etc/snort/
    124         install -m0644 $(PKG_BUILD_DIR)/etc/unicode.map $$(IDIR_$(1))/etc/snort/
     115        install -m0644 $(WRKBUILD)/etc/snort.conf $$(IDIR_$(1))/etc/snort/
     116        install -m0644 $(WRKBUILD)/etc/classification.config $$(IDIR_$(1))/etc/snort/
     117        install -m0644 $(WRKBUILD)/etc/gen-msg.map $$(IDIR_$(1))/etc/snort/
     118        install -m0644 $(WRKBUILD)/etc/reference.config $$(IDIR_$(1))/etc/snort/
     119        install -m0644 $(WRKBUILD)/etc/sid-msg.map $$(IDIR_$(1))/etc/snort/
     120        install -m0644 $(WRKBUILD)/etc/threshold.conf $$(IDIR_$(1))/etc/snort/
     121        install -m0644 $(WRKBUILD)/etc/unicode.map $$(IDIR_$(1))/etc/snort/
    125122        install -d -m0755 $$(IDIR_$(1))/usr/sbin
    126         install -m0755 $(PKG_BUILD_DIR)/$(2) $$(IDIR_$(1))/usr/sbin/snort
     123        install -m0755 $(WRKBUILD)/$(2) $$(IDIR_$(1))/usr/sbin/snort
    127124        $(RSTRIP) $$(IDIR_$(1))
    128125        mkdir -p $(PACKAGE_DIR)
     
    141138$(eval $(call PKG_build,SNORT_CUSTOM,snort-custom,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
    142139
    143 $(PKG_BUILD_DIR)/.configured:
     140$(WRKBUILD)/.configured:
    144141        touch $@
    145142
    146 $(PKG_BUILD_DIR)/.built: $(BUILD_TARGETS)
     143$(WRKBUILD)/.built: $(BUILD_TARGETS)
    147144        touch $@
    148145
    149 $(PKG_BUILD_DIR)/.installed: $(PKG_BUILD_DIR)/.built
    150         mkdir -p $(PKG_INSTALL_DIR)
    151         $(MAKE) -C $(PKG_BUILD_DIR) \
    152                 DESTDIR="$(PKG_INSTALL_DIR)" \
     146$(WRKBUILD)/.installed: $(WRKBUILD)/.built
     147        mkdir -p $(WRKINST)
     148        $(MAKE) -C $(WRKBUILD) \
     149                DESTDIR="$(WRKINST)" \
    153150                install
    154         touch $(PKG_BUILD_DIR)/.installed
     151        touch $(WRKBUILD)/.installed
    155152
Note: See TracChangeset for help on using the changeset viewer.