]>
Commit | Line | Data |
---|---|---|
5101a695 ER |
1 | # TODO: |
2 | # - rc-scripts init | |
465ee9c1 AM |
3 | Summary: CacheFiles user-space management daemon |
4 | Name: cachefilesd | |
5 | Version: 0.10.5 | |
72332ee5 | 6 | Release: 2 |
465ee9c1 AM |
7 | License: GPL v2 |
8 | Group: Daemons | |
465ee9c1 AM |
9 | Source0: http://people.redhat.com/dhowells/fscache/%{name}-%{version}.tar.bz2 |
10 | # Source0-md5: 9e85dd0ace346ff47e188ded8c05ab3b | |
5101a695 | 11 | URL: http://people.redhat.com/~dhowells/fscache/ |
72332ee5 | 12 | Patch0: %{name}-cpueating.patch |
465ee9c1 AM |
13 | Requires(post,preun): /sbin/chkconfig |
14 | Requires(post,preun,postun): systemd-units >= 38 | |
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 | |
72332ee5 | 25 | %patch0 -p1 |
465ee9c1 AM |
26 | |
27 | %build | |
5101a695 ER |
28 | %{__make} all \ |
29 | CC="%{__cc}" \ | |
30 | CFLAGS="%{rpmcppflags} %{rpmcflags}" | |
465ee9c1 AM |
31 | |
32 | %install | |
33 | rm -rf $RPM_BUILD_ROOT | |
5101a695 | 34 | install -d $RPM_BUILD_ROOT{/sbin,%{_mandir}/man{5,8},%{systemdunitdir},%{_localstatedir}/cache/fscache} |
465ee9c1 | 35 | |
5101a695 ER |
36 | %{__make} install \ |
37 | INSTALL="install -p" \ | |
38 | DESTDIR=$RPM_BUILD_ROOT | |
465ee9c1 | 39 | |
5101a695 | 40 | cp -p cachefilesd.service $RPM_BUILD_ROOT%{systemdunitdir} |
465ee9c1 AM |
41 | |
42 | %clean | |
43 | rm -rf $RPM_BUILD_ROOT | |
44 | ||
45 | %post | |
46 | #/sbin/chkconfig --add cachefilesd | |
47 | %service cachefilesd restart "cachefilesd daemon" | |
48 | %systemd_post cachefilesd.service | |
49 | ||
50 | %preun | |
51 | if [ "$1" = "0" ]; then | |
5101a695 | 52 | # /sbin/chkconfig --del cachefilesd |
465ee9c1 | 53 | %service cachefilesd stop |
465ee9c1 AM |
54 | fi |
55 | %systemd_preun cachefilesd.service | |
56 | ||
57 | %postun | |
58 | %systemd_reload | |
59 | ||
60 | %files | |
61 | %defattr(644,root,root,755) | |
62 | %doc README howto.txt selinux/move-cache.txt | |
63 | %doc selinux/*.fc selinux/*.if selinux/*.te | |
64 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cachefilesd.conf | |
3115abd4 | 65 | %attr(755,root,root) /sbin/cachefilesd |
465ee9c1 AM |
66 | %{_mandir}/man5/cachefilesd.conf.5* |
67 | %{_mandir}/man8/cachefilesd.8* | |
5101a695 | 68 | %{systemdunitdir}/cachefilesd.service |
465ee9c1 | 69 | %dir %{_localstatedir}/cache/fscache |