Files
BMLFS/build-scripts/gpgme.build
2025-07-21 19:46:17 -05:00

85 lines
2.7 KiB
Bash

#! /bin/bash
# GPGME
# Source: https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-1.24.3.tar.bz2
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: libassuan
# Recommended: NONE
# Optional: Doxygen, Graphviz, GnuPG, Clisp, Python2, Qt5, SWIG
# Add qt if Qt5 is installed
#export BLANG="cl,cpp"
# If Python is 3.10+:
#sed -e 's/3\.9/3.10/' \
# -e 's/:3/:4/' \
# -e '23653 s/distutils"/setuptools"/' \
# -i configure && \
# Apply patch from Chimera Linux
patch -Np1 -i ../patches/gpgme-chimera/lfs64.patch
export PVER="1.24.3"
mkdir build && cd build &&
../configure --prefix=/usr --disable-gpg-test
# --enable-languages=$BLANG $BUILDTRUPLE &&
read -p "Compile?" && make -j2 &&
# If swig is installed:
if swig -version > /dev/null; then
srcdir=$PWD/../lang/python \
top_builddir=$PWD \
pip3 wheel -w dist --no-build-isolation --no-deps --no-cache-dir $PWD/lang/python
fi
sudo -S make DESTDIR=$BUILD install &&
# If swig is installed:
if swig -version > /dev/null; then
sudo -S pip3 install --no-index --find-links=dist --no-cache-dir \
--no-user gpg --root=$BUILD
fi
sudo -S mkdir -pv /BMAN/install /BMAN/usr/share && \
sudo -S mv $BUILD/usr/share/info /BMAN/usr/share/ && \
cd $BUILD && sudo -S mkdir -v ${BUILD}/install &&
cat > /tmp/slack-desc << "EOF"
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
gpgme: gpgme - GnuPG Made Easy
gpgme:
gpgme: GPGME (GnuPG Made Easy) is a C language library that allows to add
gpgme: support for cryptography to a program. It is designed to make access
gpgme: to public key crypto engines like GnuPG or GpgSM easier for
gpgme: applications. GPGME provides a high-level crypto API for encryption,
gpgme: decryption, signing, signature verification and key management.
gpgme:
gpgme:
gpgme:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/gpgme-$PVER-$PSUFFIX && \
cd /BMAN && \
cat > /tmp/slack-desc << "EOF"
gpgme-doc: Manuals for gpgme - GnuPG Made Easy
gpgme-doc:
gpgme-doc: A C language library that allows to add support for cryptography
gpgme-doc: to a program.
gpgme-doc:
EOF
sudo -S mv -v /tmp/slack-desc install/ && \
sudo -S makepkg -l y -c n $PKGS/gpgme-doc-$PVER-$NOPSUFFIX && \
sudo -S rm -rf ${BUILD}/* /BMAN/*