SPECS: 855resolution.spec - init scripts to replace modes every time

blues blues at pld-linux.org
Sun Jun 19 01:55:06 CEST 2005


Author: blues                        Date: Sat Jun 18 23:55:06 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- init scripts to replace modes every time

---- Files affected:
SPECS:
   855resolution.spec (1.2 -> 1.3) 

---- Diffs:

================================================================
Index: SPECS/855resolution.spec
diff -u SPECS/855resolution.spec:1.2 SPECS/855resolution.spec:1.3
--- SPECS/855resolution.spec:1.2	Sun Jun 19 01:33:15 2005
+++ SPECS/855resolution.spec	Sun Jun 19 01:55:01 2005
@@ -1,14 +1,14 @@
 # $Revision$, $Date$
-# TODO:
-# - init script to call the program every time on boot
 Summary:	Change the resolution of an available vbios mode for the 855/865/915 Intel graphic chipset
 Name:		855resolution
 Version:	0.4
-Release:	0.5
+Release:	0.8
 License:	Public Domain
 Group:		Applications/System
 Source0:	http://perso.wanadoo.fr/apoirier/%{name}-%{version}.tgz
 # Source0-md5:	12237e534def7dd3579a3e8b0a4b9351
+Source1:	%{name}.sysconfig
+Source2:	%{name}.init
 URL:		http://perso.wanadoo.fr/apoirier/
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -43,16 +43,28 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_sbindir}
+install -d $RPM_BUILD_ROOT{%{_sbindir},/etc/{rc.d/init.d,sysconfig}}
 
 install 855resolution $RPM_BUILD_ROOT%{_sbindir}
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post
+/sbin/chkconfig --add 855resolution
+
+%preun
+if [ "$1" = "0" ]; then
+	/sbin/chkconfig --del 855resolution
+fi
+
 %files
 %defattr(644,root,root,755)
 %doc CHANGES.txt README.txt
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
+%attr(754,root,root) /etc/rc.d/init.d/%{name}
 %attr(755,root,root) %{_sbindir}/*
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
@@ -61,6 +73,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.3  2005/06/18 23:55:01  blues
+- init scripts to replace modes every time
+
 Revision 1.2  2005/06/18 23:33:15  ankry
 - formatting
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/855resolution.spec?r1=1.2&r2=1.3&f=u




More information about the pld-cvs-commit mailing list