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