man-db: update to version 2.9.3
[git/cygwin-packages/man-db.git] / man-db.cygport
1 # -*- mode: sh; sh-shell: bash -*-
2 BUILD_REQUIRES=" flex groff libgdbm-devel libiconv-devel libpipeline-devel lzip po4a zstd"
3 NAME="man-db"
4 VERSION="2.9.3"
5 RELEASE="1"
6 CATEGORY="Base"
7 SUMMARY="Man page viewer"
8 DESCRIPTION="man-db is an implementation of the standard Unix documentation
9 system accessed using the man command. It uses a Berkeley DB database in place
10 of the traditional flat-text whatis databases."
11 HOMEPAGE="https://www.nongnu.org/man-db/"
12 SRC_URI="
13 mirror://savannah/man-db/${P}.tar.xz
14 mirror://savannah/man-db/${P}.tar.xz.asc
15 "
16 PATCH_URI="
17 ${P}-avoid-multiply-defined-symbols.patch
18 "
19
20 PKG_NAMES="${PN} ${PN}-create-index ${PN}-index-synchronously"
21 man_db_OBSOLETES="man"
22 man_db_REQUIRES="groff gzip less util-linux" # lynx
23 man_db_CONTENTS="
24 etc/defaults/
25 etc/postinstall/zp_${PN}-update-index.dash etc/postinstall/${PN}.sh etc/preremove/${PN}.sh
26 usr/bin/ usr/libexec/ usr/sbin/
27 usr/share/doc/ usr/share/locale/ usr/share/man/
28 var/cache/man/"
29 PKG_IGNORE="usr/lib/man-db/libman*"
30 man_db_create_index_SUMMARY="Create and maintain index of man pages"
31 man_db_create_index_REQUIRES="${PN}"
32 man_db_create_index_CONTENTS="
33 etc/postinstall/${PN}-create-index.dash
34 "
35 man_db_index_synchronously_SUMMARY="Maintain index of man pages synchronously"
36 man_db_index_synchronously_REQUIRES="${PN}-create-index"
37 man_db_index_synchronously_CONTENTS="
38 etc/postinstall/${PN}-index-synchronously.dash etc/preremove/${PN}-index-synchronously.dash
39 "
40
41 src_compile() {
42 cd ${S}
43 cygautoreconf
44 cd ${B}
45 cygconf \
46 "--with-sections=1 1p 8 2 3 3p 4 5 6 7 9 0p n" \
47 --disable-cache-owner \
48 --disable-setuid \
49 --with-browser=lynx \
50 --with-pager=less \
51 --with-db=gdbm
52 cygmake
53 }
54
55 src_test() {
56 cd ${B}
57 unset MANPATH
58 cygtest
59 }
60
61 src_install() {
62 cd ${B}
63 cyginstall
64 make_etc_defaults /etc/man_db.conf
65 keepdir /var/cache/man
66
67 dodir /etc/postinstall
68 cat > ${D}/etc/postinstall/zp_${PN}-update-index.dash <<_EOF
69 if [ -f /var/cache/man/index.db ] ; then
70 printf " ManDB index update starting...\n"
71 /usr/bin/nohup /usr/bin/mandb < /dev/null > /var/log/mandb-index.log 2>&1 &
72 [ -f /var/cache/man/.index-synchronously ] && wait \
73 && printf " ... ManDB index update complete.\n" \
74 || printf " ... ManDB index update continuing in background.\n"
75 else
76 printf " ManDB index not available.\n"
77 fi
78 _EOF
79 cat > ${D}/etc/postinstall/${PN}-create-index.dash <<_EOF
80 [ -f /var/cache/man/index.db ] || exec /usr/bin/touch /var/cache/man/index.db
81 _EOF
82 cat > ${D}/etc/postinstall/${PN}-index-synchronously.dash <<_EOF
83 exec /usr/bin/touch /var/cache/man/.index-synchronously
84 _EOF
85 cat > ${D}/etc/preremove/${PN}-index-synchronously.dash <<_EOF
86 exec /usr/bin/rm -f /var/cache/man/.index-synchronously
87 _EOF
88 }
This page took 0.041508 seconds and 5 git commands to generate.