Changeset 32887


Ignore:
Timestamp:
2012-07-27T13:49:22+02:00 (6 years ago)
Author:
florian
Message:

[package] usbip: update userspace to match kernel part

After kernel 2.6.39, usbip kernel and userspace are in kernel tree
The new kernel modules names have already been updated in openwrt for
kernel > 2.6.39

This patch, allow to build the new corresponding usbip userspace tool
when of the device use a kernel > 2.6.39
And continue to build version 0.1.7 for older version.

Fix #10992

Florian:

  • do not use an md5sum for usb.ids since it changes often
  • dropped the parts to support kernels <= 2.6.39
  • make the package depend on LINUX_3_3

Signed-off-by: Mehdi Abaakouk <sileht@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • packages/net/usbip/Makefile

    r32206 r32887  
    11# 
    2 # Copyright (C) 2010-2011 OpenWrt.org 
     2# Copyright (C) 2010-2012 OpenWrt.org 
    33# 
    44# This is free software, licensed under the GNU General Public License v2. 
     
    77 
    88include $(TOPDIR)/rules.mk 
     9include $(INCLUDE_DIR)/kernel.mk 
    910 
    1011PKG_NAME:=usbip 
    11 PKG_VERSION:=0.1.7 
    1212PKG_RELEASE:=2 
    1313 
    14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
    15 PKG_SOURCE_URL:=@SF/usbip 
    16 PKG_MD5SUM:=d1094b6d4449787864f8be001639232c 
     14# Since kernel 2.6.39.1 userspace tools are inside the kernel tree 
     15# Package Automatic match version in kernel 
     16# MD5SUM is not useful kernel package already check it 
     17PKG_VERSION:=$(shell  sed -n -e '/^AC_INIT/s/.*\[\([[:digit:]\.]*\)\].*/\1/gp' $(LINUX_DIR)/drivers/staging/usbip/userspace/configure.ac) 
     18PKG_SOURCE:= 
     19PKG_SOURCE_URL:= 
     20PKG_MD5SUM:=unknown 
     21PATCH_DIR:=./patches-$(PKG_VERSION) 
     22 
     23define prepare_source_directory 
     24        rm -rf $(PKG_BUILD_DIR) 
     25        $(CP) $(LINUX_DIR)/drivers/staging/usbip/userspace $(PKG_BUILD_DIR) 
     26endef 
     27Hooks/Prepare/Pre += prepare_source_directory 
    1728 
    1829PKG_BUILD_DEPENDS:=glib2 sysfsutils 
     
    2637  TITLE:=USB-over-IP 
    2738  URL:=http://usbip.sourceforge.net/ 
    28   DEPENDS:=@USB_SUPPORT 
     39  DEPENDS:=@USB_SUPPORT @LINUX_3_3 
    2940  MAINTAINER:=Nuno Goncalves <nunojpg@gmail.com> 
    3041endef 
    3142 
    3243define Package/usbip/Default 
    33 $(call Package/usbip/Common) 
     44  $(call Package/usbip/Common) 
    3445  SECTION:=net 
    3546  CATEGORY:=Network 
     
    3748 
    3849define Package/usbip 
    39 $(call Package/usbip/Default) 
     50  $(call Package/usbip/Default) 
    4051  TITLE+= (common) 
    4152  DEPENDS+= +libsysfs +libwrap +kmod-usbip 
     
    4354 
    4455define Package/usbip-client 
    45 $(call Package/usbip/Default) 
     56  $(call Package/usbip/Default) 
    4657  TITLE+= (client) 
    4758  DEPENDS+= usbip +glib2 +kmod-usbip-client 
     
    4960 
    5061define Package/usbip-server 
    51 $(call Package/usbip/Default) 
     62  $(call Package/usbip/Default) 
    5263  TITLE+= (server) 
    53   DEPENDS+= usbip +glib2 +kmod-usbip-server 
     64  DEPENDS+= usbip usbip-client +glib2 +kmod-usbip-server 
    5465endef 
    5566 
    56 CONFIGURE_PATH:=./src 
    57 MAKE_PATH:=./src 
    58 LIBTOOL_PATHS:=./src 
     67CONFIGURE_PATH:=. 
     68MAKE_PATH:=. 
     69LIBTOOL_PATHS:=. 
     70MAKE_FLAGS+=CFLAGS="-Wno-implicit-function-declaration" 
     71 
     72define Build/Configure 
     73        (cd $(PKG_BUILD_DIR); ./autogen.sh ); 
     74        $(call Build/Configure/Default) 
     75endef 
    5976 
    6077CFLAGS+="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include" 
    6178 
     79define Download/usb.ids 
     80  URL:=http://www.linux-usb.org/ 
     81  FILE:=usb.ids 
     82  MD5SUM:= 
     83endef 
     84 
    6285define Package/usbip/install 
    6386        $(INSTALL_DIR) $(1)/usr/lib 
    64         $(CP) \ 
    65                 $(PKG_INSTALL_DIR)/usr/lib/libusbip.so.* \ 
    66                 $(1)/usr/lib/ 
    67         $(INSTALL_DIR) $(1)/usr/share/usbip 
    68         $(CP) \ 
    69                 $(PKG_INSTALL_DIR)/usr/share/usbip/usb.ids \ 
    70                 $(1)/usr/share/usbip/ 
     87        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libusbip.so.* $(1)/usr/lib/ 
     88        $(INSTALL_DIR) $(1)/usr/share/hwdata 
     89        $(CP) $(DL_DIR)/usb.ids $(1)/usr/share/hwdata/ 
    7190endef 
    7291 
    7392define Package/usbip-client/install 
    74         $(INSTALL_DIR) $(1)/usr/bin 
    75         $(CP) \ 
    76                 $(PKG_INSTALL_DIR)/usr/bin/usbip \ 
    77                 $(1)/usr/bin/ 
     93        $(INSTALL_DIR) $(1)/usr/sbin 
     94        $(CP) $(PKG_INSTALL_DIR)/usr/sbin/usbip $(1)/usr/sbin/ 
    7895endef 
    7996 
    8097define Package/usbip-server/install 
    81         $(INSTALL_DIR) $(1)/usr/bin 
    82         $(CP) \ 
    83                 $(PKG_INSTALL_DIR)/usr/bin/usbipd \ 
    84                 $(1)/usr/bin/ 
    85         $(CP) \ 
    86                 $(PKG_INSTALL_DIR)/usr/bin/bind_driver \ 
    87                 $(1)/usr/bin/usbip_bind_driver 
     98        $(INSTALL_DIR) $(1)/usr/sbin 
     99        $(CP) $(PKG_INSTALL_DIR)/usr/sbin/usbipd $(1)/usr/sbin/ 
    88100endef 
    89101 
     102$(eval $(call Download,usb.ids)) 
    90103$(eval $(call BuildPackage,usbip)) 
    91104$(eval $(call BuildPackage,usbip-client)) 
Note: See TracChangeset for help on using the changeset viewer.