SPECS: em8300.spec - merge alt kernel and other fixes from AC-branch

glen glen at pld-linux.org
Thu Apr 3 22:39:57 CEST 2008


Author: glen                         Date: Thu Apr  3 20:39:57 2008 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- merge alt kernel and other fixes from AC-branch

---- Files affected:
SPECS:
   em8300.spec (1.52 -> 1.53) 

---- Diffs:

================================================================
Index: SPECS/em8300.spec
diff -u SPECS/em8300.spec:1.52 SPECS/em8300.spec:1.53
--- SPECS/em8300.spec:1.52	Wed Mar 14 01:16:22 2007
+++ SPECS/em8300.spec	Thu Apr  3 22:39:52 2008
@@ -9,33 +9,33 @@
 %bcond_without	smp		# don't build SMP module
 %bcond_without	userspace	# don't build userspace tools
 %bcond_with	verbose		# verbose build (V=1)
-%bcond_with	grsec_kernel	# build for kernel-grsecurity
-#
-%if %{with kernel} && %{with dist_kernel} && %{with grsec_kernel}
-%define	alt_kernel	grsecurity
+
+%if %{without kernel}
+%undefine	with_dist_kernel
 %endif
-#
+
 %ifarch sparc
 # kernel modules won't build on sparc32, no I2C in kernel
 %undefine	with_kernel
 %endif
 
-%if !%{with kernel}
-%undefine	with_dist_kernel
+%if "%{_alt_kernel}" != "%{nil}"
+%undefine	with_userspace
 %endif
 
+%define		pname	em8300
 Summary:	DXR3 and H+ driver
 Summary(pl.UTF-8):	Sterowniki dla DXR3 i H+
-Name:		em8300
+Name:		%{pname}%{_alt_kernel}
 Version:	0.16.0
 Release:	3
 License:	GPL
 Group:		Applications/System
-Source0:	http://dl.sourceforge.net/dxr3/%{name}-%{version}.tar.gz
+Source0:	http://dl.sourceforge.net/dxr3/%{pname}-%{version}.tar.gz
 # Source0-md5:	9e9b769b99927079b4fd6ec423d95049
-Source1:	%{name}.init
-Source2:	%{name}.sysconf
-Patch0:		%{name}-make.patch
+Source1:	%{pname}.init
+Source2:	%{pname}.sysconf
+Patch0:		%{pname}-make.patch
 URL:		http://dxr3.sourceforge.net/
 %if %{with userspace}
 BuildRequires:	autoconf >= 2.13
@@ -48,8 +48,12 @@
 BuildRequires:	rpmbuild(macros) >= 1.308
 %endif
 Requires(post,preun):	/sbin/chkconfig
+Requires:	rc-scripts
 Provides:	dxr3
 Obsoletes:	em8300-libs
+%if %{without userspace}
+ExcludeArch:	sparc
+%endif
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -83,7 +87,7 @@
 Summary:	Utility programs for em8300 using GTK+
 Summary(pl.UTF-8):	Programy użytkowe em8300 używające bibliteki GTK+
 Group:		X11/Applications
-Requires:	%{name} = %{version}-%{release}
+Requires:	%{pname} = %{version}-%{release}
 
 %description gtk
 Utility programs for em8300 using GTK+ toolkit.
@@ -124,7 +128,7 @@
 Moduły jądra Linuksa SMP em8300.
 
 %prep
-%setup -q
+%setup -q -n %{pname}-%{version}
 %patch0 -p0
 
 %build
@@ -163,7 +167,7 @@
 		M=$PWD O=$PWD/o \
 		%{?with_verbose:V=1}
 	%{__make} -C %{_kernelsrcdir} modules \
-	        CC="%{__cc}" CPP="%{__cpp}" \
+        CC="%{__cc}" CPP="%{__cpp}" \
 		SYSSRC=%{_kernelsrcdir} \
 		SYSOUT=$PWD/o \
 		M=$PWD O=$PWD/o \
@@ -182,8 +186,8 @@
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
-install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
-install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
+install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{pname}
+install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{pname}
 %endif
 
 %if %{with kernel}
@@ -204,19 +208,13 @@
 rm -rf $RPM_BUILD_ROOT
 
 %post
-/sbin/chkconfig --add %{name}
-if [ -f /var/lock/subsys/%{name} ]; then
-	/etc/rc.d/init.d/%{name} restart 1>&2
-else
-	echo "Run \"/etc/rc.d/init.d/%{name} start\" to load %{name} modules."
-fi
+/sbin/chkconfig --add %{pname}
+%service %{pname} restart
 
 %preun
 if [ "$1" = "0" ]; then
-	if [ -f /var/lock/subsys/%{name} ]; then
-		/etc/rc.d/init.d/%{name} stop 1>&2
-	fi
-	/sbin/chkconfig --del %{name}
+	%service stop
+	/sbin/chkconfig --del %{pname}
 fi
 
 %post	-n kernel%{_alt_kernel}-video-em8300
@@ -241,8 +239,8 @@
 %{_datadir}/em8300/em8300.pm
 %attr(755,root,root) %{_datadir}/em8300/*.pl
 %{_mandir}/man1/em8300setup.1*
-%attr(754,root,root) /etc/rc.d/init.d/%{name}
-%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
+%attr(754,root,root) /etc/rc.d/init.d/%{pname}
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{pname}
 # subpackage? (is it usable without alsa?)
 %{_datadir}/alsa/cards/EM8300.conf
 
@@ -277,6 +275,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.53  2008-04-03 20:39:52  glen
+- merge alt kernel and other fixes from AC-branch
+
 Revision 1.52  2007-03-14 00:16:22  glen
 - up bcond
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/em8300.spec?r1=1.52&r2=1.53&f=u



More information about the pld-cvs-commit mailing list