SPECS: cvsfs.spec - restored _rel define - used in kernel* package...

qboosh qboosh at pld-linux.org
Wed May 10 19:39:28 CEST 2006


Author: qboosh                       Date: Wed May 10 17:39:28 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- restored _rel define - used in kernel* packages
- it's Linux 2.4.x stuff - renamed kernel-* packages to kernel24-*
- fixed SMP defs, standard kernel/userspace split

---- Files affected:
SPECS:
   cvsfs.spec (1.34 -> 1.35) 

---- Diffs:

================================================================
Index: SPECS/cvsfs.spec
diff -u SPECS/cvsfs.spec:1.34 SPECS/cvsfs.spec:1.35
--- SPECS/cvsfs.spec:1.34	Mon May  8 14:38:37 2006
+++ SPECS/cvsfs.spec	Wed May 10 19:39:23 2006
@@ -2,24 +2,32 @@
 #
 # Conditional build:
 %bcond_without	dist_kernel	# without kernel from distribution
+%bcond_without	kernel		# don't build kernel modules
+%bcond_without	userspace	# don't build userspace tools
 #
+%define		_kernelsrcdir		/usr/src/linux-2.4
 Summary:	CVSFS - CVS filesystem
 Summary(pl):	CVSFS - system plikowy CVS
 Name:		cvsfs
 Version:	1.1.9
-Release:	0.1
+%define	_rel	0.1
+Release:	%{_rel}
 License:	GPL
 Group:		Applications/System
 Source0:	http://dl.sourceforge.net/cvsfs/%{name}-%{version}.tar.gz
 # Source0-md5:	622365b1b94e85653cec013fa43504d3
-Patch0:		cvsfs-Makefile.am.patch
-Patch1:		cvsfs-PPC.patch
-Patch2:		cvsfs-AXP.patch
+Patch0:		%{name}-Makefile.am.patch
+Patch1:		%{name}-PPC.patch
+Patch2:		%{name}-AXP.patch
 URL:		http://sourceforge.net/projects/cvsfs/
 BuildRequires:	autoconf
 BuildRequires:	automake
+%if %{with userspace}
 BuildRequires:	libstdc++-devel
-%{?with_dist_kernel:BuildRequires:	kernel-headers}
+%endif
+%if %{with kernel}
+%{?with_dist_kernel:BuildRequires:	kernel24-headers}
+%endif
 BuildRequires:	rpmbuild(macros) >= 1.118
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -36,34 +44,34 @@
 dysku. Jest także możliwość pobrania i zapisania plików po
 zmodyfikowaniu.
 
-%package -n kernel-cvsfs
+%package -n kernel24-cvsfs
 Summary:	CVSFS Linux kernel module
 Summary(pl):	Moduł jądra Linuksa CVSFS
 Release:	%{_rel}@%{_kernel_ver_str}
 Group:		Base/Kernel
 %{?with_dist_kernel:%requires_releq_kernel_up}
 Requires(post,postun):	/sbin/depmod
-Requires:	cvsfs
+Requires:	%{name} = %{version}-%{release}
 
-%description -n kernel-cvsfs
+%description -n kernel24-cvsfs
 CVS FS Linux kernel module.
 
-%description -n kernel-cvsfs -l pl
+%description -n kernel24-cvsfs -l pl
 Moduł jądra Linuksa CVS FS.
 
-%package -n kernel-smp-cvsfs
+%package -n kernel24-smp-cvsfs
 Summary:	CVSFS Linux SMP kernel module
 Summary(pl):	Moduł jądra Linuksa SMP CVSFS
 Release:	%{_rel}@%{_kernel_ver_str}
 Group:		Base/Kernel
 %{?with_dist_kernel:%requires_releq_kernel_smp}
 Requires(post,postun):	/sbin/depmod
-Requires:	cvsfs
+Requires:	%{name} = %{version}-%{release}
 
-%description -n kernel-smp-cvsfs
+%description -n kernel24-smp-cvsfs
 CVS FS module for Linux SMP kernel.
 
-%description -n kernel-smp-cvsfs -l pl
+%description -n kernel24-smp-cvsfs -l pl
 Moduł CVS FS dla jądra Linuksa SMP.
 
 %prep
@@ -82,54 +90,70 @@
 %{__autoconf}
 %configure
 
-CXXFLAGS="-DMODULES -D__SMP__ -D__KERNEL_SMP=1" %{__make}
-
+%if %{with kernel}
+%{__make} -C cvsfs \
+	CFLAGS="%{rpmcflags} -fomit-frame-pointer -Wall -D__SMP__ -D__KERNEL_SMP=1" \
+	INCLUDES="-I%{_kernelsrcdir}/include"
 mv cvsfs/cvsfs.o cvsfs/cvsfs-smp.o
+%{__make} -C cvsfs clean
+%{__make} -C cvsfs \
+	CFLAGS="%{rpmcflags} -fomit-frame-pointer -Wall" \
+	INCLUDES="-I%{_kernelsrcdir}/include"
+%endif
 
-%{__make}
+%if %{with userspace}
+for d in cvsfsd cvsmnt cvsmount cvsumount include init tools ; do
+	%{__make} -C $d
+done
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-install -d \
-	$RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/fs \
-	$RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/fs \
-	$RPM_BUILD_ROOT%{_sbindir}
+%if %{with kernel}
+install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/fs
+install cvsfs/cvsfs.o $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/fs
+install cvsfs/cvsfs-smp.o $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/fs/cvsfs.o
+%endif
 
+%if %{with userspace}
+install -d $RPM_BUILD_ROOT%{_sbindir}
 install cvsmnt/cvsmnt $RPM_BUILD_ROOT%{_sbindir}
 install cvsmount/cvsmount $RPM_BUILD_ROOT%{_sbindir}
 install cvsumount/cvsumount $RPM_BUILD_ROOT%{_sbindir}
-
-install cvsfs/cvsfs.o $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/fs
-install cvsfs/cvsfs-smp.o $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/fs/cvsfs.o
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post	-n kernel-cvsfs
+%post	-n kernel24-cvsfs
 %depmod %{_kernel_ver}
 
-%postun -n kernel-cvsfs
+%postun -n kernel24-cvsfs
 %depmod %{_kernel_ver}
 
-%post	-n kernel-smp-cvsfs
+%post	-n kernel24-smp-cvsfs
 %depmod %{_kernel_ver}smp
 
-%postun -n kernel-smp-cvsfs
+%postun -n kernel24-smp-cvsfs
 %depmod %{_kernel_ver}smp
 
+%if %{with userspace}
 %files
 %defattr(644,root,root,755)
 %doc ChangeLog README
 %attr(755,root,root) %{_sbindir}/*
+%endif
 
-%files -n kernel-cvsfs
+%if %{with kernel}
+%files -n kernel24-cvsfs
 %defattr(644,root,root,755)
 /lib/modules/%{_kernel_ver}/fs/cvsfs.o*
 
-%files -n kernel-smp-cvsfs
+%files -n kernel24-smp-cvsfs
 %defattr(644,root,root,755)
 /lib/modules/%{_kernel_ver}smp/fs/cvsfs.o*
+%endif
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -137,6 +161,11 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.35  2006/05/10 17:39:23  qboosh
+- restored _rel define - used in kernel* packages
+- it's Linux 2.4.x stuff - renamed kernel-* packages to kernel24-*
+- fixed SMP defs, standard kernel/userspace split
+
 Revision 1.34  2006/05/08 12:38:37  darekr
 - kill useless release defining
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/cvsfs.spec?r1=1.34&r2=1.35&f=u



More information about the pld-cvs-commit mailing list