{SPECS,SOURCES}, fasttrak.spec, fasttrak-cfg_linux.patch
Bartosz Świątek
swiatek at informatik.hu-berlin.de
Sun Mar 26 15:22:51 CEST 2006
Dnia czwartek, 23 marca 2006 22:12, Przemek Iskra napisał(a):
> On Thu, Mar 23, 2006 at 09:31:03PM +0100, Bartosz Świątek wrote:
> > Witam,
> >
> > Tego zdaje się nie ma w PLD jeszcze.
> > Buduje się ładnie na niedystrybucyjnym jądrze, czy ktoś mógłby sprawdzić
> > jak to wygląda na dystrybucyjnym jądrze.
> > Za wszelkie uwagi będę wdzięczny, natomiast jeśli takowych nie ma, to
> > prosze o dodanie speca wraz z patchem do cvsu.
>
> nie powiem że spec nie jest dokończony, ponieważ nie jest on nawet dobrze
> zaczęty, zrób to na podstawie template-kernel-module.spec
Dzięki za uwagę :)
Poprawione.
p.s
zdaje się, że poprzednio nie doszedł ten mail na listę.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fasttrak-cfg_linux.patch
Type: text/x-diff
Size: 330 bytes
Desc: not available
URL: </mailman/pipermail/pld-devel-pl/attachments/20060326/45a42d1c/attachment.bin>
-------------- next part --------------
# $Revision: 1.34 $, $Date: 2006/03/02 18:45:05 $
#
# Replace MODULE_NAME with real module name and MODULE_DIR
# with required directory name.
#
# Conditional build:
%bcond_without dist_kernel # allow non-distribution kernel
%bcond_without kernel # don't build kernel modules
%bcond_without smp # don't build SMP module
%bcond_with verbose # verbose build (V=1)
%if %{without kernel}
%undefine with_dist_kernel
%endif
#
# main package.
#
%define _rel 1
Summary: FastTrak Driver for Linux
Summary(pl): Sterownik FastTrak dla Linuksa
Name: fasttrak
Version: 2.06
Release: %{_rel}
Epoch: 0
License: GPL
Group: Base/Kernel
Source0: http://teksty.info/~shadzik/partialb32.tgz
# Source0-md5: 3b81a66284baa30e9a36f36138152acc
Patch0: %{name}-cfg_linux.patch
URL: http://www.promise.com
%if %{with kernel}
%{?with_dist_kernel:BuildRequires: kernel-module-build >= 3:2.6.14}
BuildRequires: rpmbuild(macros) >= 1.286
%endif
Requires(postun): /sbin/depmod
Requires(pre,post): /sbin/depmod
Requires(preun): /sbin/depmod
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
FastTrak driver for linux 2.6. This package contains the
linux kernel driver for FastTrak.
%description -l pl
Sterownik FastTrak dla linuksa 2.6. Paczka zawiera sterownik
dla jądra linuksa.
# kernel subpackages.
%package -n kernel-scsi-FastTrak
Summary: Linux driver for FastTrak
Summary(pl): Sterownik dla Linuksa do FastTraka
Release: %{_rel}@%{_kernel_ver_str}
Group: Base/Kernel
Requires(post,postun): /sbin/depmod
%if %{with dist_kernel}
%requires_releq_kernel_up
Requires(postun): %releq_kernel_up
%endif
%description -n kernel-scsi-FastTrak
This is driver for FastTrak for Linux.
This package contains Linux module.
%description -n kernel-scsi-FastTrak -l pl
Sterownik dla Linuksa do FastTrak.
Ten pakiet zawiera moduł jądra Linuksa.
%package -n kernel-smp-scsi-FastTrak
Summary: Linux SMP driver for FastTrak
Summary(pl): Sterownik dla Linuksa SMP do FastTrak
Release: %{_rel}@%{_kernel_ver_str}
Group: Base/Kernel
Requires(post,postun): /sbin/depmod
%if %{with dist_kernel}
%requires_releq_kernel_smp
Requires(postun): %releq_kernel_smp
%endif
%description -n kernel-smp-scsi-FastTrak
This is driver for FastTrak for Linux.
This package contains Linux SMP module.
%description -n kernel-smp-scsi-FastTrak -l pl
Sterownik dla Linuksa do FastTrak.
Ten pakiet zawiera moduł jądra Linuksa SMP.
%prep
%setup -q -n partial
%patch0 -p0
%build
%if %{with kernel}
# kernel module(s)
for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
exit 1
fi
install -d o/include/linux
ln -sf %{_kernelsrcdir}/config-$cfg o/.config
ln -sf %{_kernelsrcdir}/Module.symvers-$cfg o/Module.symvers
ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h o/include/linux/autoconf.h
%if %{with dist_kernel}
%{__make} -C %{_kernelsrcdir} O=$PWD/o prepare scripts
%else
install -d o/include/config
touch o/include/config/MARKER
ln -sf %{_kernelsrcdir}/scripts o/scripts
%endif
#
# patching/creating makefile(s) (optional)
#
%{__make} clean
%{__make} DRIVER_SRC_DIR=`pwd` \
CC="%{__cc}" CPP="%{__cpp}" \
SYSSRC=%{_kernelsrcdir} \
SYSOUT=$PWD/o \
%{?with_verbose:V=1}
mv FastTrak{,-$cfg}.ko
done
%endif
%install
rm -rf $RPM_BUILD_ROOT
%if %{with kernel}
install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/scsi
install FastTrak-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
$RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/scsi/FastTrak.ko
%if %{with smp} && %{with dist_kernel}
install FastTrak-smp.ko \
$RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/scsi/FastTrak.ko
%endif
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%post -n kernel-scsi-FastTrak
%depmod %{_kernel_ver}
%postun -n kernel-scsi-FastTrak
%depmod %{_kernel_ver}
%post -n kernel-smp-scsi-FastTrak
%depmod %{_kernel_ver}smp
%postun -n kernel-smp-scsi-FastTrak
%depmod %{_kernel_ver}smp
%if %{with kernel}
%files -n kernel-scsi-FastTrak
%defattr(644,root,root,755)
/lib/modules/%{_kernel_ver}/scsi/*.ko*
%if %{with smp} && %{with dist_kernel}
%files -n kernel-smp-scsi-FastTrak
%defattr(644,root,root,755)
/lib/modules/%{_kernel_ver}smp/scsi/*.ko*
%endif
%endif
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
* %{date} PLD Team <feedback at pld-linux.org>
All persons listed below can be reached at <cvs_login>@pld-linux.org
More information about the pld-devel-pl
mailing list