File usbip-kmp.spec of Package usbip-kmp-default

BuildRequires: kernel-source kernel-syms linux-kernel-headers module-init-tools coreutils grep

Name:		usbip
License: 	GPL
Group: 		System/Kernel
Summary: 	The USB/IP shares system over IP network
Version: 	0.1.6
Release: 	3
URL: 		http://usbip.sourceforge.net/
Source0:	usbip-%{version}.tar.bz2
BuildRoot:    	%{_tmppath}/%{name}-%{version}-build
#Requires:	kernel-default = %{uname}

%suse_kernel_module_package kdump um

%description
The USB/IP Project aims to develop a general USB device sharing system over IP network. 
To share USB devices between computers with their full functionality, USB/IP encapsulates "USB I/O messages" into IP packets and transmits them between computers. 
Original USB device drivers and applications can be also used for remote USB devices without any modification of them. A computer can use remote USB devices as if they were directly attached; for example, we can ... 

%package KMP
Summary:	Kernel module for USB/IP
Group:		System/Kernel

%description KMP
This is the kernel modules for USB/IP

%prep

%setup -n usbip-0.1.6
%build
#build drivers
cd drivers
export EXTRA_CFLAGS='-DVERSION=\"%version\"'
for flavor in %flavors_to_build; do
    rm -rf obj/$flavor
    mkdir -p obj/$flavor
echo $PWD 
    cp -r `readlink /usr/src/linux-obj | sed -ne 's/^linux-\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/p'`/* obj/$flavor
    make -C /usr/src/linux-obj/%_target_cpu/$flavor modules \
	M=$PWD/obj/$flavor
done 

%install
cd drivers
export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
export INSTALL_MOD_DIR=updates
for flavor in %flavors_to_build; do
    make -C /usr/src/linux-obj/%_target_cpu/$flavor modules_install \
	 M=$PWD/obj/$flavor
done

%clean
rm -rf $RPM_BUILD_ROOT 

%changelog
* Thu Jul 17 2008 - rlemeill
- Initial release
openSUSE Build Service is sponsored by