Changeset 680


Ignore:
Timestamp:
2005-04-18T23:54:20+02:00 (13 years ago)
Author:
nico
Message:

Change dhcp-forwarder, rename config var, uniformize package makefile, move ipkg related files to ./ipkg

Location:
trunk/openwrt/package/dhcp-forwarder
Files:
3 added
6 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/openwrt/package/dhcp-forwarder/Config.in

    r675 r680  
    1 config BR2_PACKAGE_DHCPFWD 
     1config BR2_PACKAGE_DHCP_FORWARDER 
    22        tristate "dhcp-forwarder (a DHCP relay agent)" 
    33        default m if CONFIG_DEVEL 
  • trunk/openwrt/package/dhcp-forwarder/Makefile

    r626 r680  
    88PKG_MD5SUM := e7f876e615ebc3f96418f6477b4451e2 
    99 
    10 PKG_SOURCE_URL := http://savannah.nongnu.org/download/dhcp-fwd/ \ 
     10PKG_SOURCE_URL := \ 
     11        http://savannah.nongnu.org/download/dhcp-fwd/ \ 
    1112        http://nthill.free.fr/openwrt/sources/$(PKG_NAME)/ 
    1213PKG_SOURCE := $(PKG_NAME)-$(PKG_VERSION).tar.bz2 
     14PKG_CAT := bzcat 
     15 
    1316PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) 
    14 PKG_CAT := bzcat 
    15 PKG_IPK := $(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk 
    16 PKG_IPK_DIR := $(PKG_BUILD_DIR)/ipkg 
    1717PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install 
     18 
     19IPKG_DHCP_FORWARDER:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk 
     20IDIR_DHCP_FORWARDER:=$(PKG_BUILD_DIR)/ipkg/$(PKG_NAME) 
     21INFO_DHCP_FORWARDER:=$(IPKG_STATE_DIR)/info/$(PKG_NAME).list 
    1822 
    1923$(DL_DIR)/$(PKG_SOURCE): 
    2024         $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL) 
    2125 
    22 $(PKG_BUILD_DIR)/.unpacked: $(DL_DIR)/$(PKG_SOURCE) 
     26$(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE) 
     27        rm -rf $(PKG_BUILD_DIR) 
    2328        $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - 
    24         touch $(PKG_BUILD_DIR)/.unpacked 
     29        touch $(PKG_BUILD_DIR)/.prepared 
    2530 
    26 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.unpacked 
    27         (cd $(PKG_BUILD_DIR); rm -rf config.cache; \ 
     31$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared 
     32        (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ 
    2833                $(TARGET_CONFIGURE_OPTS) \ 
    2934                CFLAGS="$(TARGET_CFLAGS)" \ 
     
    5459$(PKG_BUILD_DIR)/.built: $(PKG_BUILD_DIR)/.configured 
    5560        $(MAKE) -C $(PKG_BUILD_DIR) \ 
    56           cfg_filename="/etc/dhcp-fwd.conf" 
     61                cfg_filename="/etc/dhcp-fwd.conf" 
    5762        touch $(PKG_BUILD_DIR)/.built 
    5863 
     
    6065        mkdir -p $(PKG_INSTALL_DIR) 
    6166        $(MAKE) -C $(PKG_BUILD_DIR) \ 
    62           DESTDIR="$(PKG_INSTALL_DIR)" \ 
    63          install 
     67                DESTDIR="$(PKG_INSTALL_DIR)" \ 
     68                install 
    6469         
    65 $(PKG_IPK): $(PKG_INSTALL_DIR)/usr/sbin/dhcp-fwd 
    66         $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_IPK_DIR) $(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH) 
    67         cp -fp $(PKG_NAME).conffiles $(PKG_IPK_DIR)/CONTROL/conffiles 
    68         chmod 0644 $(PKG_IPK_DIR)/CONTROL/conffiles 
    69         mkdir -p $(PKG_IPK_DIR)/etc 
    70         cp -fp $(PKG_BUILD_DIR)/contrib/dhcp-fwd.conf $(PKG_IPK_DIR)/etc/ 
    71         chmod 0644 $(PKG_IPK_DIR)/etc/dhcp-fwd.conf 
    72         mkdir -p $(PKG_IPK_DIR)/etc/init.d 
    73         cp -fp $(PKG_NAME).init $(PKG_IPK_DIR)/etc/init.d/dhcp-fwd 
    74         chmod 0755 $(PKG_IPK_DIR)/etc/init.d/dhcp-fwd 
    75         mkdir -p $(PKG_IPK_DIR)/usr/bin 
    76         cp -fp $(PKG_INSTALL_DIR)/usr/sbin/dhcp-fwd $(PKG_IPK_DIR)/usr/bin/ 
    77         $(STRIP) $(PKG_IPK_DIR)/usr/bin/* 
    78         $(IPKG_BUILD) $(PKG_IPK_DIR) $(PACKAGE_DIR) 
     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 
     73        install -m0755 -d $(IDIR_DHCP_FORWARDER)/etc/init.d 
     74        install -m0755 ./ipkg/$(PKG_NAME).init $(IDIR_DHCP_FORWARDER)/etc/init.d/dhcp-fwd 
     75        install -m0755 -d $(IDIR_DHCP_FORWARDER)/etc 
     76        install -m0644 $(PKG_BUILD_DIR)/contrib/dhcp-fwd.conf $(IDIR_DHCP_FORWARDER)/etc/ 
     77        install -m0755 -d $(IDIR_DHCP_FORWARDER)/usr/bin 
     78        cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/dhcp-fwd $(IDIR_DHCP_FORWARDER)/usr/bin/ 
     79        $(RSTRIP) $(IDIR_DHCP_FORWARDER) 
     80        $(IPKG_BUILD) $(IDIR_DHCP_FORWARDER) $(PACKAGE_DIR) 
    7981 
    80 $(IPKG_STATE_DIR)/info/$(PKG_NAME).list: $(PKG_IPK) 
    81         $(IPKG) install $(PKG_IPK) 
     82$(INFO_DHCP_FORWARDER): $(IPKG_DHCP_FORWARDER) 
     83        $(IPKG) install $(IPKG_DHCP_FORWARDER) 
    8284 
    8385source: $(DL_DIR)/$(PKG_SOURCE) 
    84 prepare: $(PKG_BUILD_DIR)/.unpacked 
    85 compile: $(PKG_IPK) 
    86 install: $(IPKG_STATE_DIR)/info/$(PKG_NAME).list 
     86prepare: $(PKG_BUILD_DIR)/.prepared 
     87compile: $(IPKG_DHCP_FORWARDER) 
     88install: $(INFO_DHCP_FORWARDER) 
    8789 
    8890clean: 
    8991        rm -rf $(PKG_BUILD_DIR) 
    90         rm -f $(PKG_IPK) 
    91  
     92        rm -rf $(IPKG_DHCP_FORWARDER) 
Note: See TracChangeset for help on using the changeset viewer.