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

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
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

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

%setup -q
%patch1 -p1
%patch2 -p1

make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}

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

%stop_on_removal cachefilesd

%fillup_and_insserv cachefilesd

%restart_on_update cachefilesd

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