summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmish2018-10-12 17:18:45 +0530
committerAmish2018-10-12 18:03:11 +0530
commitedf3ac3cd54c6b516ad7bedea88838e6079f4e28 (patch)
treeaf3ba0220d26435d616d48f51a4f58aa92f211f5
parent43d9d58e46d2c3e5d7c45347993c6d7d807e5edf (diff)
downloadaur-edf3ac3cd54c6b516ad7bedea88838e6079f4e28.tar.gz
New upstream. Old upstream was not updated since 2009 and needs patches
-rw-r--r--.SRCINFO13
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD28
-rw-r--r--zend.patch81
4 files changed, 23 insertions, 103 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9c273bfe3e3..3f04fd8eea9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,22 +1,21 @@
pkgbase = php-pam
pkgdesc = This extension provides PAM (Pluggable Authentication Modules) integration in PHP.
- pkgver = 1.0.3
- pkgrel = 5
- url = http://pecl.php.net/package/PAM
+ pkgver = 2.1.0
+ pkgrel = 1
+ url = https://github.com/amishmm/php-pam
arch = i686
arch = x86_64
license = PHP
makedepends = autoconf
- depends = php
+ depends = php>=7.2.0
depends = pam
depends = php-pear
- source = http://pecl.php.net/get/pam-1.0.3.tgz
+ source = php-pam-2.1.0.tar.gz::https://github.com/amishmm/php-pam/archive/v2.1.0.tar.gz
source = pam.ini
source = php
- md5sums = 2dfd378a76021245050333cd4d49ed96
+ md5sums = 0182234a17611e79f537c0b16927fe8e
md5sums = 9582d5f0476e486f2c3084940f1abd86
md5sums = 5fb207f61ff94b0cc7a2dcc1e3c1c388
- md5sums = 806c2d6052159dd58e392dbe91711d05
pkgname = php-pam
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..0cbb9d85094
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+src
+pkg
+*.pkg.tar.xz
+php-pam-*.tar.gz
diff --git a/PKGBUILD b/PKGBUILD
index 9d3060682a5..b7027bceb27 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,33 +1,31 @@
-# Contributor: Matteo Mattei <info@matteomattei.com>
+# Maintainer: Matteo Mattei <info@matteomattei.com>
+# Maintainer: Amish <contact at via dot aur>
pkgname=php-pam
-_extname=pam
-pkgver=1.0.3
-pkgrel=5
+pkgver=2.1.0
+pkgrel=1
pkgdesc="This extension provides PAM (Pluggable Authentication Modules) integration in PHP."
arch=('i686' 'x86_64')
-url="http://pecl.php.net/package/PAM"
+url="https://github.com/amishmm/php-pam"
license=('PHP')
-depends=('php' 'pam' 'php-pear')
+depends=('php>=7.2.0' 'pam' 'php-pear')
makedepends=('autoconf')
#install=php-pam.install
-source=(http://pecl.php.net/get/pam-${pkgver}.tgz pam.ini php zend.patch)
-md5sums=('2dfd378a76021245050333cd4d49ed96' '9582d5f0476e486f2c3084940f1abd86' '5fb207f61ff94b0cc7a2dcc1e3c1c388'
-'806c2d6052159dd58e392dbe91711d05')
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/amishmm/${pkgname}/archive/v${pkgver}.tar.gz" pam.ini php)
+md5sums=('0182234a17611e79f537c0b16927fe8e'
+ '9582d5f0476e486f2c3084940f1abd86'
+ '5fb207f61ff94b0cc7a2dcc1e3c1c388')
build() {
- patch -p0 < ../zend.patch
- cd "${_extname}-${pkgver}"
- export CFLAGS="$CFLAGS -O0"
- export CXXFLAGS="$CXXFLAGS -O0"
+ cd "${pkgname}-${pkgver}"
phpize
./configure --prefix=/usr
make
}
package() {
- cd "${_extname}-${pkgver}"
+ cd "${pkgname}-${pkgver}"
make INSTALL_ROOT="${pkgdir}" install
- install -D -m644 "${srcdir}/${_extname}.ini" "${pkgdir}/etc/php/conf.d/${_extname}.ini"
+ install -D -m644 "${srcdir}/pam.ini" "${pkgdir}/etc/php/conf.d/pam.ini"
install -D -m644 "${srcdir}/php" ${pkgdir}/etc/pam.d/php
}
diff --git a/zend.patch b/zend.patch
deleted file mode 100644
index d31e512cea4..00000000000
--- a/zend.patch
+++ /dev/null
@@ -1,81 +0,0 @@
---- pam-1.0.3/pam.c.orig 2017-04-09 16:40:13.581520943 +0530
-+++ pam-1.0.3/pam.c 2017-04-09 16:55:59.156281369 +0530
-@@ -228,7 +228,7 @@
- {
- char *username, *password;
- int username_len, password_len;
-- zval *status = NULL, **server, **remote_addr;
-+ zval *status = NULL, *server, *remote_addr;
- zend_bool checkacctmgmt = 1;
-
- pam_auth_t userinfo = {NULL, NULL};
-@@ -248,14 +248,15 @@
- if (status) {
- spprintf(&error_msg, 0, "%s (in %s)", (char *) pam_strerror(pamh, result), "pam_start");
- zval_dtor(status);
-- ZVAL_STRING(status, error_msg, 0);
-+ ZVAL_STRING(status, error_msg);
-+ efree(error_msg);
- }
- RETURN_FALSE;
- }
-
-- if (zend_hash_find(&EG(symbol_table), "_SERVER", sizeof("_SERVER"), (void **)&server) == SUCCESS && Z_TYPE_PP(server) == IS_ARRAY) {
-- if (zend_hash_find(Z_ARRVAL_PP(server), "REMOTE_ADDR", sizeof("REMOTE_ADDR"), (void **)&remote_addr) == SUCCESS && Z_TYPE_PP(remote_addr) == IS_STRING) {
-- pam_set_item(pamh, PAM_RHOST, Z_STRVAL_PP(remote_addr));
-+ if ((server = zend_hash_str_find(&EG(symbol_table), "_SERVER", sizeof("_SERVER")-1)) != NULL && Z_TYPE_P(server) == IS_ARRAY) {
-+ if ((remote_addr = zend_hash_str_find(Z_ARRVAL_P(server), "REMOTE_ADDR", sizeof("REMOTE_ADDR")-1)) != NULL && Z_TYPE_P(remote_addr) == IS_STRING) {
-+ pam_set_item(pamh, PAM_RHOST, Z_STRVAL_P(remote_addr));
- }
- }
-
-@@ -263,7 +264,8 @@
- if (status) {
- spprintf(&error_msg, 0, "%s (in %s)", (char *) pam_strerror(pamh, result), "pam_authenticate");
- zval_dtor(status);
-- ZVAL_STRING(status, error_msg, 0);
-+ ZVAL_STRING(status, error_msg);
-+ efree(error_msg);
- }
- pam_end(pamh, PAM_SUCCESS);
- RETURN_FALSE;
-@@ -274,7 +276,8 @@
- if (status) {
- spprintf(&error_msg, 0, "%s (in %s)", (char *) pam_strerror(pamh, result), "pam_acct_mgmt");
- zval_dtor(status);
-- ZVAL_STRING(status, error_msg, 0);
-+ ZVAL_STRING(status, error_msg);
-+ efree(error_msg);
- }
- pam_end(pamh, PAM_SUCCESS);
- RETURN_FALSE;
-@@ -312,7 +315,8 @@
- if (status) {
- spprintf(&error_msg, 0, "%s (in %s)", (char *) pam_strerror(pamh, result), "pam_start");
- zval_dtor(status);
-- ZVAL_STRING(status, error_msg, 0);
-+ ZVAL_STRING(status, error_msg);
-+ efree(error_msg);
- }
- RETURN_FALSE;
- }
-@@ -321,7 +325,8 @@
- if (status) {
- spprintf(&error_msg, 0, "%s (in %s)", (char *) pam_strerror(pamh, result), "pam_authenticate");
- zval_dtor(status);
-- ZVAL_STRING(status, error_msg, 0);
-+ ZVAL_STRING(status, error_msg);
-+ efree(error_msg);
- }
- pam_end(pamh, PAM_SUCCESS);
- RETURN_FALSE;
-@@ -331,7 +336,8 @@
- if (status) {
- spprintf(&error_msg, 0, "%s (in %s)", (char *) pam_strerror(pamh, result), "pam_chauthtok");
- zval_dtor(status);
-- ZVAL_STRING(status, error_msg, 0);
-+ ZVAL_STRING(status, error_msg);
-+ efree(error_msg);
- }
- pam_end(pamh, PAM_SUCCESS);
- RETURN_FALSE;