1 | %global cache /@unixroot/var/cache/man
|
---|
2 | %global gnulib_ver 20140202
|
---|
3 | %global use_cron 0
|
---|
4 | %global systemdtmpfilesdir /@unixroot/usr/lib/tmpfiles.d
|
---|
5 |
|
---|
6 | Summary: Tools for searching and reading man pages
|
---|
7 | Name: man-db
|
---|
8 | Version: 2.7.6.1
|
---|
9 | Release: 3%{?dist}
|
---|
10 | # GPLv2+ .. man-db
|
---|
11 | # GPLv3+ .. gnulib
|
---|
12 | License: GPLv2+ and GPLv3+
|
---|
13 | Group: System Environment/Base
|
---|
14 | URL: http://www.nongnu.org/man-db/
|
---|
15 |
|
---|
16 | Vendor: bww bitwise works GmbH
|
---|
17 | %scm_source github https://github.com/bitwiseworks/%{name}-os2 %{version}-os2-2
|
---|
18 | #scm_source git file://e:/Trees/man-db/git master-os2
|
---|
19 |
|
---|
20 | Obsoletes: man < 2.0
|
---|
21 | Provides: man = %{version}
|
---|
22 | Provides: man-pages-reader = %{version}
|
---|
23 | # FPC exception for gnulib - copylib - https://fedorahosted.org/fpc/ticket/174
|
---|
24 | #Provides: bundled(gnulib) = %{gnulib_ver}
|
---|
25 |
|
---|
26 | Requires: coreutils, grep, groff-base, gzip, less
|
---|
27 | Requires: libiconv-utils
|
---|
28 | BuildRequires: db4-devel, gettext, groff, less, libpipeline-devel, zlib-devel
|
---|
29 | #BuildRequires: gdbm-devel
|
---|
30 | BuildRequires: po4a, perl, perl-version
|
---|
31 | Requires: db4 >= 4.8.30-8
|
---|
32 |
|
---|
33 | %description
|
---|
34 | The man-db package includes five tools for browsing man-pages:
|
---|
35 | man, whatis, apropos, manpath and lexgrog. man formats and displays
|
---|
36 | manual pages. whatis searches the manual page names. apropos searches the
|
---|
37 | manual page names and descriptions. manpath determines search path
|
---|
38 | for manual pages. lexgrog directly reads header information in
|
---|
39 | manual pages.
|
---|
40 |
|
---|
41 | %if %{use_cron}
|
---|
42 | %package cron
|
---|
43 | Summary: Periodic update of man-db cache
|
---|
44 | Group: System Environment/Base
|
---|
45 |
|
---|
46 | Requires: %{name} = %{version}-%{release}
|
---|
47 | Requires: crontabs
|
---|
48 |
|
---|
49 | BuildArch: noarch
|
---|
50 |
|
---|
51 | %description cron
|
---|
52 | This package provides periodic update of man-db cache.
|
---|
53 | %endif
|
---|
54 |
|
---|
55 | %debug_package
|
---|
56 |
|
---|
57 | %prep
|
---|
58 | %scm_setup
|
---|
59 |
|
---|
60 | # create the changelog
|
---|
61 | # is is a bit a nasty hack, but it's needed for now.
|
---|
62 | # the date will probably not change, but better check makefile.am
|
---|
63 | # the srcdir needs to be adjusted to the current build env
|
---|
64 | %define gen_start_date 2013-12-09 00:52
|
---|
65 | %define srcdir e:/Trees/man-db/git
|
---|
66 | build-aux/gitlog-to-changelog --format='%s%n%n%b%n' \
|
---|
67 | --since="%{gen_start_date}" --srcdir=%{srcdir} > cl-t
|
---|
68 | rm -f ChangeLog
|
---|
69 | mv cl-t ChangeLog
|
---|
70 |
|
---|
71 | autoreconf -fvi
|
---|
72 |
|
---|
73 | %build
|
---|
74 | export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
|
---|
75 | export LIBS="-lcx"
|
---|
76 | export VENDOR="%{vendor}"
|
---|
77 |
|
---|
78 | %configure \
|
---|
79 | --with-systemdtmpfilesdir=%{systemdtmpfilesdir} \
|
---|
80 | --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" \
|
---|
81 | --disable-setuid --enable-cache-owner=root \
|
---|
82 | --with-browser=elinks --with-lzip=lzip \
|
---|
83 | --with-override-dir=overrides
|
---|
84 | make CC="%{__cc} %{optflags}" %{?_smp_mflags} V=1
|
---|
85 |
|
---|
86 | %check
|
---|
87 | #make check
|
---|
88 |
|
---|
89 | %install
|
---|
90 | make install DESTDIR=$RPM_BUILD_ROOT prefix=%{_prefix} INSTALL='install -p'
|
---|
91 |
|
---|
92 | # move the documentation to the relevant place
|
---|
93 | mv $RPM_BUILD_ROOT%{_datadir}/doc/man-db/* ./
|
---|
94 |
|
---|
95 | # remove zsoelim man page - part of groff package
|
---|
96 | rm $RPM_BUILD_ROOT%{_datadir}/man/man1/zsoelim.1
|
---|
97 |
|
---|
98 | # remove libtool archives
|
---|
99 | rm $RPM_BUILD_ROOT%{_libdir}/*.la
|
---|
100 | # remove archives
|
---|
101 | rm $RPM_BUILD_ROOT%{_libdir}/*.a
|
---|
102 |
|
---|
103 | # install cache directory
|
---|
104 | install -d -m 0755 $RPM_BUILD_ROOT/%{cache}
|
---|
105 |
|
---|
106 | %if %{use_cron}
|
---|
107 | # install cron script for man-db creation/update
|
---|
108 | mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily
|
---|
109 | install -D -p -m 0755 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/man-db.cron
|
---|
110 |
|
---|
111 | # config for cron script
|
---|
112 | mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
|
---|
113 | install -D -p -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/man-db
|
---|
114 | %endif
|
---|
115 |
|
---|
116 | # config for tmpfiles.d
|
---|
117 | #install -D -p -m 0644 init/systemd/man-db.conf $RPM_BUILD_ROOT%{systemdtmpfilesdir}/.
|
---|
118 | rm -rf $RPM_BUILD_ROOT%{systemdtmpfilesdir}
|
---|
119 |
|
---|
120 | # man-db-cache-update.service
|
---|
121 | #install -D -p -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_unitdir}/man-db-cache-update.service
|
---|
122 |
|
---|
123 | %find_lang %{name}
|
---|
124 | #find_lang %{name}-gnulib
|
---|
125 |
|
---|
126 | # stop and disable timer from previous builds
|
---|
127 | %pre
|
---|
128 | #if [ -e /usr/lib/systemd/system/mandb.timer ]; then
|
---|
129 | # if test -d /run/systemd; then
|
---|
130 | # systemctl stop man-db.timer
|
---|
131 | # systemctl -q disable man-db.timer
|
---|
132 | # fi
|
---|
133 | #fi
|
---|
134 |
|
---|
135 | # clear the old cache
|
---|
136 | %post
|
---|
137 | %{__rm} -rf %{cache}/*
|
---|
138 |
|
---|
139 | # update cache
|
---|
140 | %transfiletriggerin -- %{_mandir}
|
---|
141 | MAN_NO_LOCALE_WARNING=1 /@unixroot/usr/bin/mandb -q
|
---|
142 |
|
---|
143 | # update cache
|
---|
144 | %transfiletriggerpostun -- %{_mandir}
|
---|
145 | MAN_NO_LOCALE_WARNING=1 /@unixroot/usr/bin/mandb -q
|
---|
146 |
|
---|
147 | %files -f %{name}.lang
|
---|
148 | # -f %{name}-gnulib.lang
|
---|
149 | %{!?_licensedir:%global license %%doc}
|
---|
150 | %license docs/COPYING
|
---|
151 | %doc README man-db-manual.txt man-db-manual.ps ChangeLog NEWS
|
---|
152 | %config(noreplace) %{_sysconfdir}/man_db.conf
|
---|
153 | %if %{use_cron}
|
---|
154 | %config(noreplace) %{_sysconfdir}/sysconfig/man-db
|
---|
155 | %endif
|
---|
156 | #%config(noreplace) %{systemdtmpfilesdir}/man-db.conf
|
---|
157 | %{_sbindir}/accessdb.exe
|
---|
158 | %{_bindir}/man.exe
|
---|
159 | %{_bindir}/whatis.exe
|
---|
160 | %{_bindir}/apropos
|
---|
161 | %{_bindir}/manpath.exe
|
---|
162 | %{_bindir}/lexgrog.exe
|
---|
163 | %{_bindir}/catman.exe
|
---|
164 | %{_bindir}/mandb.exe
|
---|
165 | %{_libdir}/*.dll
|
---|
166 | %dir %{_libexecdir}/man-db
|
---|
167 | %{_libexecdir}/man-db/globbing.exe
|
---|
168 | %{_libexecdir}/man-db/manconv.exe
|
---|
169 | %{_libexecdir}/man-db/zsoelim.exe
|
---|
170 | %attr(2755,root,man) %verify(not mtime) %dir %{cache}
|
---|
171 | # documentation and translation
|
---|
172 | %{_mandir}/man1/apropos.1*
|
---|
173 | %{_mandir}/man1/lexgrog.1*
|
---|
174 | %{_mandir}/man1/man.1*
|
---|
175 | %{_mandir}/man1/manconv.1*
|
---|
176 | %{_mandir}/man1/manpath.1*
|
---|
177 | %{_mandir}/man1/whatis.1*
|
---|
178 | %{_mandir}/man5/manpath.5*
|
---|
179 | %{_mandir}/man8/accessdb.8*
|
---|
180 | %{_mandir}/man8/catman.8*
|
---|
181 | %{_mandir}/man8/mandb.8*
|
---|
182 | %lang(da) %{_datadir}/man/da/man*/*
|
---|
183 | %lang(de) %{_datadir}/man/de/man*/*
|
---|
184 | %lang(es) %{_datadir}/man/es/man*/*
|
---|
185 | %lang(fr) %{_datadir}/man/fr/man*/*
|
---|
186 | %lang(id) %{_datadir}/man/id/man*/*
|
---|
187 | %lang(it) %{_datadir}/man/it/man*/*
|
---|
188 | %lang(ja) %{_datadir}/man/ja/man*/*
|
---|
189 | %lang(nl) %{_datadir}/man/nl/man*/*
|
---|
190 | %lang(pl) %{_datadir}/man/pl/man*/*
|
---|
191 | %lang(ru) %{_datadir}/man/ru/man*/*
|
---|
192 | %lang(sv) %{_datadir}/man/sv/man*/*
|
---|
193 | %lang(zh_CN) %{_datadir}/man/zh_CN/man*/*
|
---|
194 |
|
---|
195 | %changelog
|
---|
196 | * Wed Dec 05 2018 Silvan Scherrer <silvan.scherrer@aroa.ch> - 2.7.6.1-3
|
---|
197 | - add a require for at least db4 4.8.30-8 (ticket #322)
|
---|
198 |
|
---|
199 | * Mon Nov 19 2018 Silvan Scherrer <silvan.scherrer@aroa.ch> - 2.7.6.1-2
|
---|
200 | - fix a crlf issue
|
---|
201 |
|
---|
202 | * Mon Nov 12 2018 Silvan Scherrer <silvan.scherrer@aroa.ch> - 2.7.6.1-1
|
---|
203 | - Initial version
|
---|