8.90.1. Installation of Man-DB
Create the PKGBUILD for the Man-DB package with the following
commands:
mkdir /sources/man-db
cd /sources/man-db
cat > PKGBUILD << "REALEOF"
# Maintainer: Linux From Scratch <lfs-dev@lists.linuxfromscratch.org>
pkgname="man-db"
pkgver="2.13.0"
pkgrel="1"
pkgdesc="The Man-DB package contains programs for finding and viewing man pages."
arch=('x86'
'x86_64')
url="https://www.nongnu.org/man-db/"
license=('GPLv2'
'LGPLv2.1')
groups=('core')
depends=('bash'
'gdbm'
'groff'
'glibc'
'gzip'
'less'
'libpipeline'
'zlib'
'rootfs')
makedepends=('binutils'
'bzip2'
'coreutils'
'flex'
'gcc'
'gettext'
'grep'
'make'
'pkgconf'
'sed'
'xz')
checkdepends=('util-linux')
optdepends=('libseccomp')
source=('https://download.savannah.gnu.org/releases/man-db/man-db-2.13.0.tar.xz')
md5sums=('97ab5f9f32914eef2062d867381d8cee')
build(){
cd "${pkgname}-${pkgver}"
./configure --prefix=/usr \
--docdir=/usr/share/doc/man-db-2.13.0 \
--sysconfdir=/etc \
--disable-setuid \
--enable-cache-owner=bin \
--with-browser=/usr/bin/lynx \
--with-vgrind=/usr/bin/vgrind \
--with-grap=/usr/bin/grap \
--with-systemdtmpfilesdir= \
--with-systemdsystemunitdir=
make
}
check(){
cd "${pkgname}-${pkgver}"
make check
}
package(){
cd "${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}" install
}
REALEOF
The meaning of the configure options:
-
--disable-setuid
-
This disables making the man program setuid to user
man.
-
--enable-cache-owner=bin
-
This changes ownership of the system-wide cache files to user
bin.
-
--with-...
-
These three parameters are used to set some default programs.
lynx is a
text-based web browser (see BLFS for installation
instructions), vgrind converts program
sources to Groff input, and grap is useful for
typesetting graphs in Groff documents. The vgrind and grap programs are not
normally needed for viewing manual pages. They are not part
of LFS or BLFS, but you should be able to install them
yourself after finishing LFS if you wish to do so.
-
--with-systemd...
-
These parameters prevent installing unneeded systemd
directories and files.
Prepare the build directory for the pacman user and build the
package:
chown -R root:pacman .
chmod 2775 .
chmod 664 PKGBUILD
su pacman -c 'makepkg -L --nodeps'
Add the newly created package to the central package repository:
cp man-db-2.13.0-1-$(uname -m).pkg.tar.xz \ /srv/pacman/repos/LFS/ repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \ /srv/pacman/repos/LFS/man-db-2.13.0-1-$(uname -m).pkg.tar.xz
Update the local cache and install the Man-DB package:
pacman -Syu
pacman -S man-db --overwrite \* -dd --noconfirm
Finally, copy the source files into the source repository and clean
up the build directory:
mkdir /srv/pacman/source/LFS/man-db
cp PKGBUILD /srv/pacman/source/LFS/man-db
cd /sources
rm -rf man-db
8.90.2. Non-English Manual Pages in LFS
The following table shows the character set that Man-DB assumes
manual pages installed under /usr/share/man/<ll> will be encoded with.
In addition to this, Man-DB correctly determines if manual pages
installed in that directory are UTF-8 encoded.
Table 8.1. Expected character encoding of
legacy 8-bit manual pages
|
Language (code)
|
Encoding
|
Language (code)
|
Encoding
|
|
Danish (da)
|
ISO-8859-1
|
Croatian (hr)
|
ISO-8859-2
|
|
German (de)
|
ISO-8859-1
|
Hungarian (hu)
|
ISO-8859-2
|
|
English (en)
|
ISO-8859-1
|
Japanese (ja)
|
EUC-JP
|
|
Spanish (es)
|
ISO-8859-1
|
Korean (ko)
|
EUC-KR
|
|
Estonian (et)
|
ISO-8859-1
|
Lithuanian (lt)
|
ISO-8859-13
|
|
Finnish (fi)
|
ISO-8859-1
|
Latvian (lv)
|
ISO-8859-13
|
|
French (fr)
|
ISO-8859-1
|
Macedonian (mk)
|
ISO-8859-5
|
|
Irish (ga)
|
ISO-8859-1
|
Polish (pl)
|
ISO-8859-2
|
|
Galician (gl)
|
ISO-8859-1
|
Romanian (ro)
|
ISO-8859-2
|
|
Indonesian (id)
|
ISO-8859-1
|
Greek (el)
|
ISO-8859-7
|
|
Icelandic (is)
|
ISO-8859-1
|
Slovak (sk)
|
ISO-8859-2
|
|
Italian (it)
|
ISO-8859-1
|
Slovenian (sl)
|
ISO-8859-2
|
|
Norwegian Bokmal (nb)
|
ISO-8859-1
|
Serbian Latin (sr@latin)
|
ISO-8859-2
|
|
Dutch (nl)
|
ISO-8859-1
|
Serbian (sr)
|
ISO-8859-5
|
|
Norwegian Nynorsk (nn)
|
ISO-8859-1
|
Turkish (tr)
|
ISO-8859-9
|
|
Norwegian (no)
|
ISO-8859-1
|
Ukrainian (uk)
|
KOI8-U
|
|
Portuguese (pt)
|
ISO-8859-1
|
Vietnamese (vi)
|
TCVN5712-1
|
|
Swedish (sv)
|
ISO-8859-1
|
Simplified Chinese (zh_CN)
|
GBK
|
|
Belarusian (be)
|
CP1251
|
Simplified Chinese, Singapore (zh_SG)
|
GBK
|
|
Bulgarian (bg)
|
CP1251
|
Traditional Chinese, Hong Kong (zh_HK)
|
BIG5HKSCS
|
|
Czech (cs)
|
ISO-8859-2
|
Traditional Chinese (zh_TW)
|
BIG5
|
Note
Manual pages in languages not in the list are not supported.