man-db/man-db.spec

189 lines
5.2 KiB
RPMSpec
Raw Permalink Normal View History

%define usecache 0
%define cache /var/cache/man
%define man_uid 21
%define man_gid 21
Name: man-db
Version: 2.7.4
Release: 1mamba
Summary: A set of documentation tools: man, apropos and whatis
Group: System/Tools
Vendor: openmamba
Distribution: openmamba
Packager: Davide Madrisan <davide.madrisan@gmail.com>
URL: http://www.nongnu.org/man-db/
Source: http://download.savannah.gnu.org/releases/man-db/man-db-%{version}.tar.xz
License: GPL
Obsoletes: man
Provides: man
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libgdbm-devel
BuildRequires: libpipeline-devel
BuildRequires: libz-devel
## AUTOBUILDREQ-END
Requires: groff
Requires: less
Requires: gzip
Requires: bzip2
Requires: xz
Requires: ncompress
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
The man package includes three tools for finding information and/or documentation about your Linux system.
%prep
%setup -q
%build
%configure \
--with-device=latin1 \
--enable-mb-groff \
--with-bzip2=bzip2 \
--with-compress=compress \
--with-gzip=gzip \
--with-lzma=xz \
--with-sections='1 1p 2 3 3p 4 4x 5 6 7 8 9 m n 0p'
# --with-browser=
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall
install -d %{buildroot}%{cache}/{local,X11R6}
for i in 1 2 3 4 5 6 7 8 9 n; do
install -d %{buildroot}%{cache}/cat$i
install -d %{buildroot}%{cache}/local/cat$i
install -d %{buildroot}%{cache}/X11R6/cat$i
done
%find_lang %{name}
%find_lang man-db-gnulib
cat man-db-gnulib.lang >> %{name}.lang
rm -f %{buildroot}%{_docdir}/man-db/man-db-manual.*
rm -f %{buildroot}%{_bindir}/zsoelim
rm -f %{buildroot}%{_mandir}/man1/zsoelim.*
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%pre
/usr/sbin/groupadd -g %{man_gid} man 2>/dev/null || :
/usr/sbin/useradd -u %{man_uid} -g %{man_gid} -s /bin/false -r -d %{cache} \
-c "man cache" man >/dev/null 2>&1 || :
%preun
if [ $1 -eq 0 ]; then
rm -f %{cache}/cat[123456789n]/* 2>/dev/null
rm -f %{cache}/local/cat[123456789n]/* 2>/dev/null
rm -f %{cache}/X11R6/cat[123456789n]/* 2>/dev/null
rm -f %{cache}/whatis 2>/dev/null
/usr/sbin/groupdel man 2>/dev/null
/usr/sbin/userdel man 2>/dev/null
fi
exit 0
%post
if [ $1 -ge 1 ]; then
%tmpfiles_create %{name}
fi
:
%files -f %{name}.lang
%defattr(-,root,root)
%{_sysconfdir}/man_db.conf
%if %{usecache}
%attr(2755,root,man) %{_bindir}/man
%else
%attr(0755,root,root) %{_bindir}/man
%endif
%{_bindir}/apropos
%{_bindir}/catman
%{_bindir}/lexgrog
%{_bindir}/mandb
%{_bindir}/manpath
%{_bindir}/whatis
%{_sbindir}/accessdb
%{_prefix}/lib/tmpfiles.d/man-db.conf
%{_libdir}/man-db/libman*
%dir %{_libexecdir}/man-db
%{_libexecdir}/man-db/globbing
%{_libexecdir}/man-db/manconv
%{_libexecdir}/man-db/zsoelim
%{_mandir}/man1/apropos.*
%{_mandir}/man1/lexgrog.*
%{_mandir}/man1/man.*
%{_mandir}/man1/manconv.*
%{_mandir}/man1/manpath.*
%{_mandir}/man1/whatis.*
%{_mandir}/man5/manpath.*
%{_mandir}/man8/accessdb.*
%{_mandir}/man8/catman.*
%{_mandir}/man8/mandb.*
%lang(es) %{_mandir}/es/man?/*
%lang(it) %{_mandir}/it/man?/*
#%ifarch %{ix86}
## FIXME: not present in x86_64 and arm
#%lang(da) %{_mandir}/da/man?/*
#%lang(de) %{_mandir}/de/man?/*
#%lang(fr) %{_mandir}/fr/man?/*
#%lang(id) %{_mandir}/id/man?/*
#%lang(ja) %{_mandir}/ja/man?/*
#%lang(nl) %{_mandir}/nl/man?/*
#%lang(pl) %{_mandir}/pl/man?/*
#%lang(ru) %{_mandir}/ru/man?/*
#%lang(zh_CN) %{_mandir}/zh_CN/man?/*
#%endif
#%doc ChangeLog NEWS README
%changelog
* Wed Oct 14 2015 Automatic Build System <autodist@mambasoft.it> 2.7.4-1mamba
- automatic version update by autodist
* Tue Sep 15 2015 Automatic Build System <autodist@mambasoft.it> 2.7.3-1mamba
- automatic version update by autodist
* Fri Aug 21 2015 Automatic Build System <autodist@mambasoft.it> 2.7.2-1mamba
- automatic version update by autodist
* Tue Nov 25 2014 Automatic Build System <autodist@mambasoft.it> 2.7.1-1mamba
- automatic version update by autodist
* Thu Oct 16 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 2.6.7.1-2mamba
- add user man required by systemd tmpfiles.d file
* Tue Apr 15 2014 Automatic Build System <autodist@mambasoft.it> 2.6.7.1-1mamba
- automatic version update by autodist
* Sun Feb 02 2014 Automatic Build System <autodist@mambasoft.it> 2.6.6-1mamba
- automatic version update by autodist
* Sun Jun 30 2013 Automatic Build System <autodist@mambasoft.it> 2.6.5-1mamba
- automatic version update by autodist
* Tue Jun 25 2013 Automatic Build System <autodist@mambasoft.it> 2.6.4-1mamba
- automatic version update by autodist
* Thu Oct 18 2012 Automatic Build System <autodist@mambasoft.it> 2.6.3-1mamba
- update to 2.6.3
* Thu Aug 09 2012 Automatic Build System <autodist@mambasoft.it> 2.6.2-1mamba
- automatic version update by autodist
* Sun Feb 26 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 2.6.1-1mamba
- update to 2.6.1
- added requirement for less, gzip, bzip2, xz, ncompress
* Wed Feb 09 2011 Automatic Build System <autodist@mambasoft.it> 2.5.9-1mamba
- automatic update by autodist
* Thu May 13 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 2.5.7-2mamba
- added requirement for groff
* Tue Feb 23 2010 Davide Madrisan <davide.madrisan@gmail.com> 2.5.7-1mamba
- package created by autospec