new package: update-info-dir

This commit is contained in:
Tee KOBAYASHI 2022-05-08 15:39:43 +09:00 committed by xtkoba
parent 34917c823d
commit 63917944c1
3 changed files with 82 additions and 0 deletions

View File

@ -0,0 +1,36 @@
TERMUX_PKG_HOMEPAGE=https://packages.debian.org/sid/texinfo
TERMUX_PKG_DESCRIPTION="Update or create index file from all installed info files in directory"
TERMUX_PKG_LICENSE="GPL-2.0, GPL-3.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=6.8-4
TERMUX_PKG_SRCURL=https://deb.debian.org/debian/pool/main/t/texinfo/texinfo_${TERMUX_PKG_VERSION}.debian.tar.xz
TERMUX_PKG_SHA256=1194b3f1a9480f1796fdf92fb366b02d855a17f8873ec5daa4b6befe51d69f57
TERMUX_PKG_PLATFORM_INDEPENDENT=true
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_make_install() {
install -Dm700 -t $TERMUX_PREFIX/bin update-info-dir
install -Dm600 -t $TERMUX_PREFIX/share/man/man8 update-info-dir.8
}
termux_step_create_debscripts() {
local INFODIR=$TERMUX_PREFIX/share/info
cat <<- EOF > ./triggers
interest-noawait $INFODIR
EOF
cat <<- EOF > ./postinst
#!$TERMUX_PREFIX/bin/sh
if [ -d $INFODIR ]; then
$TERMUX_PREFIX/bin/update-info-dir
fi
exit 0
EOF
cat <<- EOF > ./prerm
#!$TERMUX_PREFIX/bin/sh
rm -rf $INFODIR/dir
exit 0
EOF
}

View File

@ -0,0 +1,11 @@
--- a/update-info-dir.8
+++ b/update-info-dir.8
@@ -13,7 +13,7 @@
Update, or create, the index file
.I dir
of available documentation in
-/usr/share/info/ (the default) or in given DIRECTORY. The
+@TERMUX_PREFIX@/share/info/ (the default) or in given DIRECTORY. The
index file
.I info
is the directory is usually presented by info browsers on startup.

View File

@ -0,0 +1,35 @@
--- a/update-info-dir
+++ b/update-info-dir
@@ -4,7 +4,7 @@
# Copyright 2009, 2014 Norbert Preining
# GPLv2
-INFODIR=/usr/share/info
+INFODIR=@TERMUX_PREFIX@/share/info
set -e
@@ -14,13 +14,7 @@
# the dir file. Unset LANGUAGE and reload /etc/environment to get
# the system wide settings. See bug #536476
unset LANGUAGE
-unset LANG
-if [ -r /etc/environment ] ; then
- . /etc/environment
-fi
-if [ -r /etc/default/locale ] ; then
- . /etc/default/locale
-fi
+export LANG=C.UTF-8
Help ()
{
@@ -28,7 +22,7 @@
SYNOPSIS: update-info-dir [-h,--help] [info-directory]
(re-)creates the index of available documentation in info format
-(the file /usr/share/info/dir) which is usually presented by info browsers
+(the file @TERMUX_PREFIX@/share/info/dir) which is usually presented by info browsers
on startup."
exit 0