]> git.pld-linux.org Git - packages/cachefilesd.git/blob - cachefilesd.spec
add uname -r dependency
[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 Requires:       uname(release) >= 2.6.24
17 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
19 %description
20 The cachefilesd daemon manages the caching files and directory that
21 are that are used by network file systems such a AFS and NFS to do
22 persistent caching to the local disk.
23
24 %prep
25 %setup -q
26 %patch0 -p1
27
28 %build
29 %{__make} all \
30         CC="%{__cc}" \
31         CFLAGS="%{rpmcppflags} %{rpmcflags}"
32
33 %install
34 rm -rf $RPM_BUILD_ROOT
35 install -d $RPM_BUILD_ROOT{/sbin,%{_mandir}/man{5,8},%{systemdunitdir},/etc/rc.d/init.d,%{_localstatedir}/cache/fscache}
36
37 %{__make} install \
38         INSTALL="install -p" \
39         DESTDIR=$RPM_BUILD_ROOT
40
41 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/cachefilesd
42 cp -p cachefilesd.service $RPM_BUILD_ROOT%{systemdunitdir}
43
44 %clean
45 rm -rf $RPM_BUILD_ROOT
46
47 %post
48 /sbin/chkconfig --add cachefilesd
49 %service cachefilesd restart "cachefilesd daemon"
50 %systemd_post cachefilesd.service
51
52 %preun
53 if [ "$1" = "0" ]; then
54         /sbin/chkconfig --del cachefilesd
55         %service cachefilesd stop
56 fi
57 %systemd_preun cachefilesd.service
58
59 %postun
60 %systemd_reload
61
62 %files
63 %defattr(644,root,root,755)
64 %doc README howto.txt selinux/move-cache.txt
65 %doc selinux/*.fc selinux/*.if selinux/*.te
66 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cachefilesd.conf
67 %attr(755,root,root) /sbin/cachefilesd
68 %{_mandir}/man5/cachefilesd.conf.5*
69 %{_mandir}/man8/cachefilesd.8*
70 %attr(754,root,root) /etc/rc.d/init.d/cachefilesd
71 %{systemdunitdir}/cachefilesd.service
72 %dir %{_localstatedir}/cache/fscache
This page took 0.059399 seconds and 3 git commands to generate.