SPECS/man-db/man-db.spec
cdd26197
 Summary:        Programs for finding and viewing man pages
 Name:           man-db
1e8be658
 Version:        2.8.4
 Release:        1%{?dist}
cdd26197
 License:        GPLv2+
 URL:            http://www.nongnu.org/man-db
 Group:          Applications/System
 Vendor:         VMware, Inc.
 Distribution:   Photon
 Source0:        %{name}-%{version}.tar.xz
1e8be658
 %define sha1    man-db=729096a35fec13df8b7b350fdc1b323f990b6144
cdd26197
 Requires:       libpipeline
 Requires:       gdbm
 Requires:       xz
 Requires:       groff
7f9d2e12
 Requires(pre):  /usr/sbin/useradd /usr/sbin/groupadd
 Requires(postun):/usr/sbin/userdel /usr/sbin/groupdel
 %if %{with_check}
 BuildRequires:  shadow
 %endif
a0737f28
 BuildRequires:  libpipeline-devel
cdd26197
 BuildRequires:  gdbm-devel
 BuildRequires:  xz
 BuildRequires:  groff
242c40f5
 
f4d17450
 %description
 The Man-DB package contains programs for finding and viewing man pages.
242c40f5
 
f4d17450
 %prep
1e8be658
 %setup -qn %{name}-%{version}
f4d17450
 %build
1e8be658
 %configure \
cdd26197
     --docdir=%{_defaultdocdir}/%{name}-%{version} \
     --disable-setuid \
     --with-browser=%{_bindir}/lynx \
     --with-vgrind=%{_bindir}/vgrind \
     --with-grap=%{_bindir}/grap \
     --disable-silent-rules
242c40f5
 
f4d17450
 make %{?_smp_mflags}
242c40f5
 
f4d17450
 %install
 make DESTDIR=%{buildroot} install
 find %{buildroot}%{_libdir} -name '*.la' -delete
5258b786
 %find_lang %{name} --all-name
2a807a3e
 
f4d17450
 %check
f5d5b236
 getent group man >/dev/null || groupadd -r man
 getent passwd man >/dev/null || useradd -c "man" -d /var/cache/man -g man \
         -s /bin/false -M -r man
2a807a3e
 make %{?_smp_mflags} check
d45b7400
 
5a8b5eb5
 %pre
c489d50c
 getent group man >/dev/null || groupadd -r man
 getent passwd man >/dev/null || useradd -c "man" -d /var/cache/man -g man \
         -s /bin/false -M -r man
d45b7400
 
5a8b5eb5
 %post -p /sbin/ldconfig
 
d45b7400
 %postun
c489d50c
 if [ $1 -eq 0 ] ; then
cdd26197
     getent passwd man >/dev/null && userdel man
     getent group man >/dev/null && groupdel man
5a8b5eb5
 fi
c489d50c
 /sbin/ldconfig
5a8b5eb5
 
f4d17450
 %files -f %{name}.lang
 %defattr(-,root,root)
 %{_sysconfdir}/man_db.conf
 %{_bindir}/*
 %{_sbindir}/*
 %{_libexecdir}/man-db/*
 %{_libdir}/man-db/*
 %{_defaultdocdir}/%{name}-%{version}/*
 %{_mandir}/*/*
0bc3a918
 %{_libdir}/tmpfiles.d/man-db.conf
242c40f5
 
f4d17450
 %changelog
1e8be658
 *   Mon Oct 22 2018 Sujay G <gsujay@vmware.com> 2.8.4-1
 -   Bump man-db version to 2.8.4
7f9d2e12
 *   Mon Sep 18 2017 Alexey Makhalov <amakhalov@vmware.com> 2.7.6-4
 -   Remove shadow from requires and use explicit tools for post actions
f5d5b236
 *   Fri Aug 04 2017 Chang Lee <changlee@vmware.com> 2.7.6-3
 -   Setup a testing environment before %check
cdd26197
 *   Fri Jun 23 2017 Xiaolin Li <xiaolinl@vmware.com> 2.7.6-2
 -   Add gdbm-devel to BuildRequires
 *   Fri Mar 31 2017 Michelle Wang <michellew@vmware.com> 2.7.6-1
 -   Update package version
 *   Mon Oct 03 2016 ChangLee <changlee@vmware.com> 2.7.5-5
 -   Modified check
 *   Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 2.7.5-4
 -   GA - Bump release of all rpms
 *   Mon May 16 2016 Xiaolin Li <xiaolinl@vmware.com> 2.7.5-3
 -   Fix user man:man adding.
 *   Thu May 05 2016 Kumar Kaushik <kaushikk@vmware.com> 2.7.5-2
 -   Adding support for upgrade in pre/post/un scripts.
 *   Wed Feb 24 2016 Kumar Kaushik <kaushikk@vmware.com> 2.7.5-1
 -   Updated to new version.
 *   Tue Nov 10 2015 Xiaolin Li <xiaolinl@vmware.com> 2.6.6-2
 -   Handled locale files with macro find_lang
 *   Wed Nov 5 2014 Divya Thaluru <dthaluru@vmware.com> 2.6.6-1
 -   Initial build. First version