Package init
This commit is contained in:
commit
99e32240e7
BIN
man-db-2.8.7.tar.xz
Normal file
BIN
man-db-2.8.7.tar.xz
Normal file
Binary file not shown.
14
man-db-cache-update.service
Normal file
14
man-db-cache-update.service
Normal file
@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
DefaultDependencies=no
|
||||
After=local-fs.target
|
||||
Before=reboot.target shutdown.target halt.target
|
||||
JobTimeoutSec=15min
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
TimeoutStartSec=infinity
|
||||
Environment=MAN_NO_LOCALE_WARNING=1
|
||||
EnvironmentFile=/etc/sysconfig/man-db
|
||||
ExecStart=/bin/sh -c '[ "$SERVICE" != "no" ] && /usr/bin/mandb $OPTS || true'
|
||||
Nice=19
|
||||
IOWeight=20
|
||||
27
man-db.crondaily
Normal file
27
man-db.crondaily
Normal file
@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -e /etc/sysconfig/man-db ]; then
|
||||
. /etc/sysconfig/man-db
|
||||
fi
|
||||
|
||||
if [ "$CRON" = "no" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
renice +19 -p $$ >/dev/null 2>&1
|
||||
ionice -c3 -p $$ >/dev/null 2>&1
|
||||
|
||||
LOCKFILE=/var/lock/man-db.lock
|
||||
|
||||
# the lockfile is not meant to be perfect, it's just in case the
|
||||
# two man-db cron scripts get run close to each other to keep
|
||||
# them from stepping on each other's toes. The worst that will
|
||||
# happen is that they will temporarily corrupt the database
|
||||
[[ -f $LOCKFILE ]] && exit 0
|
||||
|
||||
trap "{ rm -f $LOCKFILE ; exit 0; }" EXIT
|
||||
touch $LOCKFILE
|
||||
# create/update the mandb database
|
||||
mandb $OPTS
|
||||
|
||||
exit 0
|
||||
174
man-db.spec
Normal file
174
man-db.spec
Normal file
@ -0,0 +1,174 @@
|
||||
%global cache /var/cache/man
|
||||
|
||||
Name: man-db
|
||||
Version: 2.8.7
|
||||
Release: 3
|
||||
Summary: Online database for using man pages
|
||||
License: GPLv2+ and GPLv3+
|
||||
URL: http://www.nongnu.org/man-db/
|
||||
Source0: http://download.savannah.gnu.org/releases/%{name}/%{name}-%{version}.tar.xz
|
||||
Source1: man-db.crondaily
|
||||
Source2: man-db.sysconfig
|
||||
Source3: man-db-cache-update.service
|
||||
|
||||
BuildRequires: gcc systemd gdbm-devel gettext groff less libpipeline-devel zlib-devel
|
||||
BuildRequires: po4a perl-interpreter perl-version
|
||||
Requires: coreutils grep groff gzip less crontabs systemd
|
||||
|
||||
Provides: man = %{version} man-pages-reader = %{version} bundled(gnulib) = 20140202
|
||||
Obsoletes: man < 2.0
|
||||
Provides: man-db-cron
|
||||
Obsoletes: man-db-cron
|
||||
|
||||
%description
|
||||
man-db is an implementation of the standard Unix documentation system accessed using the man command.
|
||||
It uses a Berkeley DB database in place of the traditional flat-text whatis databases.
|
||||
|
||||
%package_help
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-%{version}
|
||||
|
||||
%build
|
||||
%configure \
|
||||
--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 --disable-cache-owner --with-browser=elinks --with-lzip=lzip
|
||||
%make_build
|
||||
|
||||
%check
|
||||
make check
|
||||
|
||||
%install
|
||||
%make_install
|
||||
|
||||
# move the documentation to the relevant place
|
||||
mv %{buildroot}%{_datadir}/doc/man-db/* ./
|
||||
|
||||
# install cache directory
|
||||
install -d -m 0755 %{buildroot}/var/cache/man
|
||||
|
||||
# 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
|
||||
|
||||
# config for tmpfiles.d
|
||||
install -D -p -m 0644 init/systemd/man-db.conf %{buildroot}/usr/lib/tmpfiles.d/.
|
||||
|
||||
# man-db-cache-update.service
|
||||
install -D -p -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}/man-db-cache-update.service
|
||||
|
||||
%find_lang %{name}
|
||||
%find_lang %{name}-gnulib
|
||||
|
||||
%pre
|
||||
|
||||
%preun
|
||||
|
||||
%post
|
||||
# clear the old cache
|
||||
%{__rm} -rf %{cache}/* || :
|
||||
|
||||
# update cache
|
||||
%transfiletriggerin -- %{_mandir}
|
||||
if [ -x /usr/bin/systemd-run -a -x /usr/bin/systemctl ]; then
|
||||
/usr/bin/systemd-run /usr/bin/systemctl start man-db-cache-update >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
# update cache
|
||||
%transfiletriggerpostun -- %{_mandir}
|
||||
if [ -x /usr/bin/systemd-run -a -x /usr/bin/systemctl ]; then
|
||||
/usr/bin/systemd-run /usr/bin/systemctl start man-db-cache-update >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%postun
|
||||
|
||||
%files -f %{name}.lang -f %{name}-gnulib.lang
|
||||
%{!?_licensedir:%global license %%doc}
|
||||
%license docs/COPYING
|
||||
%doc README man-db-manual.txt man-db-manual.ps ChangeLog NEWS
|
||||
%config(noreplace) %{_sysconfdir}/man_db.conf
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/man-db
|
||||
%config(noreplace) /usr/lib/tmpfiles.d/man-db.conf
|
||||
%config(noreplace) %{_sysconfdir}/cron.daily/man-db.cron
|
||||
%{_unitdir}/man-db-cache-update.service
|
||||
%{_sbindir}/accessdb
|
||||
%{_bindir}/man
|
||||
%{_bindir}/whatis
|
||||
%{_bindir}/apropos
|
||||
%{_bindir}/manpath
|
||||
%{_bindir}/lexgrog
|
||||
%{_bindir}/catman
|
||||
%{_bindir}/mandb
|
||||
%dir %{_libdir}/man-db
|
||||
%{_libdir}/man-db/*.so
|
||||
%dir %{_libexecdir}/man-db
|
||||
%{_libexecdir}/man-db/globbing
|
||||
%{_libexecdir}/man-db/manconv
|
||||
%{_libexecdir}/man-db/zsoelim
|
||||
/usr/lib/systemd/system/man-db.service
|
||||
/usr/lib/systemd/system/man-db.timer
|
||||
%verify(not mtime) %dir %{cache}
|
||||
%lang(da) %{_datadir}/man/da/man*/*
|
||||
%lang(de) %{_datadir}/man/de/man*/*
|
||||
%lang(es) %{_datadir}/man/es/man*/*
|
||||
%lang(fr) %{_datadir}/man/fr/man*/*
|
||||
%lang(id) %{_datadir}/man/id/man*/*
|
||||
%lang(it) %{_datadir}/man/it/man*/*
|
||||
%lang(ja) %{_datadir}/man/ja/man*/*
|
||||
%lang(nl) %{_datadir}/man/nl/man*/*
|
||||
%lang(pl) %{_datadir}/man/pl/man*/*
|
||||
%lang(pt_BR) %{_datadir}/man/pt_BR/man*/*
|
||||
%lang(ru) %{_datadir}/man/ru/man*/*
|
||||
%lang(sr) %{_datadir}/man/sr/man*/*
|
||||
%lang(sv) %{_datadir}/man/sv/man*/*
|
||||
%lang(tr) %{_datadir}/man/tr/man*/*
|
||||
%lang(zh_CN) %{_datadir}/man/zh_CN/man*/*
|
||||
%exclude %{_datadir}/man/man1/zsoelim.1.gz
|
||||
%exclude %{_libdir}/man-db/*.la
|
||||
|
||||
%files help
|
||||
%{_mandir}/man1/apropos.1*
|
||||
%{_mandir}/man1/lexgrog.1*
|
||||
%{_mandir}/man1/man.1*
|
||||
%{_mandir}/man1/manconv.1*
|
||||
%{_mandir}/man1/manpath.1*
|
||||
%{_mandir}/man1/whatis.1*
|
||||
%{_mandir}/man5/manpath.5*
|
||||
%{_mandir}/man8/accessdb.8*
|
||||
%{_mandir}/man8/catman.8*
|
||||
%{_mandir}/man8/mandb.8*
|
||||
%{_mandir}/pt/man1/*
|
||||
%{_mandir}/pt/man5/*
|
||||
%{_mandir}/pt/man8/*
|
||||
|
||||
%changelog
|
||||
* Tue Sep 24 2019 chengquan <chengquan3@huawei.com> - 2.8.7-3
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:revise requires of groff
|
||||
|
||||
* Fri Sep 20 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.8.7-2
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:fix error in POSTIN scriptlet
|
||||
|
||||
* Fri Sep 20 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.8.7-1
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:update software
|
||||
|
||||
* Thu Sep 19 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.8.4-3
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:add global marco
|
||||
|
||||
* Tue Sep 3 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.8.4-2
|
||||
- Package init
|
||||
10
man-db.sysconfig
Normal file
10
man-db.sysconfig
Normal file
@ -0,0 +1,10 @@
|
||||
# Set this to "no" to disable man-db update triggered by installation
|
||||
# of any package containing manual pages
|
||||
SERVICE="yes"
|
||||
|
||||
# Set this to "no" to disable daily man-db update run by
|
||||
# /etc/cron.daily/man-db.cron
|
||||
CRON="yes"
|
||||
|
||||
# Options used by mandb, we use "-q" as default, too much noise without it
|
||||
OPTS="-q"
|
||||
Loading…
x
Reference in New Issue
Block a user