blob: 8210568a285cdb98d557cf5c81223f27072f94a1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
# Maintainer: Matteo Mattei <info@matteomattei.com>
# Maintainer: Amish <contact at via dot aur>
pkgname=php-pam
pkgver=2.2.5
pkgrel=3
pkgdesc="This extension provides PAM (Pluggable Authentication Modules) integration in PHP."
arch=('i686' 'x86_64')
url="https://github.com/amishmm/php-pam"
license=('PHP')
depends=('php>=7.2.0' 'pam')
makedepends=('autoconf')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/amishmm/${pkgname}/archive/v${pkgver}.tar.gz")
sha256sums=('1bfab7b9491b438f487123ad3fb01d444aecdbb58dadf0b05c6915dbda104b72')
backup=('etc/pam.d/php')
build() {
cd "${pkgname}-${pkgver}"
phpize
./configure --prefix=/usr
make
}
package() {
cd "${pkgname}-${pkgver}"
make INSTALL_ROOT="${pkgdir}" install
echo -e "extension=pam.so;\npam.servicename=\"php\";\npam.force_servicename=0;" | \
install -Dm644 /dev/stdin "${pkgdir}/etc/php/conf.d/pam.ini"
# use archlinux's own system-remote-login as PAM service
# because that is expected to be well tested for security
# and all future modifications will also automatically apply
# NOTE: content copied from /etc/pam.d/sshd
install -Dm644 /dev/stdin "${pkgdir}/etc/pam.d/php" << 'EOF'
#%PAM-1.0
#auth required pam_securetty.so #disable remote root
auth include system-remote-login
account include system-remote-login
password include system-remote-login
session include system-remote-login
EOF
}
|