2 # - maybe some scripts (still) usable here: http://bugs.gentoo.org/show_bug.cgi?id=64724
3 # - PLD-ize init.d scripts
5 Summary: Read a preset list of files into memory
6 Summary(pl.UTF-8): Odczyt predefiniowanej listy plików do pamięci
13 # Source available only via git. Commands to get archive with latest released
15 # git clone git://git.fedorahosted.org/readahead
17 # git archive --prefix=readahead-1.5.4/ v1.5.4 |bzip2 -9 >readahead-1.5.4.tar.bz2
18 Source0: %{name}-%{version}.tar.bz2
19 # Source0-md5: 2c838de91b3501a378e72f3b7cf7bd11
20 Source1: default.early
21 Source2: default.later
22 Patch0: %{name}-init.d.patch
23 URL: https://fedorahosted.org/readahead/
24 BuildRequires: audit-libs-devel >= 1.5
25 BuildRequires: e2fsprogs-devel
26 BuildRequires: libblkid-devel
27 BuildRequires: sed >= 4.0
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 %define _sbindir /sbin
33 readahead reads the contents of a list of files into memory, which
34 causes them to be read from cache when they are actually needed. Its
35 goal is to speed up the boot process.
37 %description -l pl.UTF-8
38 readahead czyta zawartość plików z listy do pamięci. Powoduje to
39 czytanie ich z pamięci podręcznej (cache) gdy są faktycznie potrzebne.
40 Dzięki temu przyspieszany jest proces startowania systemu.
46 %{__sed} -i "s,%{_prefix}%{_sbindir}/readahead,%{_sbindir}/readahead,g" scripts/readahead_*
55 rm -rf $RPM_BUILD_ROOT
58 DESTDIR=$RPM_BUILD_ROOT
60 install -d $RPM_BUILD_ROOT/var/lib/readahead
61 cp -p %{SOURCE1} $RPM_BUILD_ROOT/var/lib/readahead
62 cp -p %{SOURCE2} $RPM_BUILD_ROOT/var/lib/readahead
67 rm -rf $RPM_BUILD_ROOT
70 /sbin/chkconfig --add readahead_later
71 /sbin/chkconfig --add readahead_early
72 %service readahead_early restart
73 %service readahead_later restart
76 if [ "$1" = "0" ]; then
77 %service readahead_later stop
78 %service readahead_early stop
79 /sbin/chkconfig --del readahead_later
80 /sbin/chkconfig --del readahead_early
83 %files -f %{name}.lang
84 %defattr(644,root,root,755)
85 %doc README lists/README.lists
86 %dir /etc/sysconfig/readahead
87 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/readahead.conf
88 %config(noreplace) %verify(not md5 mtime size) /etc/init/readahead.conf
89 %config(noreplace) %verify(not md5 mtime size) /etc/init/readahead-collector.conf
90 %config(noreplace) %verify(not md5 mtime size) /etc/init/readahead-disable-services.conf
91 %attr(755,root,root) /etc/cron.daily/readahead.cron
92 %attr(755,root,root) /etc/cron.monthly/readahead-monthly.cron
93 %attr(754,root,root) /etc/rc.d/init.d/readahead_later
94 %attr(754,root,root) /etc/rc.d/init.d/readahead_early
95 %attr(755,root,root) %{_sbindir}/readahead
96 %attr(755,root,root) %{_sbindir}/readahead-collector
97 %dir /var/lib/readahead
98 /var/lib/readahead/default.*