From 29fa855cdb2b02cb989fdd942382f2c404efbc29 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 25 Sep 2024 22:40:07 +0200 Subject: add packages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- cerberus/PKGBUILD | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 cerberus/PKGBUILD (limited to 'cerberus/PKGBUILD') diff --git a/cerberus/PKGBUILD b/cerberus/PKGBUILD new file mode 100644 index 0000000..9c6a6eb --- /dev/null +++ b/cerberus/PKGBUILD @@ -0,0 +1,63 @@ +# Maintainer: Mattias Andrée <`base64 -d`(bWF0dGlhcy5hbmRyZWU)@protonmail.com> + +pkgname=cerberus +pkgver=1598672167 +pkgrel=1 +pkgdesc="A compile-time configurable minimal login program that uses libpassphrase" +url="https://github.com/GNU-Pony/cerberus" +arch=(i686 x86_64) +license=(GPL3) +depends=(glibc 'libpassphrase>=1400850322' linux) +makedepends=(make coreutils gcc texinfo) # pam +install=cerberus.install +source=("${url}/archive/${pkgver}.tar.gz") +sha256sums=(bb547c467a5735d048aa815e5466df4c8d6910b8f7b710fa18c77a86df0bb98c) + +# The dependency on `linux` can be removed if both `OWN_VCS` and `OWN_VCSA` is removed. +# The dependency on `pam` can removed if `auth` is change to not be `pam`. +# See `info cerberus configuring` for details on how to configure `cerberus`. +# Works on armv6h (tested on Raspberry Pi) unless `auth=pam`. + + +build() { + cd "${srcdir}/cerberus-${pkgver}" + + auth=crypt # can also be set to `crypt` or `none` # pam + cpp_defs=(OWN_VCS OWN_VCSA USE_TTY_GROUP) + path_user=/usr/local/bin:/usr/bin + path_root=/usr/local/sbin:/usr/local/bin:/usr/bin + + cpp_flags=() + for def in "${cpp_defs[@]}"; do + cpp_flags+=( -D"${def}" ) + done + cpp_flags="EXTRA_CPP_FLAGS=${cpp_flags[*]}" + + _conf=( AUTH="${auth}" PATH="${path_user}" PATH_ROOT="${path_root}" "${cpp_flags}" ) + + make clean + make PKGNAME="${pkgname}" INSTALL_BIN=/bin "${_conf[@]}" +} + +package() { + cd "${srcdir}/cerberus-${pkgver}" + + auth=crypt # can also be set to `crypt` or `none` # pam + cpp_defs=(OWN_VCS OWN_VCSA USE_TTY_GROUP) + path_user=/usr/local/bin:/usr/bin + path_root=/usr/local/sbin:/usr/local/bin:/usr/bin + + cpp_flags=() + for def in "${cpp_defs[@]}"; do + cpp_flags+=( -D"${def}" ) + done + cpp_flags="EXTRA_CPP_FLAGS=${cpp_flags[*]}" + + _conf=( AUTH="${auth}" PATH="${path_user}" PATH_ROOT="${path_root}" "${cpp_flags}" ) + + make PKGNAME="${pkgname}" INSTALL_BIN=/bin DESTDIR="${pkgdir}" "${_conf[@]}" install + + _dir="${pkgdir}/usr/share/licenses/${pkgname}" + ln -sf -- "/usr/share/licenses/common/GPL3" "${_dir}/LICENSE" +} + -- cgit v1.2.3-70-g09d2