File ndiswrapper.spec of Package ndiswrapper

#
# spec file for package ndiswrapper (Version 1.53)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           ndiswrapper
BuildRequires:  kernel-source kernel-syms module-init-tools
Group:          System/Kernel
AutoReqProv:    on
Summary:        Use Microsoft NDIS Network Drivers for WLAN Cards
Version:        1.53
Release:        12.<RELEASE38>
Requires:       pciutils
Requires:       ndiswrapper-kmp
Source0:        %name-%version.tar.bz2
Source1:        Makefile.in
Source2:        README.SUSE
Source3:        preamble
Patch0:         ndiswrapper.diff
Patch1:         ndiswrapper-iwe_info.patch
Patch2:         ndiswrapper-long-essid.patch
Url:            http://ndiswrapper.sourceforge.net
License:        GPL v2 or later
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
ExclusiveArch:  %ix86 x86_64
%suse_kernel_module_package -p %_sourcedir/preamble kdump um debug ec2

%description
Some wireless LAN vendors refuse to release hardware specifications or
drivers for their products for operating systems other than Microsoft
Windows. The ndiswrapper project makes it possible to use such hardware
with Linux by means of a loadable kernel module that "wraps around"
NDIS (Windows network driver API) drivers.



Authors:
--------
    Pontus Fuchs <pof@users.sourceforge.net>

%package KMP
License:        GPL v2 or later
Group:          System/Kernel
Summary:        Use Microsoft NDIS Network Drivers for WLAN Cards

%description KMP
Some wireless LAN vendors refuse to release hardware specifications or
drivers for their products for operating systems other than Microsoft
Windows. The ndiswrapper project makes it possible to use such hardware
with Linux by means of a loadable kernel module that "wraps around"
NDIS (Windows network driver API) drivers.



Authors:
--------
    Pontus Fuchs <pof@users.sourceforge.net>

%prep
%setup
%patch0
%patch1
%patch2 -p0
cp %SOURCE2 .
mkdir obj

%build
CFLAGS="$RPM_OPT_FLAGS" make -C utils
export EXTRA_CFLAGS='-DVERSION=\"%version\"'
sed -e "s/@DRV_VERSION@/%{version}/" \
	%_sourcedir/Makefile.in > driver/Makefile
for flavor in %flavors_to_build; do
    rm -rf obj/$flavor
    cp -r driver obj/$flavor
    # broken, ugly hack
    pushd obj/$flavor
    for i in hal crt ndis ntoskernel ntoskernel_io rtl usb ; do sh mkexport.sh $i.c ${i}_exports.h ; done
    popd
    make -C /usr/src/linux-obj/%_target_cpu/$flavor modules \
       M=$PWD/obj/$flavor
done

%install
install -d -m 755 %buildroot/sbin %buildroot/usr/sbin \
    %buildroot/etc/ndiswrapper
# Userspace stuff
install -m 755 utils/loadndisdriver %buildroot/sbin
install -m 755 utils/ndiswrapper %buildroot/usr/sbin
# Kernel module
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

%files
%defattr(-, root, root)
/etc/ndiswrapper
/sbin/loadndisdriver
/usr/sbin/ndiswrapper
%doc README
%doc README.SUSE
%doc INSTALL
%doc AUTHORS
%doc ChangeLog

%changelog
openSUSE Build Service is sponsored by