]> git.pld-linux.org Git - packages/cachefilesd.git/blame - cachefilesd.spec
add rc-scripts initscript (not tested)
[packages/cachefilesd.git] / cachefilesd.spec
CommitLineData
465ee9c1
AM
1Summary: CacheFiles user-space management daemon
2Name: cachefilesd
3Version: 0.10.5
72332ee5 4Release: 2
465ee9c1
AM
5License: GPL v2
6Group: Daemons
465ee9c1
AM
7Source0: http://people.redhat.com/dhowells/fscache/%{name}-%{version}.tar.bz2
8# Source0-md5: 9e85dd0ace346ff47e188ded8c05ab3b
46473e89 9Source1: %{name}.init
72332ee5 10Patch0: %{name}-cpueating.patch
b5d93083 11URL: http://people.redhat.com/~dhowells/fscache/
465ee9c1
AM
12Requires(post,preun): /sbin/chkconfig
13Requires(post,preun,postun): systemd-units >= 38
46473e89 14Requires: rc-scripts
465ee9c1
AM
15Requires: systemd-units >= 38
16BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17
18%description
19The cachefilesd daemon manages the caching files and directory that
20are that are used by network file systems such a AFS and NFS to do
21persistent 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
33rm -rf $RPM_BUILD_ROOT
46473e89 34install -d $RPM_BUILD_ROOT{/sbin,%{_mandir}/man{5,8},%{systemdunitdir},/etc/rc.d/init.d,%{_localstatedir}/cache/fscache}
465ee9c1 35
5101a695
ER
36%{__make} install \
37 INSTALL="install -p" \
38 DESTDIR=$RPM_BUILD_ROOT
465ee9c1 39
46473e89 40install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/cachefilesd
5101a695 41cp -p cachefilesd.service $RPM_BUILD_ROOT%{systemdunitdir}
465ee9c1
AM
42
43%clean
44rm -rf $RPM_BUILD_ROOT
45
46%post
46473e89 47/sbin/chkconfig --add cachefilesd
465ee9c1
AM
48%service cachefilesd restart "cachefilesd daemon"
49%systemd_post cachefilesd.service
50
51%preun
52if [ "$1" = "0" ]; then
46473e89 53 /sbin/chkconfig --del cachefilesd
465ee9c1 54 %service cachefilesd stop
465ee9c1
AM
55fi
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
3115abd4 66%attr(755,root,root) /sbin/cachefilesd
465ee9c1
AM
67%{_mandir}/man5/cachefilesd.conf.5*
68%{_mandir}/man8/cachefilesd.8*
46473e89 69%attr(754,root,root) /etc/rc.d/init.d/cachefilesd
5101a695 70%{systemdunitdir}/cachefilesd.service
465ee9c1 71%dir %{_localstatedir}/cache/fscache
This page took 0.062627 seconds and 4 git commands to generate.