jobcore/pam-git/PKGBUILD
joborun 3cc41bec25 rebuild eudev pam
failed pam-git
upg pciutils wireless-regdb
2024-08-29 02:51:43 +03:00

102 lines
3.7 KiB
Bash

#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://git.disroot.org/joborun-pkg/jobcore/src/branch/main/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=pam
pkgver=1.6.1
pkgrel=03
pkgdesc="PAM (Pluggable Authentication Modules) library - w/o systemd"
url="http://linux-pam.org"
# Arch all of a sudden is enforcing 'libnsl' as a dependency for pam when it was not needed
# It creates problems for us so we choose to stay without it
#
makedepends=('flex' 'w3m' 'docbook-xml>=4.4' 'docbook-xsl')
#makedepends=('flex' 'w3m' 'docbook-xml>=4.4' 'docbook-xsl' 'git' 'libxslt' 'docbook5-xml' 'fop')
provides=('libpam.so' 'libpamc.so' 'libpam_misc.so')
backup=(etc/security/{access.conf,faillock.conf,group.conf,limits.conf,namespace.conf,namespace.init,pwhistory.conf,pam_env.conf,time.conf} etc/environment)
#source=(https://github.com/linux-pam/linux-pam/releases/download/v$pkgver/Linux-PAM-$pkgver{,-docs}.tar.xz{,.asc}
source=(pam::git+https://github.com/linux-pam/linux-pam?signed#tag=v${pkgver}
$pkgname.tmpfiles)
options=('!emptydirs')
prepare() {
cd $pkgname
./autogen.sh
# apply patch from the source array (should be a pacman feature)
local src
for src in "${source[@]}"; do
src="${src%%::*}"
src="${src##*/}"
[[ $src = *.patch ]] || continue
echo "Applying patch $src..."
patch -Np1 < "../$src"
done
}
build() {
cd $pkgname
# prevent the installation of an unneeded systemd file:
# sed -e /service_DATA/d \
# -i modules/pam_namespace/Makefile.am &&
# this is the same as proposed by LFS as removing it
# at the end with the post_-install statement at the
# end of the PKGBUILD
# also disabling systemd options here in ./config
# seems also acceptable
./configure \
--libdir=/usr/lib \
--sbindir=/usr/bin \
--disable-db \
--disable-logind \
--with-systemdunitdir=no \
--disable-systemd
make
}
package() {
depends=('glibc' 'libtirpc' 'pambase' 'audit' 'libaudit.so' 'libxcrypt' 'libcrypt.so') #
install -Dm 644 $pkgname.tmpfiles "$pkgdir"/usr/lib/tmpfiles.d/$pkgname.conf
cd $pkgname
make DESTDIR="$pkgdir" SCONFIGDIR=/etc/security install
# set unix_chkpwd uid
chmod +s "$pkgdir"/usr/bin/unix_chkpwd
# remove doc which is not used anymore
# FS #40749
# rm $pkgdir/usr/share/doc/Linux-PAM/sag-pam_userdb.html
# This is no longer required as it only builds with logind disabled, no
# allowance for consolekit to substitute
# rm $pkgdir/usr/lib/systemd/system/pam_namespace.service
}
post_install() {
# Fix unix_chkpwd perms.
chmod 4755 ${DESTDIR}/usr/bin/unix_chkpwd
}
#---- arch license gpg-key & sha256sums ----
arch=(x86_64)
license=('GPL-2.0-only')
validpgpkeys=(8C6BFD92EE0F42EDF91A6A736D1A7F052E5924BB # Thorsten Kukuk
296D6F29A020808E8717A8842DB5BD89A340AEB7) #Dimitry V. Levin <ldv@altlinux.org>
b2sums=('12891f9064ce7f00d22452d8ff39c14af87c24f9fbf3eab65e475a7d2a592d2b1c1d585f3718b2fa72f277a8ad1faa17149fe0a911bfabdaa4a2957c32e29fe3'
'36582c80020008c3810b311a2e126d2fb4ffc94e565ea4c0c0ab567fdb92943e269781ffa548550742feb685847c26c340906c7454dcc31df4e1e47d511d8d6f')
sha256sums=(56903537535a5188e420ef5f2d879456cf11cd845aec77beccebc2abefc92be6 # pam 1.6.1
# f8923c740159052d719dbfc2a2f81942d68dd34fcaf61c706a02c9b80feeef8e # Linux-PAM-1.6.1.tar.xz
# ef0e0597974d988c9f25f5a155e001b9dcb972618a4a166b8acefac1f5357303 # Linux-PAM-1.6.1.tar.xz.asc
# fd7b13b9993c94677e78e84d12387b8da104b5ba668eda3f17360abe4277e79c # Linux-PAM-1.6.1-docs.tar.xz
# 23235acc1d48b3cc9ba22467ed38e78b47f6c4a17f8297bd94f5cdd7fd8c8e51 # Linux-PAM-1.6.1-docs.tar.xz.asc
5631f224e90c4f0459361c2a5b250112e3a91ba849754bb6f67d69d683a2e5ac) # pam.tmpfiles