Meson is an open source build system designed to be both extremely fast and as user friendly as possible.
Create the PKGBUILD for the Meson package with the following commands:
mkdir /sources/meson
cd /sources/meson
cat > PKGBUILD << "REALEOF"
# Maintainer: Linux From Scratch <lfs-dev@lists.linuxfromscratch.org>
pkgname="meson"
pkgver="1.7.0"
pkgrel="1"
pkgdesc="Meson is an open source build system meant to be both extremely fast and as user friendly as possible."
arch=('any')
url="https://mesonbuild.com"
license=('Apachev2')
groups=('core')
depends=('python'
'rootfs')
makedepends=('ninja')
source=('https://github.com/mesonbuild/meson/releases/download/1.7.0/meson-1.7.0.tar.gz')
md5sums=('c20f3e5ebbb007352d22f4fd6ceb925c')
build(){
cd ${pkgname}-${pkgver}
pip3 wheel -w dist --no-cache-dir --no-build-isolation --no-deps $PWD
}
package(){
cd ${pkgname}-${pkgver}
pip3 install --root "${pkgdir}" --no-index --find-links dist meson
install -vDm644 data/shell-completions/bash/meson ${pkgdir}/usr/share/bash-completion/completions/meson
install -vDm644 data/shell-completions/zsh/_meson ${pkgdir}/usr/share/zsh/site-functions/_meson
}
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 meson-1.7.0-1-any.pkg.tar.xz \
/srv/pacman/repos/LFS/
repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
/srv/pacman/repos/LFS/meson-1.7.0-1-any.pkg.tar.xz
Update the local cache and install the Meson package:
pacman -Syu pacman -S meson --overwrite \* -dd --noconfirm
Finally, copy the source files into the source repository and clean up the build directory:
mkdir /srv/pacman/source/LFS/meson cp PKGBUILD /srv/pacman/source/LFS/meson cd /sources rm -rf meson
The meaning of the install parameters:
-w
dist
Puts the created wheels into the dist directory.
--find-links
dist
Installs wheels from the dist
directory.