File cachefilesd.spec of Package cachefilesd

#
# spec file for package cachefilesd (Version 0.9)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           cachefilesd
License:        GPL v2 or later
Group:          System/Daemons
PreReq:         %insserv_prereq
AutoReqProv:    on
Summary:        CacheFiles userspace management daemon
Version:        0.9
Release:        3
Source:         %{name}-%{version}.tar.bz2
Source1:        cachefilesd.init
Patch:          cachefilesd-dir-fix.diff
Url:            http://people.redhat.com/~dhowells/fscache/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
cachefilesd is a user-space management daemon for CacheFiles, a generic
caching framework for mounted filesystems.



Authors:
--------
    David Howells <dhowells@redhat.com>

%prep
%setup -q
%patch -p1

%build
make

%install
make DESTDIR=$RPM_BUILD_ROOT install
mkdir -p $RPM_BUILD_ROOT/var/cache/fscache
install -D -c -m 0755 %{SOURCE1} $RPM_BUILD_ROOT/etc/init.d/cachefilesd
mkdir $RPM_BUILD_ROOT/usr/sbin
ln -s ../../etc/init.d/cachefilesd $RPM_BUILD_ROOT/usr/sbin/rccachefilesd

%preun
%stop_on_removal cachefilesd

%post
%fillup_and_insserv cachefilesd

%postun
%restart_on_update cachefilesd
%insserv_cleanup

%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root)
%doc README *.txt
%doc %{_mandir}/man?/*
/sbin/cachefilesd
/etc/init.d/cachefilesd
/usr/sbin/rccachefilesd
%config(noreplace) /etc/cachefilesd.conf
%dir /var/cache/fscache

%changelog
* Mon Apr 20 2009 tiwai@suse.de
- add init script; fix file list
* Mon Apr 20 2009 tiwai@suse.de
- initial version 0.9
- still no init script; will be added later
openSUSE Build Service is sponsored by