]> git.pld-linux.org Git - SPECS.git/blob - readahead.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / readahead.spec
1 # TODO
2 # - maybe some scripts (still) usable here: http://bugs.gentoo.org/show_bug.cgi?id=64724
3 # - PLD-ize init.d scripts
4
5 Summary:        Read a preset list of files into memory
6 Summary(pl.UTF-8):      Odczyt predefiniowanej listy plików do pamięci
7 Name:           readahead
8 Version:        1.5.6
9 Release:        0.3
10 Epoch:          1
11 License:        GPL v2+
12 Group:          Base
13 # Source available only via git. Commands to get archive with latest released
14 # tag looks like:
15 # git clone git://git.fedorahosted.org/readahead
16 # cd 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)
29
30 %define         _sbindir        /sbin
31
32 %description
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.
36
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.
41
42 %prep
43 %setup -q
44 %patch0 -p1
45
46 %{__sed} -i "s,%{_prefix}%{_sbindir}/readahead,%{_sbindir}/readahead,g" scripts/readahead_*
47
48 %build
49 ./autogen.sh
50 %configure
51
52 %{__make}
53
54 %install
55 rm -rf $RPM_BUILD_ROOT
56
57 %{__make} install \
58         DESTDIR=$RPM_BUILD_ROOT
59
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
63
64 %find_lang %{name}
65
66 %clean
67 rm -rf $RPM_BUILD_ROOT
68
69 %post
70 /sbin/chkconfig --add readahead_later
71 /sbin/chkconfig --add readahead_early
72 %service readahead_early restart
73 %service readahead_later restart
74
75 %preun
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
81 fi
82
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.*
This page took 0.113069 seconds and 3 git commands to generate.