8.4. Man-pages-6.13

The Man-pages package contains over 2,400 man pages.

Approximate build time: 0.1 SBU
Required disk space: 52 MB

8.4.1. Installation of Man-pages

Prepare the PKGBUILD with the following commands:

mkdir /sources/man-pages
cd /sources/man-pages
cat > PKGBUILD << "REALEOF"
# Maintainer: Linux From Scratch <lfs-dev@lists.linuxfromscratch.org>

pkgname="man-pages"
pkgver="6.13"
pkgrel="1"
pkgdesc="The Man-pages package contains over 2,400 man pages."
arch=('any')
url="https://www.kernel.org/doc/man-pages/"
license=('BSD2C'
         'BSD3C'
         'BSD4C'
         'GPLv1'
         'GPLv2'
         'GPLv2+'
         'GPLv3+'
         'LGPLv3+Link'
         'LGPLv3+'
         'custom'
         'MIT') 
groups=('core')
depends=('rootfs')
makedepends=('bash'
             'coreutils'
             'make'
             'sed')
source=('https://www.kernel.org/pub/linux/docs/man-pages/man-pages-6.13.tar.xz')
md5sums=('5349329fef307e755933266b26eac873')

package(){
  cd "${pkgname}-${pkgver}"

  # Remove two man pages for password hashing functions - provided by libxcrypt
  rm -v man3/crypt*
  make DESTDIR="${pkgdir}" -R GIT=false prefix=/usr install
}
REALEOF

The meaning of the options:

-R

This prevents make from setting any built-in variables. The building system of man-pages does not work well with built-in variables, but currently there is no way to disable them except passing -R explicitly via the command line.

GIT=false

This prevents the building system from emitting many git: command not found warnings lines.

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-pages-6.13-1-any.pkg.tar.xz \
   /srv/pacman/repos/LFS/
repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
         /srv/pacman/repos/LFS/man-pages-6.13-1-any.pkg.tar.xz

Update the local cache and install the man-pages package:

pacman -Syu
pacman -S man-pages --overwrite \* -dd --noconfirm

Finally, copy the source files into the source repository and clean up the build directory:

mkdir /srv/pacman/source/LFS/man-pages
cp PKGBUILD /srv/pacman/source/LFS/man-pages
cd /sources
rm -rf man-pages

8.4.2. Contents of Man-pages

Installed files: various man pages

Short Descriptions

man pages

Describe C programming language functions, important device files, and significant configuration files