Changeset 859


Ignore:
Timestamp:
2005-05-12T22:45:01+02:00 (13 years ago)
Author:
nbd
Message:

update iproute2 to new packaging style

Location:
trunk/openwrt/package/iproute2
Files:
3 added
2 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/openwrt/package/iproute2/Makefile

    r577 r859  
    1313PKG_CAT:=zcat 
    1414 
    15 PKG_IP:=$(PACKAGE_DIR)/ip_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk 
    16 PKG_IP_DIR:=$(PKG_BUILD_DIR)/ipkg/ip 
     15include $(TOPDIR)/package/rules.mk 
    1716 
    18 PKG_TC:=$(PACKAGE_DIR)/tc_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk 
    19 PKG_TC_DIR:=$(PKG_BUILD_DIR)/ipkg/tc 
     17$(eval $(call PKG_template,IPROUTE2_IP,ip,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) 
     18$(eval $(call PKG_template,IPROUTE2_TC,tc,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) 
    2019 
    21 .NOTPARALLEL: 
    22  
    23 $(DL_DIR)/$(PKG_SOURCE): 
    24          $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL) 
    25  
    26 $(PKG_BUILD_DIR)/.patched: $(DL_DIR)/$(PKG_SOURCE) 
    27         $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - 
    28         $(PATCH) $(PKG_BUILD_DIR) ./patches 
     20$(PKG_BUILD_DIR)/.configured: 
    2921        $(SED) "s:-O2:${TARGET_CFLAGS}:g" $(PKG_BUILD_DIR)/Makefile 
    30         touch $(PKG_BUILD_DIR)/.patched 
    31  
    32 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.patched 
    3322        $(SED) "s,-I/usr/include/db3,," $(PKG_BUILD_DIR)/Makefile 
    3423        $(SED) "s,^KERNEL_INCLUDE.*,KERNEL_INCLUDE=$(LINUX_DIR)/include," \ 
     
    3928        rm -rf $(PKG_BUILD_DIR)/misc  
    4029        $(SED) "s, misc,," $(PKG_BUILD_DIR)/Makefile 
    41         touch $(PKG_BUILD_DIR)/.configured 
     30        touch $@ 
    4231 
    43 $(PKG_BUILD_DIR)/tc/tc: $(PKG_BUILD_DIR)/.configured 
    44         $(MAKE) -j1 -C $(PKG_BUILD_DIR) $(TARGET_CONFIGURE_OPTS) KERNEL_INCLUDE=$(LINUX_DIR)/include all tc/tc 
     32$(PKG_BUILD_DIR)/.built: 
     33        $(MAKE) -j1 -C $(PKG_BUILD_DIR) $(TARGET_CONFIGURE_OPTS) KERNEL_INCLUDE=$(LINUX_DIR)/include all tc/tc ip/ip 
     34        touch $@ 
    4535 
    46 $(PKG_BUILD_DIR)/ip/ip: $(PKG_BUILD_DIR)/.configured 
    47         $(MAKE) -j1 -C $(PKG_BUILD_DIR) $(TARGET_CONFIGURE_OPTS) KERNEL_INCLUDE=$(LINUX_DIR)/include all ip/ip 
     36$(IPKG_IPROUTE2_IP): 
     37        mkdir -p $(IDIR_IPROUTE2_IP)/usr/sbin 
     38        cp $(PKG_BUILD_DIR)/ip/ip $(IDIR_IPROUTE2_IP)/usr/sbin/ 
     39        $(STRIP) $(IDIR_IPROUTE2_IP)/usr/sbin/* 
     40        $(IPKG_BUILD) $(IDIR_IPROUTE2_IP) $(PACKAGE_DIR) 
    4841 
     42$(IPKG_IPROUTE2_TC): 
     43        mkdir -p $(IDIR_IPROUTE2_TC)/usr/sbin 
     44        cp $(PKG_BUILD_DIR)/ip/ip $(IDIR_IPROUTE2_TC)/usr/sbin/ 
     45        $(STRIP) $(IDIR_IPROUTE2_TC)/usr/sbin/* 
     46        $(IPKG_BUILD) $(IDIR_IPROUTE2_TC) $(PACKAGE_DIR) 
    4947 
    50 $(PKG_IP): $(PKG_BUILD_DIR)/ip/ip $(PACKAGE_DIR) 
    51         $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_IP_DIR) ip.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH) 
    52         mkdir -p $(PKG_IP_DIR)/usr/sbin 
    53         cp $< $(PKG_IP_DIR)/usr/sbin/ 
    54         $(STRIP) $(PKG_IP_DIR)/usr/sbin/* 
    55         $(IPKG_BUILD) $(PKG_IP_DIR) $(PACKAGE_DIR) 
    56  
    57 $(IPKG_STATE_DIR)/info/ip.list: $(PKG_IP) 
    58         $(IPKG) install $(PKG_IP) 
    59  
    60 $(PKG_TC): $(PKG_BUILD_DIR)/tc/tc $(PACKAGE_DIR) 
    61         $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_TC_DIR) tc.control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH) 
    62         mkdir -p $(PKG_TC_DIR)/usr/sbin 
    63         cp $< $(PKG_TC_DIR)/usr/sbin/ 
    64         $(STRIP) $(PKG_TC_DIR)/usr/sbin/* 
    65         $(IPKG_BUILD) $(PKG_TC_DIR) $(PACKAGE_DIR) 
    66  
    67 $(IPKG_STATE_DIR)/info/tc.list: $(PKG_TC) 
    68         $(IPKG) install $(PKG_TC) 
    69  
    70 $(PACKAGE_DIR): 
    71         mkdir -p $(PACKAGE_DIR) 
    72  
    73 TARGETS:= 
    74 ifneq ($(BR2_PACKAGE_IPROUTE2_IP),) 
    75 TARGETS += $(PKG_IP) 
    76 endif 
    77 ifneq ($(BR2_PACKAGE_IPROUTE2_TC),) 
    78 TARGETS += $(PKG_TC) 
    79 endif 
    80  
    81 ifeq ($(BR2_PACKAGE_IPROUTE2_IP),y) 
    82 INSTALL_TARGETS += $(IPKG_STATE_DIR)/info/ip.list 
    83 endif 
    84 ifeq ($(BR2_PACKAGE_IPROUTE2_TC),y) 
    85 INSTALL_TARGETS += $(IPKG_STATE_DIR)/info/tc.list 
    86 endif 
    87  
    88 source: $(DL_DIR)/$(PKG_SOURCE) 
    89 prepare: $(PKG_BUILD_DIR)/.patched 
    90 compile: $(TARGETS) 
    91 install: $(INSTALL_TARGETS) 
    92  
    93 clean: 
    94         rm -rf $(PKG_BUILD_DIR) 
    95         rm -f $(PKG_IP) $(PKG_TC) 
Note: See TracChangeset for help on using the changeset viewer.