The Asciidoc package is a text document format for writing notes, documentation, articles, books, ebooks, slideshows, web pages, man pages and blogs. AsciiDoc files can be translated to many formats including HTML, PDF, EPUB, and man page.
Create the PKGBUILD for the Asciidoc package with the following commands:
mkdir /sources/asciidoc
cd /sources/asciidoc
cat > PKGBUILD << "REALEOF"
# Maintainer: Linux From Scratch <lfs-dev@lists.linuxfromscratch.org>
pkgname="asciidoc"
pkgver="10.2.1"
pkgrel="1"
pkgdesc="Text document format for short documents, articles, books and UNIX man pages"
arch=('any')
url="https://github.com/asciidoc/"
license=('GPL3')
groups=('core')
depends=('docbook-xsl-nons'
'libxslt'
'python')
makedepends=('bash'
'binutils'
'coreutils'
'gcc'
'make')
optdepends=('fop'
'libxslt'
'lynx')
source=('https://files.pythonhosted.org/packages/source/a/asciidoc/asciidoc-10.2.1.tar.gz')
md5sums=('460824075b51381a4b5f478c60a18165')
build(){
cd "${pkgname}-${pkgver}"
pip3 wheel -w dist --no-build-isolation --no-deps --no-cache-dir $PWD
}
package(){
cd "${pkgname}-${pkgver}"
pip3 install --root "${pkgdir} --no-index --find-links dist --no-user asciidoc
}
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 asciidoc-10.2.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/asciidoc-10.2.1-1-$(uname -m).pkg.tar.xz
Update the local cache and install the Asciidoc package:
pacman -Syu pacman -S asciidoc --overwrite \* -dd --noconfirm
Finally, copy the source files into the source repository and clean up the build directory:
mkdir /srv/pacman/source/LFS/asciidoc cp PKGBUILD /srv/pacman/source/LFS/asciidoc cd /sources rm -rf asciidoc