36556b9
%define build_sample 0
36556b9
36556b9
Name: oddjob
283c306
Version: 0.25
7ba0401
Release: 3
36556b9
Source: http://people.redhat.com/nalin/oddjob/oddjob-%{version}-1.tar.gz
36556b9
Summary: A D-BUS service which runs odd jobs on behalf of client applications
36556b9
License: BSD
36556b9
Group: System Environment/Daemons
36556b9
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
36556b9
BuildRequires: dbus-devel >= 0.22, libselinux-devel, libxml2-devel
36556b9
BuildRequires: pam-devel, python-devel
36556b9
BuildRequires: cyrus-sasl-devel, krb5-devel, openldap-devel
6f4bc7c
BuildRequires: docbook-dtds, xmlto
36556b9
Requires(post): /sbin/service
36556b9
Requires(post): /sbin/chkconfig
36556b9
Requires(pre): /sbin/chkconfig
36556b9
URL: http://people.redhat.com/nalin/oddjob/
36556b9
Requires: %{name}-libs = %{version}-%{release}
36556b9
36556b9
%description
36556b9
oddjob is a D-BUS service which performs particular tasks for clients which
36556b9
connect to it and issue requests using the system-wide message bus.
36556b9
36556b9
%package devel
36556b9
Group: Development/Libraries
36556b9
Summary: Files for developing oddjob clients
36556b9
Requires: %{name} = %{version}-%{release}
36556b9
36556b9
%description devel
36556b9
This package contains header files and static libraries which aid in the
36556b9
development of simple oddjob client applications.  More complex clients
36556b9
can of course use D-BUS APIs directly.
36556b9
36556b9
%package libs
36556b9
Group: System Environment/Libraries
36556b9
Summary: Libraries used by oddjob clients
36556b9
Requires: %{name} = %{version}-%{release}
36556b9
36556b9
%description libs
36556b9
This package contains dynamic libraries which are used by simple oddjob client
36556b9
applications.
36556b9
36556b9
%package sample
36556b9
Group: System Environment/Daemons
36556b9
Summary: A sample oddjob service.
36556b9
Requires: %{name} = %{version}-%{release}
36556b9
36556b9
%description sample
36556b9
This package contains a trivial sample oddjob service.
36556b9
36556b9
%prep
36556b9
%setup -q -n %{name}-%{version}-1
36556b9
36556b9
%build
36556b9
sample_flag=
36556b9
%if %{build_sample}
36556b9
sample_flag=--enable-sample
36556b9
%endif
36556b9
%configure \
36556b9
	--disable-static \
36556b9
	--with-selinux-acls=default \
36556b9
	--with-selinux-labels \
6f4bc7c
	--with-python --enable-xml-docs --enable-compat-dtd \
36556b9
	--libexecdir=%{_libdir} \
36556b9
	$sample_flag
36556b9
make %{_smp_mflags}
36556b9
36556b9
%install
36556b9
[ "$RPM_BUILD_ROOT" != "/" ] && rm -fr "$RPM_BUILD_ROOT"
36556b9
make install DESTDIR="$RPM_BUILD_ROOT"
36556b9
rm -f "$RPM_BUILD_ROOT"/%{_libdir}/security/*.la
36556b9
rm -f "$RPM_BUILD_ROOT"/%{_libdir}/security/*.a
36556b9
if ! test -d "$RPM_BUILD_ROOT"/%{_lib}/security ; then
36556b9
	mkdir -p "$RPM_BUILD_ROOT"/%{_lib}/security
36556b9
	mv "$RPM_BUILD_ROOT"/%{_libdir}/security/*.so "$RPM_BUILD_ROOT"/%{_lib}/security/
36556b9
fi
36556b9
# Recommended, though I disagree.
36556b9
rm -f "$RPM_BUILD_ROOT"/%{_libdir}/*.la
36556b9
rm -f "$RPM_BUILD_ROOT"/%{_libdir}/python*/site-packages/*.la
36556b9
36556b9
%if ! %{build_sample}
36556b9
# Go ahead and build the sample layout.
36556b9
mkdir -p sample-install-root/sample/{%{_sysconfdir}/{dbus-1/system.d,%{name}d.conf.d},%{_libdir}/%{name}}
36556b9
install -m644 sample/oddjobd-sample.conf sample-install-root/sample/%{_sysconfdir}/%{name}d.conf.d/
36556b9
install -m644 sample/oddjob-sample.conf  sample-install-root/sample/%{_sysconfdir}/dbus-1/system.d/
36556b9
install -m755 sample/oddjob-sample.sh    sample-install-root/sample/%{_libdir}/%{name}/
36556b9
%endif
36556b9
36556b9
%clean
36556b9
[ "$RPM_BUILD_ROOT" != "/" ] && rm -fr "$RPM_BUILD_ROOT"
36556b9
36556b9
%files
36556b9
%defattr(-,root,root)
36556b9
%doc *.dtd COPYING QUICKSTART python/sample.py doc/oddjob.html
36556b9
%if ! %{build_sample}
36556b9
%doc sample-install-root/sample
36556b9
%endif
36556b9
%config(noreplace) %{_initrddir}/oddjobd
36556b9
%{_bindir}/*
36556b9
%{_sbindir}/*
36556b9
%config(noreplace) %{_sysconfdir}/dbus-*/system.d/oddjob.conf
36556b9
%config(noreplace) %{_sysconfdir}/oddjobd.conf
36556b9
%dir %{_sysconfdir}/oddjobd.conf.d
283c306
%config %{_sysconfdir}/oddjobd.conf.d/oddjobd-introspection.conf
36556b9
%dir %{_sysconfdir}/%{name}
36556b9
%dir %{_libdir}/%{name}
36556b9
%{_libdir}/%{name}/mkhomedir
36556b9
%{_libdir}/%{name}/sanity.sh
36556b9
%{_mandir}/*/oddjob*.*
36556b9
36556b9
%files libs
36556b9
%defattr(-,root,root)
36556b9
%{_libdir}/liboddjob.so.*
36556b9
%{_libdir}/python*/site-packages/*
36556b9
/%{_lib}/security/*.so
36556b9
%{_mandir}/*/pam_*.*
36556b9
36556b9
%files devel
36556b9
%defattr(-,root,root)
36556b9
%{_includedir}/*
36556b9
%{_libdir}/pkgconfig/oddjob.pc
36556b9
%{_libdir}/liboddjob.so
36556b9
36556b9
%if %{build_sample}
36556b9
%files sample
36556b9
%defattr(-,root,root)
36556b9
%{_libdir}/%{name}/oddjob-sample.sh
36556b9
%config %{_sysconfdir}/dbus-*/system.d/oddjob-sample.conf
36556b9
%config %{_sysconfdir}/oddjobd.conf.d/oddjobd-sample.conf
36556b9
%endif
36556b9
36556b9
%post
36556b9
/sbin/chkconfig --add oddjobd
36556b9
36556b9
%preun
36556b9
if [ $1 -eq 0 ] ; then
36556b9
	/sbin/service oddjobd stop > /dev/null 2>&1
