]> git.pld-linux.org Git - packages/cachefilesd.git/blob - cachefilesd.spec
1be060e048ee65a887df8ed865dab366d892f0f8
[packages/cachefilesd.git] / cachefilesd.spec
1 Summary:        CacheFiles user-space management daemon
2 Name:           cachefilesd
3 Version:        0.10.5
4 Release:        2
5 License:        GPL v2
6 Group:          Daemons
7 Source0:        http://people.redhat.com/dhowells/fscache/%{name}-%{version}.tar.bz2
8 # Source0-md5:  9e85dd0ace346ff47e188ded8c05ab3b
9 Source1:        %{name}.init
10 Patch0:         %{name}-cpueating.patch
11 URL:            http://people.redhat.com/~dhowells/fscache/
12 Requires(post,preun):   /sbin/chkconfig
13 Requires(post,preun,postun):    systemd-units >= 38
14 Requires:       rc-scripts
15 Requires:       systemd-units >= 38
16 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17
18 %description
19 The cachefilesd daemon manages the caching files and directory that
20 are that are used by network file systems such a AFS and NFS to do
21 persistent caching to the local disk.
22
23 %prep
24 %setup -q
25 %patch0 -p1
26
27 %build
28 %{__make} all \
29         CC="%{__cc}" \
30         CFLAGS="%{rpmcppflags} %{rpmcflags}"
31
32 %install
33 rm -rf $RPM_BUILD_ROOT
34 install -d $RPM_BUILD_ROOT{/sbin,%{_mandir}/man{5,8},%{systemdunitdir},/etc/rc.d/init.d,%{_localstatedir}/cache/fscache}
35
36 %{__make} install \
37         INSTALL="install -p" \
38         DESTDIR=$RPM_BUILD_ROOT
39
40 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/cachefilesd
41 cp -p cachefilesd.service $RPM_BUILD_ROOT%{systemdunitdir}
42
43 %clean
44 rm -rf $RPM_BUILD_ROOT
45
46 %post
47 /sbin/chkconfig --add cachefilesd
48 %service cachefilesd restart "cachefilesd daemon"
49 %systemd_post cachefilesd.service
50
51 %preun
52 if [ "$1" = "0" ]; then
53         /sbin/chkconfig --del cachefilesd
54         %service cachefilesd stop
55 fi
56 %systemd_preun cachefilesd.service
57
58 %postun
59 %systemd_reload
60
61 %files
62 %defattr(644,root,root,755)
63 %doc README howto.txt selinux/move-cache.txt
64 %doc selinux/*.fc selinux/*.if selinux/*.te
65 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cachefilesd.conf
66 %attr(755,root,root) /sbin/cachefilesd
67 %{_mandir}/man5/cachefilesd.conf.5*
68 %{_mandir}/man8/cachefilesd.8*
69 %attr(754,root,root) /etc/rc.d/init.d/cachefilesd
70 %{systemdunitdir}/cachefilesd.service
71 %dir %{_localstatedir}/cache/fscache
This page took 0.03945 seconds and 2 git commands to generate.