2006-12-19 00:17:06 +01:00
|
|
|
#
|
2011-12-01 16:53:15 +01:00
|
|
|
# spec file for package man
|
2006-12-19 00:17:06 +01:00
|
|
|
#
|
2017-02-16 11:01:07 +01:00
|
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
2006-12-19 00:17:06 +01:00
|
|
|
#
|
2008-08-16 01:03:11 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2006-12-19 00:17:06 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2012-05-29 15:44:30 +02:00
|
|
|
|
2016-12-16 10:45:04 +01:00
|
|
|
%bcond_with wrapman
|
|
|
|
|
2006-12-19 00:17:06 +01:00
|
|
|
Name: man
|
2011-12-01 16:53:15 +01:00
|
|
|
BuildRequires: automake
|
|
|
|
BuildRequires: flex
|
|
|
|
BuildRequires: gdbm-devel
|
2011-12-26 07:56:26 +01:00
|
|
|
BuildRequires: gettext-runtime
|
|
|
|
BuildRequires: gettext-tools
|
|
|
|
BuildRequires: groff
|
2011-12-01 16:53:15 +01:00
|
|
|
BuildRequires: less
|
|
|
|
BuildRequires: libbz2-devel
|
2012-10-02 19:06:04 +02:00
|
|
|
BuildRequires: libpipeline-devel
|
2011-12-01 16:53:15 +01:00
|
|
|
BuildRequires: libzio-devel
|
2012-10-02 19:06:04 +02:00
|
|
|
BuildRequires: pkg-config
|
|
|
|
BuildRequires: po4a
|
|
|
|
BuildRequires: xz-devel
|
2011-12-01 16:53:15 +01:00
|
|
|
BuildRequires: zlib-devel
|
2016-12-16 10:45:04 +01:00
|
|
|
Version: 2.7.6
|
2011-12-01 16:53:15 +01:00
|
|
|
Release: 0
|
2006-12-19 00:17:06 +01:00
|
|
|
Summary: A Program for Displaying man Pages
|
2011-12-01 16:53:15 +01:00
|
|
|
License: GPL-2.0+
|
2006-12-19 00:17:06 +01:00
|
|
|
Group: System/Base
|
2011-12-26 07:56:26 +01:00
|
|
|
Url: https://savannah.nongnu.org/projects/man-db
|
2008-04-23 01:42:57 +02:00
|
|
|
PreReq: coreutils fillup
|
2006-12-19 00:17:06 +01:00
|
|
|
Provides: man_db
|
2016-12-16 10:45:04 +01:00
|
|
|
Requires: cron
|
2012-05-29 15:44:30 +02:00
|
|
|
Requires: glibc-locale
|
2013-06-17 11:24:32 +02:00
|
|
|
%if 0%{suse_version} > 1300
|
2013-09-13 15:52:22 +02:00
|
|
|
Recommends: groff-full
|
2013-06-17 11:24:32 +02:00
|
|
|
%endif
|
2013-09-13 15:52:22 +02:00
|
|
|
Requires: groff >= 1.18
|
2012-05-29 15:44:30 +02:00
|
|
|
Requires: less
|
2017-03-06 11:24:48 +01:00
|
|
|
Requires(pre): user(man)
|
|
|
|
Requires(pre): group(man)
|
2015-05-28 16:07:13 +02:00
|
|
|
Source: http://download.savannah.gnu.org/releases/man-db/man-db-%{version}.tar.xz
|
2006-12-19 00:17:06 +01:00
|
|
|
Source1: sysconfig.cron-man
|
|
|
|
Source2: cron.daily.do_mandb
|
|
|
|
Source3: cron.daily.clean_catman
|
2007-12-12 18:16:54 +01:00
|
|
|
Source4: mancoding
|
2012-10-02 19:06:04 +02:00
|
|
|
Source5: wrapper.c
|
2016-12-16 10:45:04 +01:00
|
|
|
Source6: man-rpmlintrc
|
|
|
|
Patch0: man-db-2.7.6.dif
|
2012-10-04 11:18:44 +02:00
|
|
|
Patch1: man-db-2.6.3-man0.dif
|
2006-12-19 00:17:06 +01:00
|
|
|
Patch2: man-db-2.3.19deb4.0-groff.dif
|
2012-10-02 19:06:04 +02:00
|
|
|
Patch4: man-db-2.6.3-section.dif
|
2015-05-28 15:24:43 +02:00
|
|
|
Patch5: man-db-2.7.1-security4.dif
|
|
|
|
Patch6: man-db-2.7.1-firefox.dif
|
2012-10-02 19:06:04 +02:00
|
|
|
Patch7: man-db-2.6.3-chinese.dif
|
2015-05-28 15:24:43 +02:00
|
|
|
Patch9: man-db-2.7.1-zio.dif
|
2012-10-02 19:06:04 +02:00
|
|
|
Patch10: man-db-2.6.3-listall.dif
|
2014-07-31 10:35:13 +02:00
|
|
|
# PATCH-FIX-SUSE Fixes the documentation for bnc#786679
|
|
|
|
Patch11: man-MAN_POSIXLY_CORRECT-man1.dif
|
2016-03-21 16:49:33 +01:00
|
|
|
# PATCH-FIX-SUSE Fixes build-compare bnc#971922
|
|
|
|
Patch12: reproducible.patch
|
2006-12-19 00:17:06 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2007-12-12 18:16:54 +01:00
|
|
|
%global _sysconfdir /etc
|
2015-05-29 12:35:30 +02:00
|
|
|
%global _has_tmpfiled %(rpm -q -f /usr/lib/tmpfiles.d | grep -c filesystem)
|
2006-12-19 00:17:06 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
A program for displaying man pages on the screen or sending them to a
|
|
|
|
printer (using groff).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
G. Wilford <G.Wilford@ee.surrey.ac.uk>
|
2008-04-23 01:42:57 +02:00
|
|
|
Fabrizio Polacco <fpolacco@debian.org>
|
|
|
|
Colin Watson <cjwatson@debian.org>
|
2006-12-19 00:17:06 +01:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -n man-db-%{version}
|
|
|
|
%patch2 -p0 -b .groff
|
|
|
|
%patch4 -p0 -b .sect
|
2007-12-12 18:16:54 +01:00
|
|
|
%patch5 -p0 -b .secu4
|
|
|
|
%patch6 -p0 -b .firefox
|
|
|
|
%patch7 -p0 -b .chinese
|
|
|
|
%patch9 -p0 -b .zio
|
2008-06-22 02:12:16 +02:00
|
|
|
%patch10 -p0 -b .listall
|
2016-12-16 10:45:04 +01:00
|
|
|
%patch11 -p0 -b .p11
|
|
|
|
%patch12 -p1 -b .p12
|
2012-10-09 17:33:35 +02:00
|
|
|
%patch0 -p0 -b .0
|
2006-12-19 00:17:06 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
gettextize --force --copy --no-changelog
|
2008-05-16 14:43:35 +02:00
|
|
|
SEC=(0 1 n l 8 3 2 5 4 9 6 7
|
|
|
|
1x 3x 4x 5x 6x 8x
|
|
|
|
1bind 3bind 5bind 7bind 8bind
|
|
|
|
1cn 8cn
|
|
|
|
1m 1mh 5mh 8mh
|
|
|
|
1netpbm 3netpbm 5netpbm
|
|
|
|
0p 1p 3p 3posix
|
|
|
|
1pgsql 3pgsql 5pgsql
|
|
|
|
3C++ 8C++
|
|
|
|
3blt
|
|
|
|
3curses 3ncurses 3form 3menu
|
|
|
|
3db 3gdbm 3f 3gk 3paper
|
|
|
|
3mm 5mm
|
|
|
|
3perl 3pm 3pq
|
|
|
|
3qt 3pub 3readline
|
|
|
|
1ssl 3ssl 5ssl 7ssl
|
|
|
|
3t 3tk 3tcl 3tclx 3tix
|
|
|
|
7l 7nr
|
|
|
|
8c
|
|
|
|
Cg g s m)
|
|
|
|
SEC="${SEC[@]}"
|
2008-04-23 01:42:57 +02:00
|
|
|
rm -f configure
|
2015-05-28 15:24:43 +02:00
|
|
|
%global optflags %{optflags} -funroll-loops -pipe -Wall
|
|
|
|
if grep -q _DEFAULT_SOURCE /usr/include/features.h ; then
|
2017-02-16 11:19:13 +01:00
|
|
|
CFLAGS="%{optflags} -D_GNU_SOURCE -D_DEFAULT_SOURCE"
|
2015-05-28 15:24:43 +02:00
|
|
|
else
|
|
|
|
CFLAGS="%{optflags} -D_GNU_SOURCE -D_SVID_SOURCE"
|
|
|
|
fi
|
2007-12-12 18:16:54 +01:00
|
|
|
LDFLAGS=
|
|
|
|
LIBS=
|
2012-10-02 19:06:04 +02:00
|
|
|
LINGUAS=
|
|
|
|
for d in $(cat man/LINGUAS*) ; do
|
|
|
|
test -d %{_datadir}/locale/$d || continue
|
|
|
|
LINGUAS="${LINGUAS:+$LINGUAS }$d"
|
|
|
|
done
|
|
|
|
export CFLAGS LDFLAGS LIBS LINGUAS
|
|
|
|
aclocal -I ${PWD} -I ${PWD}/m4 -I ${PWD}/gnulib/m4
|
|
|
|
autoconf -B ${PWD} -B ${PWD}/m4 -B ${PWD}/gnulib/m4
|
2012-05-29 15:44:30 +02:00
|
|
|
automake --add-missing
|
2012-10-04 10:09:29 +02:00
|
|
|
find -name 'Makefile.*' | xargs \
|
|
|
|
sed -ri -e '/^pkglibdir/{ s@^(pkglibdir[[:blank:]]+=[[:blank:]]+\$\(libdir\)).*@\1@p }'
|
2012-10-02 19:06:04 +02:00
|
|
|
%configure \
|
|
|
|
--enable-dups \
|
2016-12-16 10:45:04 +01:00
|
|
|
--enable-cache-owner=man \
|
2012-10-02 19:06:04 +02:00
|
|
|
--with-device=utf8 \
|
|
|
|
--with-zio \
|
|
|
|
--with-gnu-ld \
|
|
|
|
--disable-rpath \
|
|
|
|
--disable-automatic-create \
|
|
|
|
--enable-automatic-update \
|
|
|
|
--disable-cats \
|
|
|
|
--enable-threads=posix \
|
|
|
|
--enable-mb-groff \
|
|
|
|
--with-db=gdbm \
|
|
|
|
--enable-nls \
|
2007-12-12 18:16:54 +01:00
|
|
|
--with-config-file=%{_sysconfdir}/manpath.config \
|
2012-10-02 19:06:04 +02:00
|
|
|
--without-included-gettext \
|
2008-05-16 14:43:35 +02:00
|
|
|
--with-sections="${SEC}"
|
2010-07-20 20:51:41 +02:00
|
|
|
make %{?_smp_mflags} nls=all
|
2012-10-04 11:18:44 +02:00
|
|
|
for man in $(find man/ -type f -a -name '*.[0-9]'); do
|
2007-12-12 18:16:54 +01:00
|
|
|
pp="$(head -n 1 $man)"
|
|
|
|
case "$pp" in
|
|
|
|
\'\\\"*\ -\*-\ coding:\ *\ -\*-)
|
|
|
|
continue
|
|
|
|
;;
|
|
|
|
\'\\\"*)
|
|
|
|
sed -ri "1{ s/('\\\\\".*)/\\1 -\*- coding: UTF-8 -\*-/ }" $man
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
sed -ri "1 i\
|
|
|
|
'\\\\\" -\*- coding: UTF-8 -\*-\
|
|
|
|
" $man
|
|
|
|
esac
|
|
|
|
done
|
2012-10-04 11:18:44 +02:00
|
|
|
patch -p0 < %{P:1}
|
2012-10-02 19:06:04 +02:00
|
|
|
gcc $CFLAGS -I gnulib/lib/ -I include/ --include config.h --include configmake.h \
|
|
|
|
-o wrapper %{S:5} -L gnulib/lib/.libs/ -lgnu
|
2006-12-19 00:17:06 +01:00
|
|
|
|
2014-04-08 15:02:52 +02:00
|
|
|
%check
|
|
|
|
if ! make check; then
|
|
|
|
cat src/tests/test-suite.log
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2006-12-19 00:17:06 +01:00
|
|
|
%install
|
2008-04-23 01:42:57 +02:00
|
|
|
%if %suse_version <= 1030
|
|
|
|
export MKDIR_P="mkdir -p"
|
|
|
|
%endif
|
2012-10-02 19:06:04 +02:00
|
|
|
rm -rf %{buildroot}%{_localstatedir}/cache/man
|
|
|
|
mkdir -p %{buildroot}%{_datadir}/doc/packages/man
|
2017-02-16 11:01:07 +01:00
|
|
|
mkdir -p %{buildroot}%{_libexecdir}/man-db
|
2007-12-12 18:16:54 +01:00
|
|
|
mkdir -p %{buildroot}%{_bindir}
|
|
|
|
mkdir -p %{buildroot}/etc
|
|
|
|
make nls=all install DESTDIR=%{buildroot}
|
2012-10-04 10:09:29 +02:00
|
|
|
rm -vf %{buildroot}%{_libdir}/*.la
|
|
|
|
mv %{buildroot}%{_datadir}/doc/man-db/man-db-manual.* \
|
|
|
|
%{buildroot}%{_datadir}/doc/packages/man/
|
|
|
|
# wrapper which drops roots privileges if root executes man or mandb
|
2012-10-02 19:06:04 +02:00
|
|
|
if test -x %{buildroot}%{_bindir}/mandb ; then
|
2017-02-16 11:01:07 +01:00
|
|
|
mv %{buildroot}%{_bindir}/mandb %{buildroot}%{_libexecdir}/man-db/
|
2016-12-16 10:45:04 +01:00
|
|
|
install wrapper %{buildroot}%{_bindir}/mandb
|
2012-10-02 19:06:04 +02:00
|
|
|
fi
|
2016-12-16 10:45:04 +01:00
|
|
|
%if %{with wrapman}
|
2012-10-02 19:06:04 +02:00
|
|
|
if test -x %{buildroot}%{_bindir}/man ; then
|
2017-02-16 11:01:07 +01:00
|
|
|
mv %{buildroot}%{_bindir}/man %{buildroot}%{_libexecdir}/man-db/
|
2016-12-16 10:45:04 +01:00
|
|
|
ln -sf mandb %{buildroot}%{_bindir}/man
|
2007-12-12 18:16:54 +01:00
|
|
|
fi
|
2016-12-16 10:45:04 +01:00
|
|
|
%endif
|
2007-12-12 18:16:54 +01:00
|
|
|
mkdir -p %{buildroot}%{_mandir}
|
|
|
|
pushd %{buildroot}%{_mandir}/
|
|
|
|
rm -rf *.ascii/
|
|
|
|
for d in *.UTF-8 ; do
|
|
|
|
find -name '*.[1-9nlop]' | xargs gzip -9f
|
|
|
|
done
|
|
|
|
for d in `find -name manpath.5.gz -printf '%%h '` ; do
|
|
|
|
ln -sf manpath.5.gz $d/manpath.config.5.gz
|
|
|
|
done
|
2013-04-22 13:55:15 +02:00
|
|
|
|
|
|
|
# remove japanese pages, as they are in man-pages-ja
|
2013-04-22 14:14:58 +02:00
|
|
|
# (need to cross verify at some point that they are up to date there)
|
2013-04-22 14:01:10 +02:00
|
|
|
rm -rf ja
|
2013-04-22 13:55:15 +02:00
|
|
|
|
2007-12-12 18:16:54 +01:00
|
|
|
popd
|
|
|
|
install -m 644 src/man_db.conf %{buildroot}%{_sysconfdir}/manpath.config
|
|
|
|
sh ./mk_catdirs %{buildroot}
|
|
|
|
mkdir -p %{buildroot}%{_datadir}/groff/site-tmac
|
|
|
|
install -m 0644 groff/tmac.andb %{buildroot}%{_datadir}/groff/site-tmac/
|
|
|
|
install -m 0644 groff/tmac.andocdb %{buildroot}%{_datadir}/groff/site-tmac/
|
|
|
|
mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates
|
|
|
|
mkdir -p %{buildroot}/etc/cron.daily
|
|
|
|
install -m 0644 %{SOURCE1} %{buildroot}%{_localstatedir}/adm/fillup-templates
|
|
|
|
install -m 0744 %{SOURCE2} %{buildroot}/etc/cron.daily/suse-do_mandb
|
|
|
|
install -m 0744 %{SOURCE3} %{buildroot}/etc/cron.daily/suse-clean_catman
|
2009-09-22 23:28:57 +02:00
|
|
|
%find_lang man-db --all-name --with-man
|
2006-12-19 00:17:06 +01:00
|
|
|
|
|
|
|
%pre
|
|
|
|
test -d var/catman/ && rm -rf var/catman/ || true
|
|
|
|
|
|
|
|
%post
|
2015-05-28 15:24:43 +02:00
|
|
|
%{?tmpfiles_create:%tmpfiles_create %{_libexecdir}/tmpfiles.d/man-db.conf}
|
2006-12-19 00:17:06 +01:00
|
|
|
%{fillup_only -an cron}
|
2016-12-16 10:45:04 +01:00
|
|
|
/sbin/ldconfig
|
|
|
|
|
|
|
|
%postun -p /sbin/ldconfig
|
2006-12-19 00:17:06 +01:00
|
|
|
|
2015-05-28 15:24:43 +02:00
|
|
|
%posttrans
|
|
|
|
mandb --quiet --create
|
|
|
|
|
2007-07-27 01:58:55 +02:00
|
|
|
%files -f man-db.lang
|
2007-02-09 16:58:14 +01:00
|
|
|
%defattr(-,root,root)
|
2012-10-01 16:10:43 +02:00
|
|
|
%doc docs/COPYING
|
2012-10-02 19:06:04 +02:00
|
|
|
%doc ChangeLog
|
|
|
|
%doc %{_datadir}/doc/packages/man/man-db-manual.*
|
2006-12-19 00:17:06 +01:00
|
|
|
%config /etc/manpath.config
|
|
|
|
%attr(0744,root,root) /etc/cron.daily/suse-clean_catman
|
|
|
|
%attr(0744,root,root) /etc/cron.daily/suse-do_mandb
|
2007-12-12 18:16:54 +01:00
|
|
|
%{_bindir}/apropos
|
|
|
|
%{_bindir}/catman
|
|
|
|
%{_bindir}/lexgrog
|
2015-05-28 15:24:43 +02:00
|
|
|
%{_bindir}/man
|
|
|
|
%{_bindir}/mandb
|
2007-12-12 18:16:54 +01:00
|
|
|
%{_bindir}/manpath
|
|
|
|
%{_bindir}/whatis
|
2015-05-28 15:24:43 +02:00
|
|
|
%dir %attr(0755,root,root) %{_libexecdir}/man-db
|
2016-12-16 10:45:04 +01:00
|
|
|
%if %{with wrapman}
|
2015-05-28 15:24:43 +02:00
|
|
|
%attr(0755,root,root) %{_libexecdir}/man-db/man
|
2016-12-16 10:45:04 +01:00
|
|
|
%endif
|
2015-05-28 15:24:43 +02:00
|
|
|
%attr(0755,root,root) %{_libexecdir}/man-db/mandb
|
|
|
|
%attr(0755,man,man) %{_libexecdir}/man-db/manconv
|
|
|
|
%attr(0755,man,man) %{_libexecdir}/man-db/globbing
|
2007-12-12 18:16:54 +01:00
|
|
|
%{_sbindir}/accessdb
|
2012-10-02 19:06:04 +02:00
|
|
|
%{_libdir}/libman*.so
|
2015-05-28 15:24:43 +02:00
|
|
|
%{_libexecdir}/man-db/zsoelim
|
2015-05-29 12:35:30 +02:00
|
|
|
%if 0%{?_has_tmpfiled} == 0
|
|
|
|
%dir %{_libexecdir}/tmpfiles.d
|
|
|
|
%endif
|
2015-05-28 15:24:43 +02:00
|
|
|
%{_libexecdir}/tmpfiles.d/man-db.conf
|
2013-06-17 12:33:17 +02:00
|
|
|
%dir %{_datadir}/groff/site-tmac
|
2007-12-12 18:16:54 +01:00
|
|
|
%{_datadir}/groff/site-tmac/tmac.andb
|
|
|
|
%{_datadir}/groff/site-tmac/tmac.andocdb
|
2006-12-19 00:17:06 +01:00
|
|
|
%doc %{_mandir}/man1/*.1.gz
|
|
|
|
%doc %{_mandir}/man5/*.5.gz
|
|
|
|
%doc %{_mandir}/man8/*.8.gz
|
2012-10-02 19:06:04 +02:00
|
|
|
%dir %{_mandir}/id
|
2007-12-12 18:16:54 +01:00
|
|
|
%{_localstatedir}/adm/fillup-templates/sysconfig.cron-man
|
2016-12-16 10:45:04 +01:00
|
|
|
%defattr(-,man,man)
|
|
|
|
%ghost %{_localstatedir}/cache/man/*
|
2007-12-12 18:16:54 +01:00
|
|
|
|
2007-03-21 16:06:16 +01:00
|
|
|
%changelog
|