lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

Makefile (2574B)


      1 #
      2 # Copyright (C) 2010-2015 OpenWrt.org
      3 #
      4 # This is free software, licensed under the GNU General Public License v2.
      5 # See /LICENSE for more information.
      6 #
      7 
      8 include $(TOPDIR)/rules.mk
      9 include $(INCLUDE_DIR)/kernel.mk
     10 
     11 PKG_NAME:=usbip
     12 PKG_RELEASE:=5
     13 PKG_LICENSE:=GPL-2.0
     14 
     15 # Since kernel 2.6.39.1 userspace tools are inside the kernel tree
     16 # Package Automatic match version in kernel
     17 # MD5SUM is not useful kernel package already check it
     18 PKG_VERSION:=$(shell  sed -n -e '/^AC_INIT/s/.*\[\([[:digit:]\.]*\)\].*/\1/gp' $(LINUX_DIR)/tools/usb/usbip/configure.ac)
     19 PKG_SOURCE:=
     20 PKG_SOURCE_URL:=
     21 PKG_MD5SUM:=unknown
     22 
     23 PKG_MAINTAINER:=Nuno Goncalves <nunojpg@gmail.com>
     24 
     25 PATCH_DIR:=./patches-$(PKG_VERSION)
     26 
     27 define prepare_source_directory
     28 	rm -rf $(PKG_BUILD_DIR)
     29 	$(CP) $(LINUX_DIR)/tools/usb/usbip $(PKG_BUILD_DIR)
     30 endef
     31 Hooks/Prepare/Pre += prepare_source_directory
     32 
     33 PKG_BUILD_DEPENDS:=eudev
     34 PKG_FIXUP:=autoreconf
     35 PKG_INSTALL:=1
     36 PKG_FLAGS:=nonshared
     37 
     38 include $(INCLUDE_DIR)/package.mk
     39 include $(INCLUDE_DIR)/nls.mk
     40 
     41 define Package/usbip/Common
     42   TITLE:=USB-over-IP
     43   URL:=http://usbip.sourceforge.net/
     44   DEPENDS:=@USB_SUPPORT
     45 endef
     46 
     47 define Package/usbip/Default
     48   $(call Package/usbip/Common)
     49   SECTION:=net
     50   CATEGORY:=Network
     51 endef
     52 
     53 define Package/usbip
     54   $(call Package/usbip/Default)
     55   TITLE+= (common)
     56   DEPENDS+= +libwrap +kmod-usbip +eudev
     57 endef
     58 
     59 define Package/usbip-client
     60   $(call Package/usbip/Default)
     61   TITLE+= (client)
     62   DEPENDS+= usbip +kmod-usbip-client
     63 endef
     64 
     65 define Package/usbip-server
     66   $(call Package/usbip/Default)
     67   TITLE+= (server)
     68   DEPENDS+= usbip +kmod-usbip-server
     69 endef
     70 
     71 CONFIGURE_PATH:=.
     72 MAKE_PATH:=.
     73 LIBTOOL_PATHS:=.
     74 MAKE_FLAGS+=CFLAGS="-Wno-implicit-function-declaration"
     75 
     76 define Build/Configure
     77 	(cd $(PKG_BUILD_DIR); ./autogen.sh );
     78 	$(call Build/Configure/Default)
     79 endef
     80 
     81 CFLAGS+="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include"
     82 
     83 define Download/usb.ids
     84   URL:=http://www.linux-usb.org/
     85   FILE:=usb.ids
     86   MD5SUM:=
     87 endef
     88 
     89 define Package/usbip/install
     90 	$(INSTALL_DIR) $(1)/usr/lib
     91 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libusbip.so.* $(1)/usr/lib/
     92 	$(INSTALL_DIR) $(1)/usr/share/hwdata
     93 	$(CP) $(DL_DIR)/usb.ids $(1)/usr/share/hwdata/
     94 endef
     95 
     96 define Package/usbip-client/install
     97 	$(INSTALL_DIR) $(1)/usr/sbin
     98 	$(CP) $(PKG_INSTALL_DIR)/usr/sbin/usbip $(1)/usr/sbin/
     99 endef
    100 
    101 define Package/usbip-server/install
    102 	$(INSTALL_DIR) $(1)/usr/sbin
    103 	$(CP) $(PKG_INSTALL_DIR)/usr/sbin/usbipd $(1)/usr/sbin/
    104 endef
    105 
    106 $(eval $(call Download,usb.ids))
    107 $(eval $(call BuildPackage,usbip))
    108 $(eval $(call BuildPackage,usbip-client))
    109 $(eval $(call BuildPackage,usbip-server))