Sisyphus repository
Last update: 18 november 2019 | SRPMs: 17519 | Visits: 15797891
en ru br
ALT Linux repos
S:2.9.0-alt2

Group :: System/Base
RPM: man-db

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Summary: Tools for searching and reading man pages
Name: man-db
Version: 2.9.0
Release: alt1
# GPLv2+ .. man-db
# GPLv3+ .. gnulib
License: GPLv2+ and GPLv3+
Group: System/Base
URL: http://www.nongnu.org/man-db/

Packager: Alexey Gladkov <legion at altlinux.ru>

Source0: %name-%version.tar
Source1: man-db.crondaily
Source2: man-db.sysconfig
Source3: man-db.filetrigger

Patch0: man-db-2.8.5-change-owner-of-man-cache.patch

# http://lists.nongnu.org/archive/html/man-db-devel/2017-01/msg00013.html

Patch1: man-db-2.7.6.1-fix-override-dir-handling.patch

Patch2: man-db-2.7.6.1-e2k-mcst-path.patch

Obsoletes: man < 2.0
Obsoletes: man-whatis < 2.0
Provides: man-whatis = %version

Provides: man = %version
Provides: man-pages-reader = %version

# previous versions of the package contain the files: apropos.1, man.1, whatis.1

Conflicts: man-pages-ru-extra < 0.1-alt5

Requires: coreutils, grep, groff-base, gzip, less

BuildRequires: gnu-config
BuildRequires: gdbm-devel
BuildRequires: gettext
BuildRequires: groff-base groff-ps
BuildRequires: less
BuildRequires: libpipeline-devel
BuildRequires: zlib-devel
BuildRequires: flex
BuildRequires: po4a
BuildRequires: perl
BuildRequires: xz

%description
The man-db package includes five tools for browsing man-pages:
man, whatis, apropos, manpath and lexgrog. man formats and displays
manual pages. whatis searches the manual page names. apropos searches the
manual page names and descriptions. manpath determines search path
for manual pages. lexgrog directly reads header information in
manual pages.

%package cron
Summary: Periodic update of man-db cache
Group: System/Base

Requires: %name = %version-%release
Requires: crontabs

BuildArch: noarch

%description cron
This package provides periodic update of man-db cache.

%global cache /var/cache/man
%define _unpackaged_files_terminate_build 1

%prep
%setup

%patch0 -p1
%patch1 -p1
%ifarch %e2k
%patch2 -p1
%endif

%build
%autoreconf -f

%configure \
   --with-systemdtmpfilesdir=%_tmpfilesdir \
   --with-systemdsystemunitdir=no \
   --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" \
   --disable-setuid \
   --enable-cache-owner=root \
   --with-browser=elinks \
   --with-lzip=lzip \
   --with-xz=xz \
   --with-override-dir=overrides

%make CC="%__cc %optflags" %{?_smp_mflags} V=1

%check
%make check

%install
%make install \
INSTALL='install -p' \
DESTDIR=%buildroot \
prefix=%_prefix

# move the documentation to the relevant place

mv %buildroot%_datadir/doc/man-db/* ./

# remove zsoelim man page - part of groff package

rm %buildroot%_man1dir/zsoelim.1

# remove libtool archives

rm %buildroot%_libdir/man-db/*.la

# install cache directory

install -d -m 0755  %buildroot/%cache

# install cron script for man-db creation/update

mkdir -p %buildroot%_sysconfdir/cron.daily
install -D -p -m 0755 %SOURCE1 %buildroot%_sysconfdir/cron.daily/man-db.cron

# config for cron script

mkdir -p %buildroot%_sysconfdir/sysconfig
install -D -p -m 0644 %SOURCE2 %buildroot%_sysconfdir/sysconfig/man-db

# install filetrigger

mkdir -p %buildroot%_rpmlibdir
install -D -p -m 0755 %SOURCE3 %buildroot%_rpmlibdir/man-db.filetrigger

(
   cd %buildroot
   find .%_datadir/man -mindepth 1 -maxdepth 1 ! -name 'man*' -printf '%%%%lang(%%f) %%p/man*/*\n' |
       sed -e 's, \./, /,'
) > %name.files

%find_lang %name
%find_lang %name-gnulib

cat %name.lang %name-gnulib.lang >> %name.files

# clear the old cache

%post
%__rm -rf -- %cache/*

%files -f %name.files
%doc README NEWS docs/COPYING
%config(noreplace) %_sysconfdir/man_db.conf
%config(noreplace) %_tmpfilesdir/man-db.conf
%_sbindir/*
%_bindir/*
%_libdir/man-db
%_libexecdir/man-db
%_rpmlibdir/man-db.filetrigger
%attr(2755,root,man) %verify(not mtime) %dir %cache
%_man1dir/*.1*
%_man5dir/*.5*
%_man8dir/*.8*

%files cron
%config(noreplace) %_sysconfdir/cron.daily/man-db.cron
%config(noreplace) %_sysconfdir/sysconfig/man-db

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin