SPECS: kernel-video-qc-usb.spec - standard kernel/smp/userspace bc...
qboosh
qboosh at pld-linux.org
Fri Mar 3 20:10:03 CET 2006
Author: qboosh Date: Fri Mar 3 19:10:03 2006 GMT
Module: SPECS Tag: HEAD
---- Log message:
- standard kernel/smp/userspace bconds
---- Files affected:
SPECS:
kernel-video-qc-usb.spec (1.1 -> 1.2)
---- Diffs:
================================================================
Index: SPECS/kernel-video-qc-usb.spec
diff -u SPECS/kernel-video-qc-usb.spec:1.1 SPECS/kernel-video-qc-usb.spec:1.2
--- SPECS/kernel-video-qc-usb.spec:1.1 Mon Feb 27 22:37:02 2006
+++ SPECS/kernel-video-qc-usb.spec Fri Mar 3 20:09:56 2006
@@ -1,8 +1,15 @@
# $Revision$, $Date$
+# TODO: make qc-usb main package and kernel-* subpackages
#
# Conditional build:
-# _without_dist_kernel without distribution kernel
+%bcond_without dist_kernel # without distribution kernel
+%bcond_without kernel # don't build kernel modules
+%bcond_without smp # don't build SMP module
+%bcond_without userspace # don't build userspace utility
#
+%ifarch sparc
+%undefine with_smp
+%endif
Summary: Kernel module for Logitech QuickCam USB cameras (new)
Summary(pl): Moduł jądra do kamer USB Logitech QuickCam (nowy)
Name: kernel-video-qc-usb
@@ -14,11 +21,14 @@
Source0: http://dl.sourceforge.net/qce-ga/qc-usb-%{version}.tar.gz
# Source0-md5: 3d33380a29a7f92c4eef1f82d61b4ee0
URL: http://qce-ga.sourceforge.net/
-%{!?_without_dist_kernel:BuildRequires: kernel-headers >= 2.2.0 }
+%if %{with kernel} && %{with dist_kernel}
+BuildRequires: kernel-module-build >= 2.6}
+%endif
BuildRequires: rpmbuild(macros) >= 1.118
-%{!?_without_dist_kernel:%requires_releq_kernel_up}
+%if %{with kernel} && %{with dist_kernel}
+%requires_releq_kernel_up
+%endif
Requires(post,postun): /sbin/depmod
-Requires(post,postun): modutils >= 2.3.18-2
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -32,9 +42,10 @@
Summary(pl): Moduł jądra SMP do kamer USB Logitech QuickCam
Release: %{_rel}@%{_kernel_ver_str}
Group: Base/Kernel
-%{!?_without_dist_kernel:%requires_releq_kernel_smp}
+%if %{with kernel} && %{with dist_kernel}
+%requires_releq_kernel_smp
+%endif
Requires(post,postun): /sbin/depmod
-Requires(post,postun): modutils >= 2.3.18-2
%description -n kernel-smp-video-qc-usb
Logitech QuickCam USB cameras driver for SMP kernel (a new one).
@@ -47,7 +58,6 @@
Summary(pl): Dokumentacja i program testujący do kamer Logitech QuickCam USB
Release: %{_rel}
Group: Base/Kernel
-Requires: %{name} = %{version}
%description -n qc-usb
Documentation and test program to Logitech QuickCam USB.
@@ -59,25 +69,38 @@
%setup -q -n qc-usb-%{version}
%build
+%if %{with kernel}
+%if %{with dist_kernel} && %{with smp}
%{__make} all \
- CC=%{kgcc} \
+ CC="%{kgcc}" \
INCLUDES="%{rpmcflags} -I. -D__KERNEL_SMP=1 -D__SMP__ -I%{_kernelsrcdir}/include"
mv -f quickcam.ko quickcam-smp.ko
#%%{__make} clean
+%endif
%{__make} all \
- CC=%{kgcc} \
+ CC="%{kgcc}" \
INCLUDES="%{rpmcflags} -I. -I%{_kernelsrcdir}/include"
+%endif
-cd testquickcam
-%{__make}
+%if %{with userspace}
+%{__make} -C testquickcam
+# TODO: %{__cc}, %{rpmcflags}
+%endif
%install
rm -rf $RPM_BUILD_ROOT
+
+%if %{with kernel}
+%if %{with dist_kernel} && %{with smp}
install -D quickcam-smp.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/video/quickcam.ko
+%endif
install -D quickcam.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/video/quickcam.ko
+%endif
+%if %{with userspace}
install -d $RPM_BUILD_ROOT%{_sbindir}
install testquickcam/testquickcam $RPM_BUILD_ROOT%{_sbindir}
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
@@ -94,18 +117,24 @@
%postun -n kernel-smp-video-qc-usb
%depmod %{_kernel_ver}smp
+%if %{with kernel}
%files
%defattr(644,root,root,755)
/lib/modules/%{_kernel_ver}/video/*
+%if %{with dist_kernel} && %{with smp}
%files -n kernel-smp-video-qc-usb
%defattr(644,root,root,755)
/lib/modules/%{_kernel_ver}smp/video/*
+%endif
+%endif
+%if %{with userspace}
%files -n qc-usb
%defattr(644,root,root,755)
%doc README
%attr(755,root,users) %{_sbindir}/testquickcam
+%endif
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
@@ -113,6 +142,8 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.2 2006/03/03 19:09:56 qboosh
+- standard kernel/smp/userspace bconds
+
Revision 1.1 2006/02/27 21:37:02 prism
- new
-
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/kernel-video-qc-usb.spec?r1=1.1&r2=1.2&f=u
More information about the pld-cvs-commit
mailing list