The Man-pages package contains over 2,400 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