SPECS: ieee80211.spec
Bartosz Swiatek
swiatek w informatik.hu-berlin.de
Pią, 15 Lip 2005, 17:37:49 CEST
Z góry przepraszam, że to .spec a nie .patch, ale zdążyłem niechcący usunąć
stary .spec :(
- buduje się na non-dist
- nagłówki dodane
- usunięty patch0
Czy ktoś mógłby powiedzieć jak to się buduje na dystrybucyjnym jądrze ?
-------------- następna część ---------
# $Revision: 1.01 $, $Date: 2005/07/15 14:41:48 $
#
# Conditional build:
%bcond_without dist_kernel # allow non-distribution kernel
%bcond_without smp # don't build SMP module
%bcond_with verbose # verbose build (V=1)
#
Summary: ieee80211 subsystem for Linux
Summary(pl): Sterownik ieee80211 dla Linuksa
Name: ieee80211
Version: 1.0.3
%define _rel 1
Release: %{_rel}
License: GPL v2 (?)
Group: Base/Kernel
Source0: http://kent.dl.sourceforge.net/sourceforge/ieee80211/%{name}-%{version}.tgz
# Source0-md5: 49870c030278e3716194ff5b64f9cbaa
URL: http://ieee80211.sourceforge.net/
%{?with_dist_kernel:BuildRequires: kernel-module-build >= 2.6.7}
BuildRequires: rpmbuild(macros) >= 1.153
BuildRequires: sed >= 4.0
#Requires:
ExclusiveArch: %{ix86} %{x8664}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
A generic ieee80211 networking stack for the Linux kernel
%description -l pl
Ogólny stos sieciowy ieee80211 dla jądra Linuksa
%package -n kernel-net-ieee80211
Summary: Linux kernel module for the ieee80211 networking stack
Summary(pl): Moduł jądra Linuksa dla stosu sieciowego ieee80211
Release: %{_rel}@%{_kernel_ver_str}
Group: Base/Kernel
#Requires: ipw2200-firmware = 2.3
Requires: hotplug
%{?with_dist_kernel:%requires_releq_kernel_up}
Requires(post,postun): /sbin/depmod
%description -n kernel-net-ieee80211
This package contains Linux kernel drivers for the ieee80211 networking stack.
%description -n kernel-net-ieee80211 -l pl
Ten pakiet zawiera sterowniki jądra Linuksa dla stosu sieciowego ieee80211.
%package -n kernel-smp-net-ieee80211
Summary: Linux SMP kernel module for the ieee80211 networking stack.
Summary(pl): Moduł jądra Linuksa SMP dla stosu sieciowego ieee80211.
Release: %{_rel}@%{_kernel_ver_str}
Group: Base/Kernel
#Requires: ipw2200-firmware = 2.3
Requires: hotplug
%{?with_dist_kernel:%requires_releq_kernel_smp}
Requires(post,postun): /sbin/depmod
%description -n kernel-smp-net-ieee80211
This package contains Linux SMP kernel drivers for the ieee80211 networking stack.
%description -n kernel-smp-net-ieee80211 -l pl
Ten pakiet zawiera sterowniki jądra Linuksa SMP dla stosu sieciowego ieee80211.
%prep
%setup -q
%build
# kernel module(s)
rm -rf built
mkdir -p built/{nondist,smp,up}
for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
ln -sf %{_kernelsrcdir}/config-$cfg .config
if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
exit 1
fi
rm -rf include
install -d include/{linux,config}
# ln -sf %{_kernelsrcdir}/config-$cfg .config
ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h include/linux/autoconf.h
ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
%if %{without dist_kernel}
ln -sf %{_kernelsrcdir}/scripts
%endif
touch include/config/MARKER
%{__make} -C %{_kernelsrcdir} clean \
RCS_FIND_IGNORE="-name '*.ko' -o" \
M=$PWD O=$PWD \
%{?with_verbose:V=1}
%{__make} -C %{_kernelsrcdir} modules \
CC="%{__cc}" CPP="%{__cpp}" \
M=$PWD MODVERDIR=$PWD \
%{?with_verbose:V=1}
mv *.ko built/$cfg
mv net/*.h built/$cfg
done
%install
rm -rf $RPM_BUILD_ROOT
cd built
install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/kernel/drivers/net/wireless
install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/include/net
install %{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}/*.ko \
$RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/drivers/net/wireless
install %{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}/*.h \
$RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/include/net
%if %{with smp} && %{with dist_kernel}
install smp/*.ko \
$RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/kernel/drivers/net/wireless
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%post -n kernel-net-ieee80211
%depmod %{_kernel_ver}
%postun -n kernel-net-ieee80211
%depmod %{_kernel_ver}
%post -n kernel-smp-net-ieee80211
%depmod %{_kernel_ver}smp
%postun -n kernel-smp-net-ieee80211
%depmod %{_kernel_ver}smp
%files -n kernel-net-ieee80211
%defattr(644,root,root,755)
/lib/modules/%{_kernel_ver}/kernel/drivers/net/wireless/ieee80211*.ko*
/lib/modules/%{_kernel_ver}/include/net/ieee80211*.h*
%if %{with smp} && %{with dist_kernel}
%files -n kernel-smp-net-ieee80211
%defattr(644,root,root,755)
/lib/modules/%{_kernel_ver}smp/kernel/drivers/net/wireless/ieee80211*.ko*
#/lib/modules/%{_kernel_ver}smp/include/net/ieee80211*.h*
%endif
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
* %{date} PLD Team <feedback w pld-linux.org>
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log: ieee80211.spec,v $
Revision 1.0 2005/07/15 14:46:08 shadzik w atwa.us
- initial version
- required by ipw2200 >= 1.0.5
- check if it builds on dist kernel
- wtf it won't build on non-dist kernel ?
- it needs several fixes
Więcej informacji o liście dyskusyjnej pld-devel-pl