From 36556b9ca8b875bc2a3aac10ee52d59a3ae6ea07 Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Mon, 27 Feb 2006 20:36:50 +0000 Subject: [PATCH] auto-import oddjob-0.23-1 on branch devel from oddjob-0.23-1.src.rpm --- .cvsignore | 1 + oddjob.spec | 169 ++++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 171 insertions(+) create mode 100644 oddjob.spec diff --git a/.cvsignore b/.cvsignore index e69de29..c554a6b 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +oddjob-0.23-1.tar.gz diff --git a/oddjob.spec b/oddjob.spec new file mode 100644 index 0000000..798726a --- /dev/null +++ b/oddjob.spec @@ -0,0 +1,169 @@ +%define build_sample 0 + +Name: oddjob +Version: 0.23 +Release: 1 +Source: http://people.redhat.com/nalin/oddjob/oddjob-%{version}-1.tar.gz +Summary: A D-BUS service which runs odd jobs on behalf of client applications +License: BSD +Group: System Environment/Daemons +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: dbus-devel >= 0.22, libselinux-devel, libxml2-devel +BuildRequires: pam-devel, python-devel +BuildRequires: cyrus-sasl-devel, krb5-devel, openldap-devel +Requires(post): /sbin/service +Requires(post): /sbin/chkconfig +Requires(pre): /sbin/chkconfig +URL: http://people.redhat.com/nalin/oddjob/ +Requires: %{name}-libs = %{version}-%{release} + +%description +oddjob is a D-BUS service which performs particular tasks for clients which +connect to it and issue requests using the system-wide message bus. + +%package devel +Group: Development/Libraries +Summary: Files for developing oddjob clients +Requires: %{name} = %{version}-%{release} + +%description devel +This package contains header files and static libraries which aid in the +development of simple oddjob client applications. More complex clients +can of course use D-BUS APIs directly. + +%package libs +Group: System Environment/Libraries +Summary: Libraries used by oddjob clients +Requires: %{name} = %{version}-%{release} + +%description libs +This package contains dynamic libraries which are used by simple oddjob client +applications. + +%package sample +Group: System Environment/Daemons +Summary: A sample oddjob service. +Requires: %{name} = %{version}-%{release} + +%description sample +This package contains a trivial sample oddjob service. + +%prep +%setup -q -n %{name}-%{version}-1 + +%build +sample_flag= +%if %{build_sample} +sample_flag=--enable-sample +%endif +%configure \ + --disable-static \ + --with-selinux-acls=default \ + --with-selinux-labels \ + --with-python \ + --libexecdir=%{_libdir} \ + $sample_flag +make %{_smp_mflags} + +%install +[ "$RPM_BUILD_ROOT" != "/" ] && rm -fr "$RPM_BUILD_ROOT" +make install DESTDIR="$RPM_BUILD_ROOT" +rm -f "$RPM_BUILD_ROOT"/%{_libdir}/security/*.la +rm -f "$RPM_BUILD_ROOT"/%{_libdir}/security/*.a +if ! test -d "$RPM_BUILD_ROOT"/%{_lib}/security ; then + mkdir -p "$RPM_BUILD_ROOT"/%{_lib}/security + mv "$RPM_BUILD_ROOT"/%{_libdir}/security/*.so "$RPM_BUILD_ROOT"/%{_lib}/security/ +fi +# Recommended, though I disagree. +rm -f "$RPM_BUILD_ROOT"/%{_libdir}/*.la +rm -f "$RPM_BUILD_ROOT"/%{_libdir}/python*/site-packages/*.la + +%if ! %{build_sample} +# Go ahead and build the sample layout. +mkdir -p sample-install-root/sample/{%{_sysconfdir}/{dbus-1/system.d,%{name}d.conf.d},%{_libdir}/%{name}} +install -m644 sample/oddjobd-sample.conf sample-install-root/sample/%{_sysconfdir}/%{name}d.conf.d/ +install -m644 sample/oddjob-sample.conf sample-install-root/sample/%{_sysconfdir}/dbus-1/system.d/ +install -m755 sample/oddjob-sample.sh sample-install-root/sample/%{_libdir}/%{name}/ +%endif + +%clean +[ "$RPM_BUILD_ROOT" != "/" ] && rm -fr "$RPM_BUILD_ROOT" + +%files +%defattr(-,root,root) +%doc *.dtd COPYING QUICKSTART python/sample.py doc/oddjob.html +%if ! %{build_sample} +%doc sample-install-root/sample +%endif +%config(noreplace) %{_initrddir}/oddjobd +%{_bindir}/* +%{_sbindir}/* +%config(noreplace) %{_sysconfdir}/dbus-*/system.d/oddjob.conf +%config(noreplace) %{_sysconfdir}/oddjobd.conf +%dir %{_sysconfdir}/oddjobd.conf.d +%dir %{_sysconfdir}/%{name} +%dir %{_libdir}/%{name} +%{_libdir}/%{name}/mkhomedir +%{_libdir}/%{name}/sanity.sh +%{_mandir}/*/oddjob*.* + +%files libs +%defattr(-,root,root) +%{_libdir}/liboddjob.so.* +%{_libdir}/python*/site-packages/* +/%{_lib}/security/*.so +%{_mandir}/*/pam_*.* + +%files devel +%defattr(-,root,root) +%{_includedir}/* +%{_libdir}/pkgconfig/oddjob.pc +%{_libdir}/liboddjob.so + +%if %{build_sample} +%files sample +%defattr(-,root,root) +%{_libdir}/%{name}/oddjob-sample.sh +%config %{_sysconfdir}/dbus-*/system.d/oddjob-sample.conf +%config %{_sysconfdir}/oddjobd.conf.d/oddjobd-sample.conf +%endif + +%post +/sbin/chkconfig --add oddjobd + +%preun +if [ $1 -eq 0 ] ; then + /sbin/service oddjobd stop > /dev/null 2>&1 + /sbin/chkconfig --del oddjobd +fi + +%post libs -p /sbin/ldconfig +%postun libs -p /sbin/ldconfig + +%changelog +* Fri Jan 27 2006 Nalin Dahyabhai 0.23-1 +- fix compilation against older versions of D-BUS if the + GetConnectionSELinuxSecurityContext method turns out to be available + +* Mon Jan 16 2006 Nalin Dahyabhai 0.22-1 +- fix some path mismatches in the sample configuration files +- don't try to set a reconnect timeout until after we've connected + +* Mon Jan 9 2006 Nalin Dahyabhai 0.21-3 +- prefer BuildRequires: to BuildPrereq (#176452) +- require /sbin/service at uninstall-time, because we use it (#176452) +- be more specific about when we require /sbin/chkconfig (#176452) + +* Fri Jan 6 2006 Nalin Dahyabhai 0.21-2 +- add some missing build-time requirements + +* Thu Dec 22 2005 Nalin Dahyabhai 0.21-1 +- fix the location for the sample D-BUS configuration doc file +- own more created directories + +* Thu Dec 22 2005 Nalin Dahyabhai 0.20-1 +- update to 0.20 +- break shared libraries and modules for PAM and python into a subpackage + for better behavior on multilib boxes +- if we're not building a sample subpackage, include the sample files in + the right locations as %%doc files diff --git a/sources b/sources index e69de29..d4c71a5 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +df4a8c74dc972ede3c829b42da388f1b oddjob-0.23-1.tar.gz