File madwifi-openhal.spec of Package madwifi-openhal

#
# spec file for package madwifi (Version 0.9.3)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild
%define SVN_VERSION r2352

Name:           madwifi-openhal
BuildRequires:  kernel-source kernel-syms module-init-tools
Summary:        Tools for configuring atheros cards
Version:        0.8.2_%{SVN_VERSION}
Release:        1
Group:          Hardware/Other
License:        BSD License and BSD-like
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
URL:            http://madwifi.org/
Autoreqprov:    on
Obsoletes:      madwifi
Provides:       madwifi
Source:         madwifi-old-openhal-%{SVN_VERSION}.tar.bz2
ExclusiveArch: %ix86 x86_64

%suse_kernel_module_package -n madwifi-openhal kdump um

%description
Tools for configuring atheros cards



Authors:
--------
    Sam Leffler <sam@errno.com> (madwifi)
    Greg Chesson <madwifi@atheros.com> (madwifi)

%package -n madwifi-devel
Group:          Hardware/Other
License:        BSD License and BSD-like
Summary:        Tools for configuring atheros cards

%description -n madwifi-devel
Tools for configuring atheros cards



Authors:
--------
    Sam Leffler <sam@errno.com> (madwifi)
    Greg Chesson <madwifi@atheros.com> (madwifi)

%package -n madwifi-openhal-KMP
Group:          System/Kernel
License:        BSD License and BSD-like
Summary:        kernel modules for atheros cards

%description -n madwifi-openhal-KMP
kernel modules for atheros cards



Authors:
--------
    Sam Leffler <sam@errno.com> (madwifi)
    Greg Chesson <madwifi@atheros.com> (madwifi)

%prep
%setup -n madwifi-old-openhal-%{SVN_VERSION}

%build
echo "#define SVNVERSION \"%{SVN_VERSION}\"" > svnversion.h
# madwifi also has some userspace tools
CFLAGS="$RPM_OPT_FLAGS" make -C tools
# build modules
cd ..
mkdir -p obj
for flavor in %flavors_to_build; do
  rm -rf obj/$flavor
  cp -r madwifi-old-openhal-%{SVN_VERSION} obj/$flavor
  make -k -C /usr/src/linux-obj/%_target_cpu/$flavor modules \
       M=$PWD/obj/$flavor KERNELPATH=/usr/src/linux-obj/%_target_cpu/$flavor
done

%install
CFLAGS="$RPM_OPT_FLAGS" make -C tools install DESTDIR=$RPM_BUILD_ROOT BINDIR=%{_bindir} MANDIR=%{_mandir}
mkdir -p $RPM_BUILD_ROOT/usr/include/%{name}/net80211
cp -a include $RPM_BUILD_ROOT/usr/include/%{name}
cp -a net80211/*.h $RPM_BUILD_ROOT/usr/include/%{name}/net80211
cd ..
# install kernel modules
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

%files
%defattr(-,root,root)
%{_bindir}/*
%doc COPYRIGHT* README* TODO* 
#%doc %{_mandir}/man*/*
#%doc docs/users-guide.pdf docs/WEP-HOWTO.txt

%files -n madwifi-devel
%defattr(-,root,root)
%{_includedir}/%{name}

%changelog
openSUSE Build Service is sponsored by