From 1bd0cc78adb84796dc9c67f5d375c5932b3f21ed Mon Sep 17 00:00:00 2001 From: EnumDev Date: Sun, 11 May 2025 20:34:13 +0300 Subject: [PATCH] Update package version to 1.7.0 --- check-version.sh | 15 +++++++++++++++ pkg.info | 5 +++-- source.sh | 45 ++++++++++++++++++++++++++++++--------------- 3 files changed, 48 insertions(+), 17 deletions(-) create mode 100644 check-version.sh diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..4e1b3fb --- /dev/null +++ b/check-version.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Github repository +REPO="linux-pam/linux-pam" + +# Get tag name using Github Rest API +TAG_NAME=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/"$REPO"/releases/latest | jq -r '.tag_name') + +# Get version number from tag name +VERSION=$(echo "$TAG_NAME" | rev | cut -d'-' -f1 | rev) + +# Trim 'v' character in VERSION variable +VERSION=$(echo "$VERSION" | tr -d 'v') + +echo "$VERSION" diff --git a/pkg.info b/pkg.info index 50888bb..1a19ef1 100644 --- a/pkg.info +++ b/pkg.info @@ -1,8 +1,9 @@ name: pam description: Pluggable Authentication Modules for Linux -version: 1.6.0 -revision: 5 +version: 1.7.0 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"] type: source diff --git a/source.sh b/source.sh index 83bb10f..5875361 100644 --- a/source.sh +++ b/source.sh @@ -15,29 +15,44 @@ prepare() { # The build function is executed in the source directory # This function is used to compile the source code build() { - ./configure --prefix=/usr \ - --sbindir=/usr/sbin \ - --sysconfdir=/etc \ - --libdir=/usr/lib \ - --enable-securedir=/usr/lib/security \ - --docdir=/usr/share/doc/Linux-PAM - make + mkdir build + cd build + + meson setup --prefix=/usr \ + --buildtype=release \ + -Ddocdir=/usr/share/doc/Linux-PAM .. + meson compile +} + +# 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 } # The package function is executed in the source directory # This function is used to move the compiled files into the output directory package() { - make DESTDIR="$BPM_OUTPUT" install - chmod -v 4755 "$BPM_OUTPUT"/usr/sbin/unix_chkpwd - mkdir -p "$BPM_OUTPUT"/etc/pam.d/ - cp ../system-account "$BPM_OUTPUT"/etc/pam.d/system-account - cp ../system-auth "$BPM_OUTPUT"/etc/pam.d/system-auth - cp ../system-session "$BPM_OUTPUT"/etc/pam.d/system-session - cp ../system-password "$BPM_OUTPUT"/etc/pam.d/system-password - cp ../other "$BPM_OUTPUT"/etc/pam.d/other + cd build + + meson install --destdir="$BPM_OUTPUT" + + # Set uid for unix_chkpwd + chmod +s "$BPM_OUTPUT"/usr/sbin/unix_chkpwd + + # Install pam configuration files + install -d "$BPM_OUTPUT"/etc/pam.d/ + install -m644 "$BPM_WORKDIR"/system-account "$BPM_OUTPUT"/etc/pam.d/system-account + install -m644 "$BPM_WORKDIR"/system-auth "$BPM_OUTPUT"/etc/pam.d/system-auth + install -m644 "$BPM_WORKDIR"/system-session "$BPM_OUTPUT"/etc/pam.d/system-session + install -m644 "$BPM_WORKDIR"/system-password "$BPM_OUTPUT"/etc/pam.d/system-password + install -m644 "$BPM_WORKDIR"/other "$BPM_OUTPUT"/etc/pam.d/other # Remove systemd services rm -r "$BPM_OUTPUT"/usr/lib/systemd + # Install package license install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/pam/COPYING }