man-db: update to version 2.9.3
[git/cygwin-packages/man-db.git] / man-db.cygport
index 60e076bfb31ba36dcae5fb54bb092d68b1e0ae5b..d9e39dc915ca513540f1304732cf4a328c7e9e02 100644 (file)
@@ -1,27 +1,42 @@
+# -*- mode: sh; sh-shell: bash -*-
+BUILD_REQUIRES=" flex groff libgdbm-devel libiconv-devel libpipeline-devel lzip po4a zstd"
 NAME="man-db"
-VERSION=2.7.6.1
-RELEASE=1
+VERSION="2.9.3"
+RELEASE="1"
 CATEGORY="Base"
 SUMMARY="Man page viewer"
 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."
-HOMEPAGE="http://www.nongnu.org/man-db/"
-SRC_URI="mirror://savannah/man-db/man-db-${VERSION}.tar.xz"
+HOMEPAGE="https://www.nongnu.org/man-db/"
+SRC_URI="
+  mirror://savannah/man-db/${P}.tar.xz
+  mirror://savannah/man-db/${P}.tar.xz.asc
+"
 PATCH_URI="
-       2.7.4-shared-libmandb.patch
-       2.7.5-gnulib-cygwin25.patch
+  ${P}-avoid-multiply-defined-symbols.patch
 "
 
-PKG_NAMES=${NAME}
+PKG_NAMES="${PN} ${PN}-create-index ${PN}-index-synchronously"
 man_db_OBSOLETES="man"
-man_db_REQUIRES="groff gzip less libiconv util-linux" # lynx
-man_db_CONTENTS="etc/defaults/ etc/p* usr/bin/ usr/libexec/ usr/sbin/
-       usr/share/doc/ usr/share/locale/ usr/share/man/ var/cache/man/"
-PKG_IGNORE="usr/lib/man-db/libman* usr/lib/tmpfiles.d/"
-
-# Build dependencies only
-DEPEND="groff libgdbm-devel libpipeline-devel check po4a"
+man_db_REQUIRES="groff gzip less util-linux" # lynx
+man_db_CONTENTS="
+  etc/defaults/
+  etc/postinstall/zp_${PN}-update-index.dash etc/postinstall/${PN}.sh etc/preremove/${PN}.sh 
+  usr/bin/ usr/libexec/ usr/sbin/
+  usr/share/doc/ usr/share/locale/ usr/share/man/
+  var/cache/man/"
+PKG_IGNORE="usr/lib/man-db/libman*"
+man_db_create_index_SUMMARY="Create and maintain index of man pages"
+man_db_create_index_REQUIRES="${PN}"
+man_db_create_index_CONTENTS="
+  etc/postinstall/${PN}-create-index.dash
+"
+man_db_index_synchronously_SUMMARY="Maintain index of man pages synchronously"
+man_db_index_synchronously_REQUIRES="${PN}-create-index"
+man_db_index_synchronously_CONTENTS="
+  etc/postinstall/${PN}-index-synchronously.dash etc/preremove/${PN}-index-synchronously.dash
+"
 
 src_compile() {
        cd ${S}
@@ -50,10 +65,24 @@ src_install() {
        keepdir /var/cache/man
 
        dodir /etc/postinstall
-       cat > ${D}/etc/postinstall/zp_${NAME}.sh <<_EOF
-[ ! -s /var/cache/man/index.db ] || /usr/bin/mandb -pq
+       cat > ${D}/etc/postinstall/zp_${PN}-update-index.dash <<_EOF
+if [ -f /var/cache/man/index.db ] ; then
+    printf "  ManDB index update starting...\n"
+    /usr/bin/nohup /usr/bin/mandb < /dev/null > /var/log/mandb-index.log 2>&1 &
+    [ -f /var/cache/man/.index-synchronously ] && wait \
+      && printf "  ... ManDB index update complete.\n" \
+      || printf "  ... ManDB index update continuing in background.\n"
+else
+    printf "  ManDB index not available.\n"
+fi
+_EOF
+       cat > ${D}/etc/postinstall/${PN}-create-index.dash <<_EOF
+[ -f /var/cache/man/index.db ] || exec /usr/bin/touch /var/cache/man/index.db
+_EOF
+       cat > ${D}/etc/postinstall/${PN}-index-synchronously.dash <<_EOF
+exec /usr/bin/touch /var/cache/man/.index-synchronously
+_EOF
+       cat > ${D}/etc/preremove/${PN}-index-synchronously.dash <<_EOF
+exec /usr/bin/rm -f /var/cache/man/.index-synchronously
 _EOF
-
-       # In Fedora, zsoelim is in groff as a symlink to soelim(1)
-#      rm -f ${D}/usr/bin/zsoelim.exe ${D}/usr/share/man/man1/zsoelim.*
 }
This page took 0.038809 seconds and 5 git commands to generate.