File cachefilesd.spec of Package cachefilesd

# spec file for package cachefilesd
# Copyright (c) 2014 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
Summary:        CacheFiles userspace management daemon
License:        GPL-2.0+
Group:          System/Daemons
Version:        0.10.5
Release:        0
Source:         %{name}-%{version}.tar.xz
Patch0:         cachefilesd-autotools.patch
Patch1:         cachefilesd-config.patch
Patch2:         cachefilesd-loadmod.patch
Patch3:         cachefilesd-monitoring-howto-update.patch
Patch4:         fix-cpu-spin.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  automake
BuildRequires:  libkmod-devel
BuildRequires:  pkgconfig
BuildRequires:  systemd

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

%setup -q
%patch3 -p1
%patch4 -p1
autoreconf -fiv
%configure --with-systemdsystemunitdir=%{_unitdir}
make %{?smp_mflags}

mkdir -p $RPM_BUILD_ROOT/var/cache/fscache
install -m 644 cachefilesd.service %{buildroot}%{_unitdir}/cachefilesd.service

%service_add_pre %{name}.service

%service_del_preun %{name}.service

%service_add_post %{name}.service

%service_del_postun %{name}.service

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

openSUSE Build Service is sponsored by