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