%kmdl qla4xxx Summary: QLogic iSCSI Driver Name: qla4xxx Version: 5.00.07 Release: 2%{?dist} License: GPL Group: System Environment/Kernel URL: http://www.qlogic.com/products/fc_san_hostadapers.asp Source0: ftp://ftp.qlogic.com/outgoing/linux/beta/iscsi/5.x/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %kmdl_parentdependencies %description QLogic iSCSI Driver %package -n %kmdl_name %kmdl_dependencies Summary: kernel modules for %{name} Group: System Environment/Kernel %description -n %kmdl_name kernel modules for %{name}. See description for %{name} for further information. %kmdl_desc %prep %setup -q -n %{version} cat Kconfig | perl -p -e's,(config .*)\n,$1,' \ | grep ^config | sed -e's,\t, ,' \ | sed -e's,config \(.*\) tristate.*,CONFIG_\1=m,' -e's,config \(.*\) bool.*,CONFIG_\1=y,' \ > dot-config mkdir linux cp -a %{kmdl_kernelsrcdir}/include/linux/autoconf.h linux/autoconf.h grep CONFIG.*=y dot-config | sed -e's,^\(.*\)=y,#define \1 1,' | tr '\n' ' ' >> linux/autoconf.h %build %kmdl_config %if %{kmdl_userland} %else make -C %{kmdl_kernelsrcdir} SUBDIRS=`pwd` \ MAKEFILES=dot-config \ modules %endif %install rm -rf %{buildroot} %if %{kmdl_userland} %else mkdir -p %{buildroot}%{kmdl_moduledir}/drivers/scsi/qla4xxx make -C %{kmdl_kernelsrcdir} SUBDIRS=`pwd` \ MAKEFILES=dot-config \ INSTALL_MOD_PATH=%{buildroot} \ INSTALL_MOD_DIR=updates/drivers/scsi/qla4xxx \ modules_install if [ -d %{buildroot}%{kmdl_moduledir}/../extra ]; then mv %{buildroot}%{kmdl_moduledir}/../extra/* %{buildroot}%{kmdl_moduledir}/drivers/scsi/qla4xxx/ fi %endif %clean rm -rf %{buildroot} %post -n %kmdl_name %kmdl_install %postun -n %kmdl_name %kmdl_remove %if %{kmdl_userland} %files %defattr(-,root,root,-) %doc LICENSE* README* release.txt revision.notes %else %files -n %kmdl_name %defattr(-,root,root,-) %dir %{kmdl_moduledir}/drivers %dir %{kmdl_moduledir}/drivers/scsi %{kmdl_moduledir}/drivers/scsi/qla4xxx %endif %changelog * Tue Nov 21 2006 Axel Thimm - 5.00.07-1 - Initial build.