[rhmessaging-commits] rhmessaging commits: r962 - in store/trunk/cpp: etc and 1 other directory.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Thu Oct 4 10:50:53 EDT 2007


Author: nunofsantos
Date: 2007-10-04 10:50:53 -0400 (Thu, 04 Oct 2007)
New Revision: 962

Modified:
   store/trunk/cpp/Makefile.am
   store/trunk/cpp/etc/rhmd
   store/trunk/cpp/rhm.spec.in
Log:
specfile changes to support init.d script

Modified: store/trunk/cpp/Makefile.am
===================================================================
--- store/trunk/cpp/Makefile.am	2007-10-04 14:12:07 UTC (rev 961)
+++ store/trunk/cpp/Makefile.am	2007-10-04 14:50:53 UTC (rev 962)
@@ -1,7 +1,7 @@
 AUTOMAKE_OPTIONS = 1.9.6 foreign
 ACLOCAL_AMFLAGS = -I m4
 
-EXTRA_DIST = README
+EXTRA_DIST = README etc/rhmd
 
 SUBDIRS = lib tests docs
 
@@ -12,7 +12,7 @@
 #
 # Build RPMs from the distribution tarball.
 #
-RPMDIRS=rpm/BUILD  rpm/RPMS rpm/SPECS rpm/SRPMS
+RPMDIRS=rpm/BUILD rpm/RPMS rpm/SPECS rpm/SRPMS
 RPMMACROS=--define "_topdir @abs_builddir@/rpm" --define "_sourcedir @abs_builddir@"
 # Override this variable e.g. with -bs to produce srpm only
 RPMOPTS=-ba

Modified: store/trunk/cpp/etc/rhmd
===================================================================
--- store/trunk/cpp/etc/rhmd	2007-10-04 14:12:07 UTC (rev 961)
+++ store/trunk/cpp/etc/rhmd	2007-10-04 14:50:53 UTC (rev 962)
@@ -17,6 +17,8 @@
 # description: Qpidd is an AMQP broker. It receives, stores, routes and forwards messages using the AMQP protocol.
 # processname: qpidd
 
+lockfile=/var/lock/subsys/rhmd
+
 LIBBDBSTORE=libbdbstore.so.0
 
 # See how we were called.                                                                           

Modified: store/trunk/cpp/rhm.spec.in
===================================================================
--- store/trunk/cpp/rhm.spec.in	2007-10-04 14:12:07 UTC (rev 961)
+++ store/trunk/cpp/rhm.spec.in	2007-10-04 14:50:53 UTC (rev 962)
@@ -3,7 +3,7 @@
 #
 Name:           rhm
 Version:        @VERSION@
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Red Hat extensions to the Qpid messaging system
 Group:          System Environment/Libraries
 License:        LGPL
@@ -37,6 +37,7 @@
 %install
 rm -rf %{buildroot}
 make install DESTDIR=%{buildroot}
+install -Dp -m0755 etc/rhmd %{buildroot}%{_initrddir}/rhmd
 rm -f %{buildroot}%_libdir/*.a
 rm -f %{buildroot}%_libdir/*.la
 rm -f %{buildroot}%_libdir/*.so
@@ -52,12 +53,30 @@
 %doc README COPYING
 %_libdir/libbdbstore.so.0
 %_libdir/libbdbstore.so.0.1.0
+%{_initrddir}/rhmd
 
-%post -p /sbin/ldconfig
+%post
+# This adds the proper /etc/rc*.d links for the script
+/sbin/chkconfig --add qpidd
+/sbin/ldconfig
 
-%postun -p /sbin/ldconfig
+%preun
+# Check that this is actual deinstallation, not just removing for upgrade.
+if [ $1 = 0 ]; then
+  /sbin/service rhmd stop >/dev/null 2>&1 || :
+  /sbin/chkconfig --del rhmd
+fi
 
+%postun
+if [ "$1" -ge "1" ]; then
+  /sbin/service rhmd condrestart >/dev/null 2>&1 || :
+fi
+/sbin/ldconfig
+
+
 %changelog
+* Thu Oct 04 2007 Nuno Santos <nsantos at redhat.com> - 0.2-2
+- Add rhmd init script
 * Wed Jul 25 2007 Nuno Santos <nsantos at redhat.com> - 0.2-1
 - Disable rpath; bump release to match numbers of qpidc trunk packages
 * Tue Apr 17 2007 Alan Conway <aconway at redhat.com> - 0.1-3




More information about the rhmessaging-commits mailing list