Changeset 840


Ignore:
Timestamp:
2005-05-12T20:34:40+02:00 (13 years ago)
Author:
nbd
Message:

convert arpwatch to new packaging style

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

Legend:

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

    r644 r840  
    1313PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
    1414PKG_CAT:=zcat 
     15PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) 
    1516 
    16 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_NAME)-$(PKG_VERSION) 
     17include $(TOPDIR)/package/rules.mk 
    1718 
    18 IPKG_ARPWATCH:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk 
    19 IDIR_ARPWATCH:=$(PKG_BUILD_DIR)/ipkg/$(PKG_NAME) 
    20 INFO_ARPWATCH:=$(IPKG_STATE_DIR)/info/$(PKG_NAME).list 
     19$(eval $(call PKG_template,ARPWATCH,arpwatch,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) 
    2120 
    22 $(DL_DIR)/$(PKG_SOURCE): 
    23         $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL) 
    24  
    25 $(PKG_BUILD_DIR)/.prepared: $(DL_DIR)/$(PKG_SOURCE) 
    26         mkdir -p $(BUILD_DIR)/$(PKG_NAME) 
    27         $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR)/$(PKG_NAME) $(TAR_OPTIONS) - 
    28         touch $(PKG_BUILD_DIR)/.prepared 
    29  
    30 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared 
     21$(PKG_BUILD_DIR)/.configured: 
    3122        (cd $(PKG_BUILD_DIR); rm -rf config.cache; \ 
    3223                $(TARGET_CONFIGURE_OPTS) \ 
     
    5546                $(DISABLE_LARGEFILE) \ 
    5647        ); 
    57         touch $(PKG_BUILD_DIR)/.configured 
     48        touch $@ 
    5849 
    59 $(PKG_BUILD_DIR)/$(PKG_NAME): $(PKG_BUILD_DIR)/.configured 
     50$(PKG_BUILD_DIR)/.built: 
    6051        $(MAKE) -C $(PKG_BUILD_DIR) \ 
    6152                ARPDIR=/etc/arpwatch \ 
     
    6354                INCLS="-I. -I$(STAGING_DIR)/usr/include" \ 
    6455                LIBS="-L$(STAGING_DIR)/usr/lib -lpcap" \ 
    65            
    6656 
    67 $(IPKG_ARPWATCH): $(PKG_BUILD_DIR)/$(PKG_NAME) 
    68         $(SCRIPT_DIR)/make-ipkg-dir.sh $(IDIR_ARPWATCH) $(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH) 
    69         cp arpwatch.conffiles $(IDIR_ARPWATCH)/CONTROL/conffiles 
     57$(IPKG_ARPWATCH): 
    7058        mkdir -p $(IDIR_ARPWATCH)/usr/sbin 
    7159        cp $(PKG_BUILD_DIR)/arpwatch $(IDIR_ARPWATCH)/usr/sbin/ 
     
    7462        mkdir -p $(IDIR_ARPWATCH)/etc/arpwatch 
    7563        cp $(PKG_BUILD_DIR)/arp.dat $(IDIR_ARPWATCH)/etc/arpwatch/ 
    76         mkdir -p $(PACKAGE_DIR) 
    7764        $(IPKG_BUILD) $(IDIR_ARPWATCH) $(PACKAGE_DIR) 
    78  
    79 $(INFO_ARPWATCH): $(IPKG_ARPWATCH) 
    80         $(IPKG) install $(IPKG_ARPWATCH) 
    81  
    82 source: $(DL_DIR)/$(PKG_SOURCE) 
    83 prepare: $(PKG_BUILD_DIR)/.prepared 
    84 compile: $(IPKG_ARPWATCH) 
    85 install: $(INFO_ARPWATCH) 
    86  
    87 clean: 
    88         rm -rf $(PKG_BUILD_DIR) $(IPKG_ARPWATCH) 
Note: See TracChangeset for help on using the changeset viewer.