]> git.pld-linux.org Git - SPECS.git/blob - man-db.spec
SPECS updated Sat 31 Jul 21:27:02 CEST 2021
[SPECS.git] / man-db.spec
1 # TODO: use man cache owner?
2 #
3 # Conditional build:
4 %bcond_without  tests   # "make check" call
5 #
6 Summary:        Tools for searching and reading man pages
7 Summary(pl.UTF-8):      Narzędzia do przeszukiwania i czytania stron podręcznika man
8 Name:           man-db
9 Version:        2.9.3
10 Release:        1
11 # project man-db  GPLv2+
12 # Gnulib part     GPLv3+
13 License:        GPL v2+ and GPL v3+
14 Group:          Base
15 Source0:        http://download.savannah.gnu.org/releases/man-db/%{name}-%{version}.tar.xz
16 # Source0-md5:  4c8721faa54a4c950c640e5e5c713fb0
17 Source1:        %{name}.daily
18 Source2:        %{name}.sysconfig
19 # Resolves: #655385 - use old format of nroff output
20 Patch0:         sgr.patch
21 # recent nroff uses times()
22 Patch1:         %{name}-sandbox.patch
23 URL:            http://www.nongnu.org/man-db/
24 BuildRequires:  gdbm-devel
25 BuildRequires:  gettext-tools >= 0.18.3
26 BuildRequires:  groff
27 BuildRequires:  less
28 BuildRequires:  libpipeline-devel >= 1.5.0
29 BuildRequires:  libseccomp-devel
30 BuildRequires:  pkgconfig
31 BuildRequires:  po4a >= 0.41
32 BuildRequires:  tar >= 1:1.22
33 BuildRequires:  xz
34 BuildRequires:  zlib-devel
35 Requires:       coreutils
36 Requires:       cronjobs
37 Requires:       grep
38 Requires:       groff
39 Requires:       gzip
40 Requires:       less
41 Requires:       libpipeline >= 1.5.0
42 Suggests:       zstd
43 Provides:       man-pages-reader = %{version}
44 Obsoletes:      man < 1.7
45 Obsoletes:      man-config
46 Obsoletes:      man-whatis
47 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48
49 %define         pkgcachedir     /var/cache/man
50
51 %description
52 The man-db package includes five tools for browsing man-pages: man,
53 whatis, apropos, manpath and lexgrog:
54 - man preformats and displays manual pages.
55 - whatis searches the manual page names.
56 - apropos searches the manual page names and descriptions.
57 - manpath determines search path for manual pages.
58 - lexgrog directly reads header information in manual pages.
59
60 %description -l pl.UTF-8
61 Pakiet man-db zawiera pięć narzędzi do przeglądania stron podręcznika
62 man (nazywanych man-pages): man, whatis, apropos, manpath i lexgrog:
63 - man wstępnie formatuje i wyświetla strony podręcznika.
64 - whatis przeszukuje nazwy stron podręcznika.
65 - apropos przeszukuje nazwy stron podręcznika oraz opisy.
66 - manpath określa ścieżkę przeszukiwania dla stron podręcznika.
67 - lexgrog bezpośrednio odczytuje informacje z nagłówka stron
68   podręcznika.
69
70 %prep
71 %setup -q
72 %patch0 -p1
73 %patch1 -p1
74
75 %build
76 %configure \
77         --disable-cache-owner \
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         --with-zstd=/usr/bin/zstd
84
85 %{__make} \
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%{pkgcachedir}
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 cat <<EOF > $RPM_BUILD_ROOT%{systemdtmpfilesdir}/man-db.conf
113 d %{pkgcachedir} 2755 root root 1w
114 EOF
115
116 %find_lang %{name}
117 %find_lang %{name}-gnulib
118 cat %{name}-gnulib.lang >> %{name}.lang
119
120 %clean
121 rm -rf $RPM_BUILD_ROOT
122
123 %files -f %{name}.lang
124 %defattr(644,root,root,755)
125 %doc README man-db-manual.txt man-db-manual.ps docs/COPYING ChangeLog NEWS
126 %config(noreplace) %{_sysconfdir}/man_db.conf
127 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/man-db
128 %attr(750,root,root) /etc/cron.daily/man-db.cron
129 %attr(755,root,root) %{_sbindir}/accessdb
130 %attr(755,root,root) %{_bindir}/apropos
131 %attr(755,root,root) %{_bindir}/catman
132 %attr(755,root,root) %{_bindir}/lexgrog
133 %attr(755,root,root) %{_bindir}/man
134 %attr(755,root,root) %{_bindir}/man-recode
135 %attr(755,root,root) %{_bindir}/mandb
136 %attr(755,root,root) %{_bindir}/manpath
137 %attr(755,root,root) %{_bindir}/whatis
138 %dir %{_libdir}/man-db
139 %attr(755,root,root) %{_libdir}/man-db/*.so
140 %if "%{_libexecdir}" != "%{_libdir}"
141 %dir %{_libexecdir}/man-db
142 %endif
143 %attr(755,root,root) %{_libexecdir}/man-db/zsoelim
144 %{_libexecdir}/man-db/globbing
145 %{_libexecdir}/man-db/manconv
146 %{systemdunitdir}/man-db.service
147 # TODO: as cron.daily replacement
148 #%{systemdunitdir}/man-db.timer
149 %{systemdtmpfilesdir}/man-db.conf
150 %dir %{pkgcachedir}
151 # documentation and translation
152 %{_mandir}/man1/apropos.1*
153 %{_mandir}/man1/lexgrog.1*
154 %{_mandir}/man1/man.1*
155 %{_mandir}/man1/man-recode.1*
156 %{_mandir}/man1/manconv.1*
157 %{_mandir}/man1/manpath.1*
158 %{_mandir}/man1/whatis.1*
159 %{_mandir}/man1/zsoelim.1*
160 %{_mandir}/man5/manpath.5*
161 %{_mandir}/man8/accessdb.8*
162 %{_mandir}/man8/catman.8*
163 %{_mandir}/man8/mandb.8*
164 %lang(da) %{_mandir}/da/man*/*
165 %lang(de) %{_mandir}/de/man*/*
166 %lang(es) %{_mandir}/es/man*/*
167 %lang(fr) %{_mandir}/fr/man*/*
168 %lang(id) %{_mandir}/id/man*/*
169 %lang(it) %{_mandir}/it/man*/*
170 %lang(ja) %{_mandir}/ja/man*/*
171 %lang(nl) %{_mandir}/nl/man*/*
172 %lang(pl) %{_mandir}/pl/man*/*
173 %lang(pt) %{_mandir}/pt/man*/*
174 %lang(pt_BR) %{_mandir}/pt_BR/man*/*
175 %lang(ru) %{_mandir}/ru/man*/*
176 %lang(sr) %{_mandir}/sr/man*/*
177 %lang(sv) %{_mandir}/sv/man*/*
178 %lang(tr) %{_mandir}/tr/man*/*
179 %lang(zh_CN) %{_mandir}/zh_CN/man*/*
This page took 0.209402 seconds and 3 git commands to generate.