Name: kernel-module-pwcx Version: 9.0 Release: 0.0.beta.2.fdr.2 Summary: kernel module for Philips Webcam pwc driver. Group: System Environment/Kernel License: GPL with proprietary code URL: http://www.smcc.demon.nl/webcam/ Source: http://www.smcc.demon.nl/webcam/pwcx-9.0-beta-2.tar.gz Patch: pwcx.autotools.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # what kernel are we building for ? %{!?kernel: %define kernel %(uname -r)} # get the correct kernel package release by stripping kernel modifiers %define krel %(echo %{kernel} | sed -e s/smp//g -) # get a type modifier for the kernel, (null) or -smp %if %(echo %{kernel} | grep -c smp) %{expand:%%define ktype -smp} %else %define ktype %{nil} %endif # what kernel "flavor" are we building for ? %{expand:%%define post26 %(if echo %{kernel} | grep -c "^2\.[01234]" > /dev/null; then echo 0; else echo 1; fi)} %if %{post26} BuildRequires: kernel-module-devel-%{krel} ExclusiveArch: i586 i686 %else BuildRequires: kernel-source = %{krel} ExclusiveArch: i686 athlon %endif # where the kernel build tree lives for 2.6 %define basedeveldir %{_libdir}/kernel-module-devel-%{krel} %define develdir %{basedeveldir}/kernel%{ktype}-%{krel}.%{_target_cpu}.rpm # since we have a patch to the build and run autogen.sh BuildRequires: automake BuildRequires: autoconf # we don't want debug packages %define __debug_package 0 %description This package contains a kernel module for the Philips USB webcams. You can rebuild this RPM by using --target target_arch --define "kernel (uname -r value)" %package %{kernel} Summary: %{summary} Group: System Environment/Kernel Provides: kernel-module Provides: kernel-module-pwcx = %{version}-%{release} Requires: /boot/vmlinuz-%{kernel} Requires(pre): modutils %description %{kernel} This package contains a kernel module for the Philips USB webcams. You can rebuild this RPM by using --target target_arch --define "kernel (uname -r value)" %prep %setup -q -n pwcx-9.0-beta-2 %patch -p2 %build %if %{post26} bash autogen.sh %configure --with-linuxdir=%{develdir} %else # we supply arguments to autogen.sh so its configure doesn't fail bash autogen.sh \ --with-rpm-target=%{_target_cpu} \ --with-kernel-release=%{kernel} \ --with-linuxdir=/usr/src/linux-%{krel} %configure \ --with-rpm-target=%{_target_cpu} \ --with-kernel-release=%{kernel} \ --with-linuxdir=/usr/src/linux-%{krel} %endif make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT %makeinstall modulesdir=$RPM_BUILD_ROOT/lib/modules/%{kernel} %clean rm -rf $RPM_BUILD_ROOT %post %{kernel} depmod -ae -F /boot/System.map-%{kernel} %{kernel} > /dev/null %postun %{kernel} depmod -ae -F /boot/System.map-%{kernel} %{kernel} > /dev/null %files %{kernel} %defattr(-,root,root,-) /lib/modules/%{kernel}/kernel/drivers/usb/media/pwc.*o /lib/modules/%{kernel}/kernel/drivers/usb/media/pwcx.*o %changelog * Fri Jun 04 2004 Thomas Vander Stichele - 9.0-0.0.beta.2.fdr.2: now works for 2.4 and 2.6 * Mon May 24 2004 Thomas Vander Stichele - 9.0-0.0.beta.2.fdr.1: initial package