SPECS: asa.spec, aspseek.spec - use %service
glen
glen at pld-linux.org
Fri Apr 14 19:46:24 CEST 2006
Author: glen Date: Fri Apr 14 17:46:24 2006 GMT
Module: SPECS Tag: HEAD
---- Log message:
- use %service
---- Files affected:
SPECS:
asa.spec (1.20 -> 1.21) , aspseek.spec (1.30 -> 1.31)
---- Diffs:
================================================================
Index: SPECS/asa.spec
diff -u SPECS/asa.spec:1.20 SPECS/asa.spec:1.21
--- SPECS/asa.spec:1.20 Fri Apr 14 19:39:56 2006
+++ SPECS/asa.spec Fri Apr 14 19:46:19 2006
@@ -20,9 +20,10 @@
Patch2: %{name}-userrun.patch
URL: http://www.apatsch.wroc.biz/asa/
BuildRequires: rpm-perlprov
+BuildRequires: rpmbuild(macros) >= 1.268
Requires(post): /usr/bin/perl
-Requires(post,preun): /sbin/chkconfig
Requires(post): sed >= 4.0
+Requires(post,preun): /sbin/chkconfig
Requires(pre): jabber-common
Requires: jabberd >= 1.4
Requires: perl-Crypt-SSLeay
@@ -66,25 +67,19 @@
rm -rf $RPM_BUILD_ROOT
%post
-if [ -f /etc/jabber/secret ] ; then
- SECRET=`cat /etc/jabber/secret`
+if [ -f %{_sysconfdir}/jabber/secret ] ; then
+ SECRET=`cat %{_sysconfdir}/jabber/secret`
if [ -n "$SECRET" ] ; then
echo "Updating component authentication secret in asa.xml..."
%{__sed} -i -e "s/>secret</>$SECRET</" /etc/jabber/asa.xml
fi
fi
/sbin/chkconfig --add jabber-asa-transport
-if [ -r /var/lock/subsys/jabber-asa-transport ]; then
- /etc/rc.d/init.d/jabber-asa-transport restart >&2
-else
- echo "Run \"/etc/rc.d/init.d/jabber-asa-transport start\" to start Jabber ASA transport."
-fi
+%service jabber-asa-transport restart "Jabber ASA transport"
%preun
if [ "$1" = "0" ]; then
- if [ -r /var/lock/subsys/jabber-asa-transport ]; then
- /etc/rc.d/init.d/jabber-asa-transport stop >&2
- fi
+ %service jabber-asa-transport stop
/sbin/chkconfig --del jabber-asa-transport
fi
@@ -105,6 +100,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.21 2006/04/14 17:46:19 glen
+- use %service
+
Revision 1.20 2006/04/14 17:39:56 glen
- sed edit
================================================================
Index: SPECS/aspseek.spec
diff -u SPECS/aspseek.spec:1.30 SPECS/aspseek.spec:1.31
--- SPECS/aspseek.spec:1.30 Mon May 2 20:23:51 2005
+++ SPECS/aspseek.spec Fri Apr 14 19:46:19 2006
@@ -20,24 +20,24 @@
BuildRequires: libstdc++-devel
BuildRequires: mysql-devel
BuildRequires: openssl-devel >= 0.9.7d
-BuildRequires: rpmbuild(macros) >= 1.202
+BuildRequires: rpmbuild(macros) >= 1.268
BuildRequires: zlib-devel
-Requires(pre): /bin/id
-Requires(pre): /usr/sbin/useradd
-Requires(postun): /usr/sbin/userdel
Requires(post): fileutils
-Requires(post,preun): /sbin/chkconfig
Requires(post,postun): /sbin/ldconfig
-Requires: webserver
+Requires(post,preun): /sbin/chkconfig
+Requires(postun): /usr/sbin/userdel
+Requires(pre): /bin/id
+Requires(pre): /usr/sbin/useradd
Requires: %{name}-db-%{version}
+Requires: webserver
Provides: user(aspseek)
-Obsoletes: swish++
Obsoletes: mnogosearch
+Obsoletes: swish++
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _sysconfdir /etc/%{name}
%define _bindir /home/httpd/cgi-bin
-%define _pkglibdir %(%{apxs} -q LIBEXECDIR)
+%define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
%description
ASPSeek is an Internet search engine, written in C++ using the STL
@@ -80,9 +80,9 @@
Summary: MySQL backend driver for ASPSeek
Summary(pl): Obsługa MySQL dla ASPSeek
Group: Networking/Utilities
-Provides: %{name}-db-%{version}
-Requires: %{name} = %{version}
Requires(post): /sbin/ldconfig
+Requires: %{name} = %{version}
+Provides: %{name}-db-%{version}
%description db-mysql
This driver acts as a database backend for ASPSeek, so ASPSeek will
@@ -96,11 +96,11 @@
Summary: Apache module: ASPSeek search engine
Summary(pl): Moduł Apache: Silnik wyszukiwania ASPSeek
Group: Networking/Daemons
-PreReq: aspseek
Requires(post,preun): %{apxs}
Requires(post,preun): grep
Requires(preun): fileutils
Requires: apache(EAPI)
+Requires: aspseek
%description -n apache-mod_aspseek
ASPSeek Apache module.
@@ -159,9 +159,7 @@
%preun
if [ "$1" = "0" ]; then
- if [ -f /var/lock/subsys/%{name} ]; then
- /etc/rc.d/init.d/%{name} stop 1>&2
- fi
+ %service %{name} stop
/sbin/chkconfig --del %{name}
fi
@@ -182,9 +180,7 @@
if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*mod_aspseek.conf" /etc/httpd/httpd.conf; then
echo "Include /etc/httpd/mod_aspseek.conf" >> /etc/httpd/httpd.conf
fi
-if [ -f /var/lock/subsys/httpd ]; then
- /etc/rc.d/init.d/httpd restart 1>&2
-fi
+%service -q httpd restart
%preun -n apache-mod_aspseek
if [ "$1" = "0" ]; then
@@ -193,9 +189,7 @@
grep -v "^Include.*mod_aspseek.conf" /etc/httpd/httpd.conf > \
/etc/httpd/httpd.conf.tmp
mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
- if [ -f /var/lock/subsys/httpd ]; then
- /etc/rc.d/init.d/httpd restart 1>&2
- fi
+ %service -q httpd restart
fi
%files
@@ -240,6 +234,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.31 2006/04/14 17:46:19 glen
+- use %service
+
Revision 1.30 2005/05/02 18:23:51 glen
- adapterized
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/asa.spec?r1=1.20&r2=1.21&f=u
http://cvs.pld-linux.org/SPECS/aspseek.spec?r1=1.30&r2=1.31&f=u
More information about the pld-cvs-commit
mailing list