Ticket #623: bing-1.3.5.patch

File bing-1.3.5.patch, 1.7 KB (added by spam@…, 12 years ago)

The patch to build an ipkg of bing-1.3.5

  • ipkg/bing.control

    diff -ruN package/bing.orig/ipkg/bing.control package/bing/ipkg/bing.control
    old new  
     1Package: bing 
     2Priority: optional 
     3Section: misc 
     4Description: bing bandwidth measuring utility 
  • package/bing

    diff -ruN package/bing.orig/Makefile package/bing/Makefile
    old new  
     1include $(TOPDIR)/rules.mk 
     2 
     3PKG_NAME:=bing 
     4PKG_VERSION:=1.3.5 
     5PKG_RELEASE:=1 
     6PKG_MD5SUM:=60aaee55277672d0cc163bf3f0b3d53f 
     7 
     8PKG_SOURCE_URL:=http://fgouget.free.fr/bing/ 
     9PKG_SOURCE:=$(PKG_NAME)_src-$(PKG_VERSION).tar.gz 
     10PKG_CAT:=zcat 
     11 
     12PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) 
     13PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install 
     14 
     15include $(TOPDIR)/package/rules.mk 
     16 
     17$(eval $(call PKG_template,BING,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) 
     18 
     19$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared 
     20        #Since there is no configure script, we can directly go to the building step 
     21        touch $@ 
     22 
     23$(PKG_BUILD_DIR)/.built: 
     24        rm -rf $(PKG_INSTALL_DIR) 
     25        mkdir -p $(PKG_INSTALL_DIR)/usr/bin 
     26        #Note here that we pass cross-compiler as default compiler to use 
     27        $(MAKE) -C $(PKG_BUILD_DIR) \ 
     28                CC=$(TARGET_CC) \ 
     29                $(TARGET_CONFIGURE_OPTS) \ 
     30                prefix="$(PKG_INSTALL_DIR)/usr" 
     31        $(CP) $(PKG_BUILD_DIR)/bing $(PKG_INSTALL_DIR)/usr/bin 
     32        touch $@ 
     33 
     34$(IPKG_BING): 
     35        install -d -m0755 $(IDIR_BING)/usr/bin 
     36        $(CP) $(PKG_INSTALL_DIR)/usr/bin/bing $(IDIR_BING)/usr/bin 
     37        $(RSTRIP) $(IDIR_BING) 
     38        $(IPKG_BUILD) $(IDIR_BING) $(PACKAGE_DIR) 
     39 
     40mostlyclean: 
     41        make -C $(PKG_BUILD_DIR) clean 
     42        rm $(PKG_BUILD_DIR)/.built