Files
BMLFS/build-scripts/libsecret.build
2024-08-18 15:00:55 -05:00

64 lines
2.1 KiB
Bash

#! /bin/bash
# libsecret
# Source: https://download.gnome.org/sources/libsecret/0.21/libsecret-0.21.4.tar.xz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: GLib
# Recommended: Gobjection-introspection, libgcrypt, vala
# Optional: GTK-Doc, docbook-xml, dockbook-xsl, libxslt, Valgrind
# If coptimizing with GCC:
export CFLAGS="-march=native -mtune=native -pipe "
export CFLAGS+="-O3 -ffat-lto-objects -flto=4 "
export LDFLAGS="-flto=4 -Wl,-O2 -Wl,--as-needed "
# Add flag if compiling with clang-17
CFLAGS="-Wno-incompatible-function-pointer-types" \
meson setup --prefix=/usr --buildtype=release -Dgtk_doc=false OUT &&
read -p "Compile?" && ninja -C OUT -j2 &&
sudo -S DESTDIR=$BUILD ninja -C OUT install &&
sudo -S mkdir -pv /BMAN/install && \
sudo -S mkdir -pv /BMAN/usr/share && \
sudo -S mv $BUILD/usr/share/man /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------------------------------------------------------|
libsecret: libsecret (library to access the Secret Service API)
libsecret:
libsecret: libsecret is a GObject based library for accessing the Secret Service
libsecret: API.
libsecret:
libsecret:
libsecret:
libsecret:
libsecret:
libsecret:
libsecret:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/libsecret-0.21.4-$PSUFFIX &&
cd /BMAN && \
cat > /tmp/slack-desc << "EOF"
libsecret-doc: Manuals for libsecret
libsecret-doc:
libsecret-doc: A GObject based library for accessing the Secret Service API.
libsecret-doc:
EOF
sudo -S mv -v /tmp/slack-desc install/ && \
sudo -S makepkg -l y -c n $PKGS/libsecret-doc-0.21.3-$NOPSUFFIX && \
sudo -S rm -rf ${BUILD}/* /BMAN/*