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 +++++++++++++++++++++++++++++++++++++++++++++++ cerberus/cerberus.install | 20 +++++++++++++++ cerberus/upload | 1 + 3 files changed, 84 insertions(+) create mode 100644 cerberus/PKGBUILD create mode 100644 cerberus/cerberus.install create mode 120000 cerberus/upload (limited to 'cerberus') 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" +} + diff --git a/cerberus/cerberus.install b/cerberus/cerberus.install new file mode 100644 index 0000000..ee62b29 --- /dev/null +++ b/cerberus/cerberus.install @@ -0,0 +1,20 @@ +_file="cerberus" + +infodir="usr/share/info" +file="${_file}.info" + + +post_install() { + [[ -x "usr/bin/install-info" ]] || return 0 + install-info -- "${infodir}/${file}" "${infodir}/dir" 2> /dev/null +} + +post_upgrade() { + post_install "$1" +} + +pre_remove() { + [[ -x "usr/bin/install-info" ]] || return 0 + install-info --delete -- "${infodir}/${file}" "${infodir}/dir" 2> /dev/null +} + diff --git a/cerberus/upload b/cerberus/upload new file mode 120000 index 0000000..1e7a8be --- /dev/null +++ b/cerberus/upload @@ -0,0 +1 @@ +../upload \ No newline at end of file -- cgit v1.2.3-70-g09d2