Files
BMLFS/build-scripts/gcr2.build
2025-09-07 11:55:12 -05:00

53 lines
1.8 KiB
Bash

#! /bin/bash
# Gcr2
# Source: https://download.gnome.org/sources/gcr/4.4/gcr-4.4.0.1.tar.xz
# GIT: https://gitlab.gnome.org/GNOME/gcr
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: GLib, libgcrypt, p11-kit
# Recommended: GnuPG, gobject-introspection, GTK+3, libxslt, Vala
# Optional: GTK-Doc, Valgrind
# If coptimizing:
export CFLAGS="-march=native -mtune=native -pipe "
export CFLAGS+="-O3 -Os -fdata-sections -ffat-lto-objects "
export CFLAGS+="-ffunction-sections -flto=4 -fno-semantic-interposition "
export LDFLAGS="-flto=4 -Wl,-O2 -Wl,--as-needed "
#CFLAGS="-D_GNU_SOURCE" \
meson setup --prefix=/usr -Dssh_agent=false -Dgtk_doc=false OUT &&
read -p "Compile?" && ninja -C OUT -j2 &&
sudo -S DESTDIR=$BUILD ninja -C OUT install &&
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------------------------------------------------------|
gcr2: gcr2 (crypto library and ui for gnome-keyring)
gcr2:
gcr2: GCR is a library for displaying certificates and crypto UI accessing
gcr2: key stores. It also provides the viewer for crypto files on the GNOME
gcr2: desktop.
gcr2:
gcr2: GCK is a library for accessing PKCS#11 modules like smart cards, in a
gcr2: (G)object oriented way.
gcr2:
gcr2:
gcr2:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/gcr2-$PVER-$PSUFFIX &&
sudo -S rm -rf ${BUILD}/*