File cachefilesd.spec of Package cachefilesd
#
# spec file for package cachefilesd
#
# Copyright (c) 2011 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/
#
Name: cachefilesd
License: GPL-2.0+
Group: System/Daemons
PreReq: %insserv_prereq
Summary: CacheFiles userspace management daemon
Version: 0.9
Release: 13
Source: %{name}-%{version}.tar.bz2
Source1: cachefilesd.init
Patch1: cachefilesd-dir-fix.diff
Patch2: cachefilesd-header.patch
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.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%build
make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
%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
%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