36556b9
	/sbin/chkconfig --del oddjobd
36556b9
fi
36556b9
36556b9
%post libs -p /sbin/ldconfig
36556b9
%postun libs -p /sbin/ldconfig
36556b9
36556b9
%changelog
7ba0401
* Tue Apr 11 2006 Nalin Dahyabhai <nalin@redhat.com> 0.25-3
7ba0401
- rebuild
7ba0401
2111b77
* Tue Apr 11 2006 Nalin Dahyabhai <nalin@redhat.com> 0.25-2
2111b77
- rebuild
2111b77
283c306
* Tue Apr 11 2006 Nalin Dahyabhai <nalin@redhat.com> 0.25-1
283c306
- update to 0.25:
283c306
  - add introspection for parents of objects specified in the configuration
283c306
  - oddjobd can reload its configuration now
283c306
  - add -u (umask) and -s (skeldir) flags to the mkhomedir helper
6f4bc7c
6f4bc7c
* Tue Feb 28 2006 Nalin Dahyabhai <nalin@redhat.com> 0.24-1
6f4bc7c
- update to 0.24, fixing some build errors against D-BUS 0.30-0.33
6f4bc7c
- require xmlto, because the generated HTML differs depending on whether
6f4bc7c
  or not we know how to enforce ACLs which include SELinux context info
6f4bc7c
- build with DocBook 4.3
6f4bc7c
6f4bc7c
* Mon Feb 27 2006 Nalin Dahyabhai <nalin@redhat.com> 0.23-3
6f4bc7c
- rebuild
6f4bc7c
6f4bc7c
* Mon Feb 27 2006 Nalin Dahyabhai <nalin@redhat.com> 0.23-2
6f4bc7c
- rebuild
6f4bc7c
36556b9
* Fri Jan 27 2006 Nalin Dahyabhai <nalin@redhat.com> 0.23-1
36556b9
- fix compilation against older versions of D-BUS if the
36556b9
  GetConnectionSELinuxSecurityContext method turns out to be available
36556b9
36556b9
* Mon Jan 16 2006 Nalin Dahyabhai <nalin@redhat.com> 0.22-1
36556b9
- fix some path mismatches in the sample configuration files
36556b9
- don't try to set a reconnect timeout until after we've connected
36556b9
36556b9
* Mon Jan  9 2006 Nalin Dahyabhai <nalin@redhat.com> 0.21-3
36556b9
- prefer BuildRequires: to BuildPrereq (#176452)
36556b9
- require /sbin/service at uninstall-time, because we use it (#176452)
36556b9
- be more specific about when we require /sbin/chkconfig (#176452)
36556b9
36556b9
* Fri Jan  6 2006 Nalin Dahyabhai <nalin@redhat.com> 0.21-2
36556b9
- add some missing build-time requirements
36556b9
36556b9
* Thu Dec 22 2005 Nalin Dahyabhai <nalin@redhat.com> 0.21-1
36556b9
- fix the location for the sample D-BUS configuration doc file
36556b9
- own more created directories
36556b9
36556b9
* Thu Dec 22 2005 Nalin Dahyabhai <nalin@redhat.com> 0.20-1
36556b9
- update to 0.20
36556b9
- break shared libraries and modules for PAM and python into a subpackage
36556b9
  for better behavior on multilib boxes
36556b9
- if we're not building a sample subpackage, include the sample files in
36556b9
  the right locations as %%doc files