summaryrefslogtreecommitdiff
path: root/qpid/cpp/qpidc.spec
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/cpp/qpidc.spec')
-rw-r--r--qpid/cpp/qpidc.spec70
1 files changed, 48 insertions, 22 deletions
diff --git a/qpid/cpp/qpidc.spec b/qpid/cpp/qpidc.spec
index f82974e216..6c23227be6 100644
--- a/qpid/cpp/qpidc.spec
+++ b/qpid/cpp/qpidc.spec
@@ -1,9 +1,14 @@
+#
+# Spec file for Qpid C++ packages: qpidc qpidc-devel, qpidd
+#
+%define daemon qpidd
+
Name: qpidc
Version: 0.1
Release: 1%{?dist}
-Summary: Libraries for Qpid C++ client applications.
-Group: System Environment/Libraries
-License: Apache
+Summary: Libraries for Qpid C++ client applications
+Group: System Environment/Libraries
+License: Apache Software License
URL: http://incubator.apache.org/qpid/
# FIXME: Source must be a URL pointing to where the tarball can be downloaded
Source0: %{name}-%{version}.tar.gz
@@ -26,6 +31,11 @@ Requires: apr
Requires: boost
+Requires(post):/sbin/chkconfig
+Requires(preun):/sbin/chkconfig
+Requires(preun):/sbin/service
+Requires(postun): /sbin/service
+
%description
Run-time libraries for AMQP client applications developed using Qpid
C++. Clients exchange messages with an AMQP message broker using
@@ -34,7 +44,7 @@ the AMQP protocol.
%package devel
Summary: Header files and documentation for developing Qpid C++ clients.
Group: Development/System
-Requires: %name-client = %version-%release
+Requires: %name = %version-%release
Requires: libtool
Requires: apr-devel
Requires: boost-devel
@@ -45,13 +55,12 @@ Requires: cppunit-devel
Libraries, header files and documentation for developing AMQP clients
in C++ using Qpid. Qpid implements the AMQP messaging specification.
-%define daemon qpidd
%package -n %{daemon}
Summary: An AMQP message broker daemon.
Group: System Environment/Daemons
-Requires: %name-client = %version-%release
+Requires: %name = %version-%release
-%description %{daemon}
+%description -n %{daemon}
A message broker daemon that receives stores and routes messages using
the open AMQP messaging protocol.
@@ -63,44 +72,61 @@ the open AMQP messaging protocol.
make %{?_smp_mflags}
%install
-rm -rf $RPM_BUILD_ROOT
-make install DESTDIR=$RPM_BUILD_ROOT
-rm -f $RPM_BUILD_ROOT%_libdir/*.a
-rm -f $RPM_BUILD_ROOT%_libdir/*.la
+rm -rf %{buildroot}
+make install DESTDIR=%{buildroot}
+install -Dp -m0755 etc/qpidd %{buildroot}%{_initrddir}/qpidd
+rm -f %{buildroot}%_libdir/*.a
+rm -f %{buildroot}%_libdir/*.la
+
%clean
-rm -rf $RPM_BUILD_ROOT
+rm -rf %{buildroot}
%check
make check
-%files %{name}
+%files
%defattr(-,root,root,-)
-%doc LICENSE.txt NOTICE.txt
-%doc %_docdir/html/*
+%doc LICENSE.txt NOTICE.txt README.txt
%_libdir/libqpidcommon.so.0
%_libdir/libqpidcommon.so.0.1.0
%_libdir/libqpidclient.so.0
%_libdir/libqpidclient.so.0.1.0
-%files %{name}-devel
+%files devel
%defattr(-,root,root,-)
-%_includedir/qpid/*.h
+%_includedir/qpidc
%_libdir/libqpidcommon.so
%_libdir/libqpidclient.so
+%doc docs/api/html
-%files %{daemon}
+%files -n %{daemon}
+%_libdir/libqpidbroker.so
%_libdir/libqpidbroker.so.0
%_libdir/libqpidbroker.so.0.1.0
%_sbindir/%{daemon}
+%{_initrddir}/qpidd
%doc %_mandir/man1/%{daemon}.*
-#FIXME: Fix Makefile.am to install etc/init.d/%{daemon} properly:
-%_sysconfdir/init.d/%{daemon}
+%post
+# This adds the proper /etc/rc*.d links for the script
+/sbin/chkconfig --add qpidd
+
+%preun
+# Check that this is actual deinstallation, not just removing for upgrade.
+if [ $1 = 0 ]; then
+ /sbin/service qpidd stop >/dev/null 2>&1 || :
+ /sbin/chkconfig --del qpidd
+fi
+
+%postun
+if [ "$1" -ge "1" ]; then
+ /sbin/service qpidd condrestart >/dev/null 2>&1 || :
+fi
%changelog
-* Mon Dec 11 2006 Alan Conway <aconway@localhost.localdomain> - 0.1-1
-- Second cut, still needs work and testing.
+* Mon Dec 19 2006 Alan Conway <aconway@redhat.com> - 0.1-1
+- Fixed problems with qpidd init script and doc files.
* Fri Dec 8 2006 David Lutterkort <dlutter@redhat.com> - 0.1-1
- Initial version based on Jim Meyering's sketch and discussions with Alan