Changeset 850


Ignore:
Timestamp:
2005-05-12T21:37:59+02:00 (13 years ago)
Author:
nbd
Message:

convert dhcp-forwarder to new packaging style

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/openwrt/package/dhcp-forwarder/Makefile

    r680 r850  
    88PKG_MD5SUM := e7f876e615ebc3f96418f6477b4451e2 
    99 
    10 PKG_SOURCE_URL := \ 
    11         http://savannah.nongnu.org/download/dhcp-fwd/ \ 
    12         http://nthill.free.fr/openwrt/sources/$(PKG_NAME)/ 
     10PKG_SOURCE_URL := http://savannah.nongnu.org/download/dhcp-fwd 
    1311PKG_SOURCE := $(PKG_NAME)-$(PKG_VERSION).tar.bz2 
    1412PKG_CAT := bzcat 
     
    1715PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install 
    1816 
    19 IPKG_DHCP_FORWARDER:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk 
    20 IDIR_DHCP_FORWARDER:=$(PKG_BUILD_DIR)/ipkg/$(PKG_NAME) 
    21 INFO_DHCP_FORWARDER:=$(IPKG_STATE_DIR)/info/$(PKG_NAME).list 
     17include $(TOPDIR)/package/rules.mk 
    2218 
    23 $(DL_DIR)/$(PKG_SOURCE): 
    24          $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL) 
     19$(eval $(call PKG_template,DHCP_FORWARDER,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) 
    2520 
    26 $(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE) 
    27         rm -rf $(PKG_BUILD_DIR) 
    28         $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - 
    29         touch $(PKG_BUILD_DIR)/.prepared 
    30  
    31 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared 
     21$(PKG_BUILD_DIR)/.configured:  
    3222        (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ 
    3323                $(TARGET_CONFIGURE_OPTS) \ 
     
    5545                  $(DISABLE_NLS) \ 
    5646        ) 
    57         touch $(PKG_BUILD_DIR)/.configured 
     47        touch $@ 
    5848 
    59 $(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured 
     49$(PKG_BUILD_DIR)/.built: 
    6050        $(MAKE) -C $(PKG_BUILD_DIR) \ 
    6151                cfg_filename="/etc/dhcp-fwd.conf" 
    62         touch $(PKG_BUILD_DIR)/.built 
    63  
    64 $(PKG_INSTALL_DIR)/usr/sbin/dhcp-fwd: $(PKG_BUILD_DIR)/.built 
    6552        mkdir -p $(PKG_INSTALL_DIR) 
    6653        $(MAKE) -C $(PKG_BUILD_DIR) \ 
    6754                DESTDIR="$(PKG_INSTALL_DIR)" \ 
    6855                install 
     56        touch $(PKG_BUILD_DIR)/.built 
    6957         
    70 $(IPKG_DHCP_FORWARDER): $(PKG_INSTALL_DIR)/usr/sbin/dhcp-fwd 
    71         $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_DHCP_FORWARDER) ./ipkg/$(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH) 
    72         install -m0644 ./ipkg/$(PKG_NAME).conffiles $(IDIR_DHCP_FORWARDER)/CONTROL/conffiles 
     58$(IPKG_DHCP_FORWARDER): 
    7359        install -m0755 -d $(IDIR_DHCP_FORWARDER)/etc/init.d 
    7460        install -m0755 ./ipkg/$(PKG_NAME).init $(IDIR_DHCP_FORWARDER)/etc/init.d/dhcp-fwd 
     
    7965        $(RSTRIP) $(IDIR_DHCP_FORWARDER) 
    8066        $(IPKG_BUILD) $(IDIR_DHCP_FORWARDER) $(PACKAGE_DIR) 
    81  
    82 $(INFO_DHCP_FORWARDER): $(IPKG_DHCP_FORWARDER) 
    83         $(IPKG) install $(IPKG_DHCP_FORWARDER) 
    84  
    85 source: $(DL_DIR)/$(PKG_SOURCE) 
    86 prepare: $(PKG_BUILD_DIR)/.prepared 
    87 compile: $(IPKG_DHCP_FORWARDER) 
    88 install: $(INFO_DHCP_FORWARDER) 
    89  
    90 clean: 
    91         rm -rf $(PKG_BUILD_DIR) 
    92         rm -rf $(IPKG_DHCP_FORWARDER) 
Note: See TracChangeset for help on using the changeset viewer.