Update package version to 1.7.0
This commit is contained in:
@@ -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"
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user