jobcore/pam/PKGBUILD

97 lines
3.3 KiB
Bash

#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=pam
pkgver=1.6.1
pkgrel=02
pkgdesc="PAM (Pluggable Authentication Modules) library - w/o systemd"
url="http://linux-pam.org"
depends=('glibc' 'libtirpc' 'pambase' 'audit' 'libaudit.so' 'libxcrypt' 'libcrypt.so') #
# 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')
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}
$pkgname.tmpfiles)
options=('!emptydirs')
prepare() {
cd Linux-PAM-$pkgver
# 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 Linux-PAM-$pkgver
# 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() {
install -Dm 644 $pkgname.tmpfiles "$pkgdir"/usr/lib/tmpfiles.d/$pkgname.conf
cd Linux-PAM-$pkgver
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>
sha256sums=(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
## 78c5a00980f5da0258d338f2514b43084d4223f7c6fd5e75e1ef19d630cacaf1 pam-1.6.1-02-x86_64.pkg.tar.lz