8.124.2. Contents of FakeRoot
Installed programs:
faked and fakeroot
Installed library:
libfakeroot.so
The FakeRoot package contains programs for simulating superuser privileges.
Create the PKGBUILD for the FakeRoot package with the following commands:
mkdir /sources/fakeroot
cd /sources/fakeroot
cat > PKGBUILD << "REALEOF"
# Maintainer: Linux From Scratch <lfs-dev@lists.linuxfromscratch.org>
pkgname="fakeroot"
pkgver="1.37.1"
pkgrel="1"
pkgdesc="The fakeroot package provides a tool for simulating superuser privileges."
arch=('x86'
'x86_64')
url="https://salsa.debian.org/clint/fakeroot/"
license=('GPL')
groups=('core')
depends=('bash'
'gcc'
'glibc'
'sed'
'util-linux')
makedepends=('autoconf'
'automake'
'm4'
'make'
'patch')
source=('https://salsa.debian.org/clint/fakeroot/-/archive/upstream/1.37.1/fakeroot-upstream-1.37.1.tar.bz2')
md5sums=('9e803523bea331398eb06b795fc55472')
prepare()
"cd ${pkgname}-upstream-${pkgver}"
autoreconf -fiv
}
build(){
"cd ${pkgname}-upstream-${pkgver}"
./configure --prefix=/usr \
--libdir=/usr/lib \
--disable-static \
--with-ipc=sysv
make
}
package(){
cd "${pkgname}-upstream-${pkgver}"
make DESTDIR=${pkgdir}" install
}
REALEOF
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 fakeroot-1.37.1-1-$(uname -m).pkg.tar.xz \
/srv/pacman/repos/LFS/
repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
/srv/pacman/repos/LFS/fakeroot-1.37.1-1-$(uname -m).pkg.tar.xz
Update the local cache and install the Fakeroot package:
pacman -Syu pacman -S fakeroot --overwrite \* -dd --noconfirm
Finally, copy the source files into the source repository and clean up the build directory:
mkdir /srv/pacman/source/LFS/fakeroot cp PKGBUILD /srv/pacman/source/LFS/fakeroot cd /sources rm -rf fakeroot