Release: 1
License: GPL
Group: System Environment/Base
BuildRoot: %{_builddir}/%{name}-root
BuildPrereq: glib >= 1.2
BuildPrereq: redland >= 0.9.10
Requires: glib >= 1.2 initscripts >= 5.49
Url: http://www.fastboot.org
Summary: Software to help computers boot faster
Packager: Leni Mayo <serel@fastboot.org>
Source: http://www.fastboot.org/download/sources/%{name}-%{version}.tar.gz
Source1: serel.sysconfig
Source2: serel.conf
Source3: redhat-serel-default.rdf
Source4: serel-local.rdf
Source5: redhat-rc.serel.include

%description
serel helps computers to boot faster by adding synchronization and
integrity-checking to the operating system's "service startup" phase,
allowing it's boot scripts to be started in parallel.  The software
supports the visualization of services, dependencies, and timings.
%prep
%setup -q

%build
%configure --enable-packaging --enable-patchfor=redhat
make

%install
rm -rf $RPM_BUILD_ROOT

mkdir -p ${RPM_BUILD_ROOT}/etc/rc.d
mkdir -p ${RPM_BUILD_ROOT}/etc/sysconfig
mkdir -p ${RPM_BUILD_ROOT}/etc/serel
mkdir -p ${RPM_BUILD_ROOT}/var/lib/serel
mkdir -p ${RPM_BUILD_ROOT}/usr/sbin
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man1
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man8

make DESTDIR=$RPM_BUILD_ROOT install
install -m 644 %SOURCE1 $RPM_BUILD_ROOT/etc/sysconfig/serel
install -m 644 %SOURCE2 $RPM_BUILD_ROOT/etc/serel/serel.conf
install -m 644 %SOURCE3 $RPM_BUILD_ROOT/etc/serel/default.rdf
install -m 644 %SOURCE4 $RPM_BUILD_ROOT/etc/serel/local.rdf
install -m 644 %SOURCE5 $RPM_BUILD_ROOT/etc/rc.d/rc.serel.include

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
/usr/sbin/serelc
/usr/sbin/sereld
/usr/sbin/serelhistory
/usr/sbin/serel-wrap
/usr/sbin/serel-rdfgen
/usr/share/serel
%dir /var/lib/serel
%doc AUTHORS ChangeLog COPYING NEWS README
# %doc doc/docbook/*.xml doc/docbook/*.sgml doc/html/*.html
%{_mandir}/man8/*
%{_mandir}/man1/*
%config /etc/sysconfig/serel
%config /etc/serel/serel.conf
%config /etc/serel/default.rdf
%config(noreplace) /etc/serel/local.rdf
%config /etc/rc.d/rc.serel.include
