SPECS: template.spec - ldconfig and initscript samples added as bc...

glen glen at pld-linux.org
Wed Jul 27 11:37:17 CEST 2005


Author: glen                         Date: Wed Jul 27 09:37:17 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- ldconfig and initscript samples added as bcond, other useful things

---- Files affected:
SPECS:
   template.spec (1.50 -> 1.51) 

---- Diffs:

================================================================
Index: SPECS/template.spec
diff -u SPECS/template.spec:1.50 SPECS/template.spec:1.51
--- SPECS/template.spec:1.50	Wed May 25 21:01:53 2005
+++ SPECS/template.spec	Wed Jul 27 11:37:10 2005
@@ -20,6 +20,11 @@
 # Source1-md5:	-
 #Patch0:		%{name}-what.patch
 URL:		-
+%if %{with initscript}
+BuildRequires:	rpmbuild(macros) >= 1.228
+Requires(post,preun):	rc-scripts
+Requires(post,preun):	/sbin/chkconfig
+%endif
 #BuildRequires:	autoconf
 #BuildRequires:	automake
 #BuildRequires:	libtool
@@ -29,6 +34,8 @@
 #Requires(preun):	-
 #Requires(postun):	-
 #Requires:	-
+#Provides:	group(foo)
+#Provides:	user(foo)
 #Provides:	-
 #Obsoletes:	-
 #Conflicts:	-
@@ -49,28 +56,38 @@
 
 %description subpackage -l pl
 
-%if 0
+%if %{with devel-static}
 %package devel
-Summary:	Development libraries and header files for termcap library
+Summary:	Development libraries and header files for ... library
 Group:		Development/Libraries
 
 %description devel
-This is the package containing the development libaries and header
+This is the package containing the development libraries and header
 files for ...
 
 %package static
 Summary:	Static ... library
 Group:		Development/Libraries
-Requires:	%{name}-devel = %{version}
+Requires:	%{name}-devel = %{version}-%{release}
 
 %description static
 Static ... library.
+
 %endif
 
 %prep
-%setup -q -n %{name}-%{version}.orig -a 1
+%setup -q
+#%setup -q -c -T
+#%setup -q -n %{name}
+#%%setup -q -n %{name}-%{version}.orig -a 1
 #%patch0 -p1
 
+# undos the source
+#find '(' -name '*.php' -o -name '*.inc' ')' -print0 | xargs -0 sed -i -e 's,
$,,'
+
+# remove CVS control files
+#find -name CVS -print0 | xargs -0 rm -rf
+
 %build
 # if ac/am/* rebuilding is necessary, do it in this order and add
 # appropriate BuildRequires
@@ -84,10 +101,15 @@
 %configure
 %{__make}
 
+#%{__make} \
+#	CFLAGS="%{rpmcflags}" \
+#	LDFLAGS="%{rpmldflags}"
+
 %install
 rm -rf $RPM_BUILD_ROOT
 # create directories if necessary
 #install -d $RPM_BUILD_ROOT
+#install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
@@ -98,12 +120,27 @@
 %pre
 
 %post
-#%post	-p /sbin/ldconfig
 
 %preun
 
 %postun
-#%postun	-p /sbin/ldconfig
+
+%if %{with ldconfig}
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+%endif
+
+%if %{with initscript}
+%post init
+/sbin/chkconfig --add %{name}
+%service %{name} restart
+
+%preun init
+if [ "$1" = "0" ]; then
+	%service -q %{name} stop
+	/sbin/chkconfig --del %{name}
+fi
+%endif
 
 %files
 %defattr(644,root,root,755)
@@ -121,6 +158,8 @@
 %attr(754,root,root) /etc/rc.d/init.d/%{name}
 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
 
+#%{_examplesdir}/%{name}-%{version}
+
 %files subpackage
 %defattr(644,root,root,755)
 %doc extras/*.gz
@@ -132,10 +171,6 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
-Revision 1.50  2005/05/25 19:01:53  glen
-- sort BR
-
-Revision 1.49  2005/05/21 14:07:41  glen
-- add BR autotools
-- usual Log truncation
+Revision 1.51  2005/07/27 09:37:10  glen
+- ldconfig and initscript samples added as bcond, other useful things
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/template.spec?r1=1.50&r2=1.51&f=u




More information about the pld-cvs-commit mailing list