]> git.pld-linux.org Git - packages/man-db.git/blob - man-db.spec
0bac9c25a7edf32e215bfbdbc4ba40145f236e06
[packages/man-db.git] / man-db.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # "make check" call
4 #
5 Summary:        Tools for searching and reading man pages
6 Summary(pl.UTF-8):      Narzędzia do przeszukiwania i czytania stron podręcznika man
7 Name:           man-db
8 Version:        2.7.3
9 Release:        3
10 # project man-db  GPLv2+
11 # Gnulib part     GPLv3+
12 License:        GPL v2+ and GPL v3+
13 Group:          Base
14 Source0:        http://download.savannah.gnu.org/releases/man-db/%{name}-%{version}.tar.xz
15 # Source0-md5:  df898c82d766dad6492a5a96d5a26647
16 Source1:        %{name}.daily
17 Source2:        %{name}.sysconfig
18 # NOTE: .timer/.service not needed, as there is /etc/cron.daily script, which will
19 #       be called by systemd-cronjobs anyway
20 #       Provide package crontab instead to enable systemd timer.
21 # Source3:      cronjob-%{name}.timer
22 # Source4:      cronjob-%{name}.service
23
24 # Resolves: #655385 - use old format of nroff output
25 Patch0:         sgr.patch
26 URL:            http://www.nongnu.org/man-db/
27 BuildRequires:  gdbm-devel
28 BuildRequires:  gettext-tools >= 0.18.1
29 BuildRequires:  groff
30 BuildRequires:  less
31 BuildRequires:  libpipeline-devel >= 1.4.0
32 BuildRequires:  pkgconfig
33 BuildRequires:  po4a >= 0.41
34 BuildRequires:  tar >= 1:1.22
35 BuildRequires:  xz
36 BuildRequires:  zlib-devel
37 Requires:       coreutils
38 Requires:       cronjobs
39 Requires:       grep
40 Requires:       groff
41 Requires:       gzip
42 Requires:       less
43 Requires:       libpipeline >= 1.4.0
44 Provides:       man-pages-reader = %{version}
45 Obsoletes:      man < 1.7
46 Obsoletes:      man-config
47 Obsoletes:      man-whatis
48 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49
50 %define         cache   /var/cache/man
51
52 %description
53 The man-db package includes five tools for browsing man-pages: man,
54 whatis, apropos, manpath and lexgrog:
55 - man preformats and displays manual pages.
56 - whatis searches the manual page names.
57 - apropos searches the manual page names and descriptions.
58 - manpath determines search path for manual pages.
59 - lexgrog directly reads header information in manual pages.
60
61 %description -l pl.UTF-8
62 Pakiet man-db zawiera pięć narzędzi do przeglądania stron podręcznika
63 man (nazywanych man-pages): man, whatis, apropos, manpath i lexgrog:
64 - man wstępnie formatuje i wyświetla strony podręcznika.
65 - whatis przeszukuje nazwy stron podręcznika.
66 - apropos przeszukuje nazwy stron podręcznika oraz opisy.
67 - manpath określa ścieżkę przeszukiwania dla stron podręcznika.
68 - lexgrog bezpośrednio odczytuje informacje z nagłówka stron
69   podręcznika.
70
71
72 %prep
73 %setup -q
74 %patch0 -p1
75
76 %build
77 %configure \
78         --disable-setuid \
79         --disable-silent-rules \
80         --with-browser=elinks \
81         --with-sections="1 1p 8 2 3 3p 4 5 6 7 9 0p n l p o 1x 2x 3x 4x 5x 6x 7x 8x" \
82         --with-systemdtmpfilesdir=%{systemdtmpfilesdir}
83
84 %{__make} \
85         V=1 \
86         CC="%{__cc} %{rpmcflags} %{rpmcppflags}"
87
88 %{?with_tests:%{__make} check}
89
90 %install
91 rm -rf $RPM_BUILD_ROOT
92 %{__make} install \
93         INSTALL='install -p' \
94         prefix=%{_prefix} \
95         DESTDIR=$RPM_BUILD_ROOT
96
97 # move the documentation to relevant place
98 mv $RPM_BUILD_ROOT%{_docdir}/man-db/* ./
99
100 # remove libtool archives
101 %{__rm} $RPM_BUILD_ROOT%{_libdir}/man-db/*.la
102
103 # install cache directory
104 install -d $RPM_BUILD_ROOT%{cache}
105
106 # install cron script for man-db creation/update
107 install -D -p %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.daily/man-db.cron
108
109 # config for cron script
110 install -D -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/man-db
111
112 # systemd timers 
113 # install -d  $RPM_BUILD_ROOT%{systemdunitdir}
114 # install -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/cronjob-%{name}.timer
115 # install -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/cronjob-%{name}.service
116
117
118 cat <<EOF > $RPM_BUILD_ROOT%{systemdtmpfilesdir}/man-db.conf
119 d %{cache} 2755 root root 1w
120 EOF
121
122 %find_lang %{name}
123 %find_lang %{name}-gnulib
124 cat %{name}-gnulib.lang >> %{name}.lang
125
126 %clean
127 rm -rf $RPM_BUILD_ROOT
128
129 %post
130 %systemd_post cronjob-%{name}.timer
131
132 %preun
133 %systemd_preun cronjob-%{name}.timer
134
135 %postun
136 %systemd_reload
137
138
139 %files -f %{name}.lang
140 %defattr(644,root,root,755)
141 %doc README man-db-manual.txt man-db-manual.ps docs/COPYING ChangeLog NEWS
142 %config(noreplace) %{_sysconfdir}/man_db.conf
143 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/man-db
144 %attr(750,root,root) /etc/cron.daily/man-db.cron
145 %attr(755,root,root) %{_sbindir}/accessdb
146 %attr(755,root,root) %{_bindir}/man
147 %attr(755,root,root) %{_bindir}/whatis
148 %attr(755,root,root) %{_bindir}/apropos
149 %attr(755,root,root) %{_bindir}/manpath
150 %attr(755,root,root) %{_bindir}/lexgrog
151 %attr(755,root,root) %{_bindir}/catman
152 %attr(755,root,root) %{_bindir}/mandb
153 %dir %{_libdir}/man-db
154 %attr(755,root,root) %{_libdir}/man-db/zsoelim
155 %attr(755,root,root) %{_libdir}/man-db/*.so
156 %{_libdir}/man-db/globbing
157 %{_libdir}/man-db/manconv
158 %{systemdtmpfilesdir}/man-db.conf
159 # %%{systemdunitdir}/cronjob-%{name}.service
160 # %%{systemdunitdir}/cronjob-%{name}.timer
161 %dir %{cache}
162 # documentation and translation
163 %{_mandir}/man1/apropos.1*
164 %{_mandir}/man1/lexgrog.1*
165 %{_mandir}/man1/man.1*
166 %{_mandir}/man1/manconv.1*
167 %{_mandir}/man1/manpath.1*
168 %{_mandir}/man1/whatis.1*
169 %{_mandir}/man1/zsoelim.1*
170 %{_mandir}/man5/manpath.5*
171 %{_mandir}/man8/accessdb.8*
172 %{_mandir}/man8/catman.8*
173 %{_mandir}/man8/mandb.8*
174 %lang(da) %{_mandir}/da/man*/*
175 %lang(de) %{_mandir}/de/man*/*
176 %lang(es) %{_mandir}/es/man*/*
177 %lang(fr) %{_mandir}/fr/man*/*
178 %lang(id) %{_mandir}/id/man*/*
179 %lang(it) %{_mandir}/it/man*/*
180 %lang(ja) %{_mandir}/ja/man*/*
181 %lang(nl) %{_mandir}/nl/man*/*
182 %lang(pl) %{_mandir}/pl/man*/*
183 %lang(ru) %{_mandir}/ru/man*/*
184 %lang(zh_CN) %{_mandir}/zh_CN/man*/*
185
186
This page took 0.220093 seconds and 2 git commands to generate.