Files
BMLFS/build-scripts/cryptsetup.build
2025-07-05 18:57:47 -05:00

68 lines
2.5 KiB
Bash

#! /bin/bash
# cryptsetup
# Source: https://www.kernel.org/pub/linux/utils/cryptsetup/v2.8/cryptsetup-2.8.0.tar.xz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: JSON-C, LVM2, popt, libssh
# Recommended: argon2,
# Optional: libpwquality, Python2, passwdqc
# If coptimizing with GCC:
export CFLAGS="-march=native -pipe "
export CFLAGS+="-Ofast -falign-functions=32 -fno-lto "
export CFLAGS+="-fno-semantic-interposition -mprefer-vector-width=256 "
export CXXFLAGS=$CFLAGS
unset LDFLAGS
export PVER="2.8.0"
./configure --prefix=/usr --with-crypto_backend=openssl \
--enable-libargon2 --disable-ssh-token \
--disable-asciidoc $BUILDTRUPLE &&
read -p "Compile?" && make -j2 &&
sudo -S make DESTDIR=$BUILD install &&
sudo -S mkdir -pv /BMAN/install /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------------------------------------------------------|
cryptsetup: cryptsetup (utility for setting up encrypted filesystems)
cryptsetup:
cryptsetup: LUKS is a standard for cross-platform hard disk encryption.
cryptsetup: It provides secure management of multiple userpasswords and
cryptsetup: stores setup information in the partition header.
cryptsetup: LUKS for dm-crypt is now implemented in cryptsetup replacing the
cryptsetup: original cryptsetup. It provides all the functionally of the
cryptsetup: original version plus all LUKS features.
cryptsetup:
cryptsetup: cryptsetup home: http://luks.endorphin.org/dm-crypt
cryptsetup:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/cryptsetup-$PVER-$PSUFFIX && \
cd /BMAN && \
cat > /tmp/slack-desc << "EOF"
cryptsetup-doc: Manuals for cryptsetup
cryptsetup-doc:
cryptsetup-doc: A utility for setting up encrypted filesystems
cryptsetup-doc:
cryptsetup-doc: http://luks.endorphin.org/dm-crypt
cryptsetup-doc:
EOF
sudo -S mv -v /tmp/slack-desc install/ && \
sudo -S makepkg -l y -c n $PKGS/cryptsetup-doc-$PVER-$NOPSUFFIX && \
sudo -S rm -rf ${BUILD}/*