From c372b8f33ff3c69adb63bf0e1bbb2868248222b9 Mon Sep 17 00:00:00 2001 From: EnumDev Date: Sun, 23 Nov 2025 10:13:57 +0200 Subject: [PATCH] Switch to new download format, update dependencies and source.sh script --- pkg.info | 23 ++++++++++++++++++++--- source.sh | 27 ++++----------------------- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/pkg.info b/pkg.info index 5db298b..0433f99 100644 --- a/pkg.info +++ b/pkg.info @@ -1,10 +1,27 @@ name: pam description: Pluggable Authentication Modules for Linux version: 1.7.1 +revision: 2 url: https://github.com/linux-pam/linux-pam license: GPL2-or-later architecture: any -depends: ["glibc","elogind","libnsl","libtirpc","libxcrypt","docbook-xsl-nons"] -make_depends: ["flex","libxslt","meson"] -keep: ["etc/environment"] type: source +keep: + - etc/environment +depends: + - glibc + - libelogind + - libnsl + - libtirpc + - libxcrypt + - docbook-xsl-nons +make_depends: + - elogind + - flex + - libxslt + - meson +downloads: + - url: https://github.com/linux-pam/linux-pam/releases/download/v${BPM_PKG_VERSION}/Linux-PAM-${BPM_PKG_VERSION}.tar.xz + extract_to: ${BPM_SOURCE} + extract_strip_components: 1 + checksum: 21dbcec6e01dd578f14789eac9024a18941e6f2702a05cf91b28c232eeb26ab0 diff --git a/source.sh b/source.sh index 5875361..d895242 100644 --- a/source.sh +++ b/source.sh @@ -2,42 +2,23 @@ # BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE # BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT -DOWNLOAD="https://github.com/linux-pam/linux-pam/releases/download/v${BPM_PKG_VERSION}/Linux-PAM-${BPM_PKG_VERSION}.tar.xz" -FILENAME="${DOWNLOAD##*/}" - -# The prepare function is executed in the root of the temp directory -# This function is used for downloading files and putting them into the correct location -prepare() { - wget "$DOWNLOAD" - tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE" -} - # The build function is executed in the source directory # This function is used to compile the source code build() { - mkdir build - cd build - - meson setup --prefix=/usr \ - --buildtype=release \ - -Ddocdir=/usr/share/doc/Linux-PAM .. - meson compile + meson setup --prefix=/usr build + meson compile -C build } # The check function is executed in the source directory # This function is used to run tests to verify the package has been compiled correctly check() { - cd build - - meson test + meson test -C build --print-errorlogs } # The package function is executed in the source directory # This function is used to move the compiled files into the output directory package() { - cd build - - meson install --destdir="$BPM_OUTPUT" + meson install -C build --destdir="$BPM_OUTPUT" # Set uid for unix_chkpwd chmod +s "$BPM_OUTPUT"/usr/sbin/unix_chkpwd