65e24697ae252aaaa95f9006e543c99ab3330e11
2 # Copyright (C) 2010-2014 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
9 include $(INCLUDE_DIR
)/kernel.mk
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
17 PKG_VERSION
:=$(shell sed
-n
-e
'/^AC_INIT/s/.*\[\([[:digit:]\.]*\)\].*/\1/gp' $(LINUX_DIR
)/drivers
/staging
/usbip
/userspace
/configure.ac
)
22 PKG_MAINTAINER
:=Nuno Goncalves
<nunojpg@gmail.com
>
24 PATCH_DIR
:=.
/patches-
$(PKG_VERSION
)
26 define prepare_source_directory
27 rm -rf
$(PKG_BUILD_DIR
)
28 $(CP
) $(LINUX_DIR
)/drivers
/staging
/usbip
/userspace
$(PKG_BUILD_DIR
)
30 Hooks
/Prepare
/Pre
+= prepare_source_directory
32 PKG_BUILD_DEPENDS
:=glib2 sysfsutils
36 include $(INCLUDE_DIR
)/package.mk
37 include $(INCLUDE_DIR
)/nls.mk
39 define Package
/usbip
/Common
41 URL
:=http
://usbip.sourceforge.net
/
45 define Package
/usbip
/Default
46 $(call Package
/usbip
/Common
)
52 $(call Package
/usbip
/Default
)
54 DEPENDS
+= +libsysfs
+libwrap
+kmod-usbip
57 define Package
/usbip-client
58 $(call Package
/usbip
/Default
)
60 DEPENDS
+= usbip
+glib2
+kmod-usbip-client
63 define Package
/usbip-server
64 $(call Package
/usbip
/Default
)
66 DEPENDS
+= usbip
+glib2
+kmod-usbip-server
72 MAKE_FLAGS
+=CFLAGS
="-Wno-implicit-function-declaration"
74 define Build
/Configure
75 (cd
$(PKG_BUILD_DIR
); .
/autogen.sh
);
76 $(call Build
/Configure
/Default
)
79 CFLAGS
+="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include"
81 define Download
/usb.ids
82 URL
:=http
://www.linux-usb.org
/
87 define Package
/usbip
/install
88 $(INSTALL_DIR
) $(1)/usr
/lib
89 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libusbip.so.
* $(1)/usr
/lib
/
90 $(INSTALL_DIR
) $(1)/usr
/share
/hwdata
91 $(CP
) $(DL_DIR
)/usb.ids
$(1)/usr
/share
/hwdata
/
94 define Package
/usbip-client
/install
95 $(INSTALL_DIR
) $(1)/usr
/sbin
96 $(CP
) $(PKG_INSTALL_DIR
)/usr
/sbin
/usbip
$(1)/usr
/sbin
/
99 define Package
/usbip-server
/install
100 $(INSTALL_DIR
) $(1)/usr
/sbin
101 $(CP
) $(PKG_INSTALL_DIR
)/usr
/sbin
/usbipd
$(1)/usr
/sbin
/
104 $(eval
$(call Download
,usb.ids
))
105 $(eval
$(call BuildPackage
,usbip
))
106 $(eval
$(call BuildPackage
,usbip-client
))
107 $(eval
$(call BuildPackage
,usbip-server
))