wok annotate php-auth-pam/receipt @ rev 23427

updated php-auth-sasl (1.0.4 -> 1.1.0)
author Hans-G?nter Theisgen
date Wed Apr 01 16:13:53 2020 +0100 (2020-04-01)
parents b3301ae192ef
children e424d38736d6
rev   line source
pascal@11214 1 # SliTaz package receipt.
pascal@11214 2
pascal@11214 3 PACKAGE="php-auth-pam"
pascal@11214 4 VERSION="0.4"
pascal@11214 5 CATEGORY="development"
pascal@11214 6 SHORT_DESC="PHP extension for PAM"
pascal@11214 7 MAINTAINER="erjo@slitaz.org"
pascal@15372 8 LICENSE="BSD"
pascal@11214 9 TARBALL="${PACKAGE}_${VERSION}.orig.tar.gz"
pascal@11214 10 WEB_SITE="http://packages.debian.org/"
pascal@11214 11 WGET_URL="http://ftp.de.debian.org/debian/pool/main/p/php-auth-pam/$TARBALL"
pascal@11214 12
pascal@15372 13 DEPENDS="php-apache pam"
pascal@15643 14 BUILD_DEPENDS="php-dev pam pam-dev autoconf automake sed coreutils-conditions"
pascal@11214 15
pascal@11214 16 # Rules to configure and make the package.
pascal@11214 17 compile_rules()
pascal@11214 18 {
gokhlayeh@11573 19 phpize
pascal@11214 20 patch -p1 < $stuff/php-auth-pam-Makefile.global0.4.u || exit 1
pascal@15372 21 sed -i 's/^function_entry/zend_&/;s/pval /zval /' pam_auth.c # php 5.4
pascal@23062 22
pascal@23062 23 sed -e 's|(\(\*[a-z]*)\)->value.str.val;|Z_STRVAL(*\1;|' \
pascal@23062 24 -e 's|(\*status)->value.str.val|Z_STR(**status)|' \
pascal@23062 25 -e 's|(\*status)->value.str.len|Z_STRLEN(**status)|' \
pascal@23062 26 -e 's|(\*status)->type|Z_TYPE_INFO(**status)|' \
pascal@23062 27 -i pam_auth.c # php 7.3
pascal@11214 28
gokhlayeh@11573 29 ./configure $CONFIGURE_ARGS \
pascal@11214 30 --prefix=/usr &&
pascal@11214 31
pascal@11214 32 make && make DESTDIR=$DESTDIR install
pascal@11214 33 }
pascal@11214 34
pascal@11214 35 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@11214 36 genpkg_rules()
pascal@11214 37 {
pascal@11214 38 mkdir -p $fs/usr/share/php
pascal@15372 39 cp -a $install/usr/lib/php/extensions/*/*.so $fs/usr/share/php
pascal@11214 40 }
pascal@11214 41
pascal@11214 42 post_install()
pascal@11214 43 {
pascal@18730 44 grep -q ^extension=pam_auth.so "$1/etc/php.ini" || \
pascal@22389 45 sed -e 's|extension=bz2.so|extension=bz2.so\nextension=pam_auth.so|' -i "$1/etc/php.ini"
pascal@11214 46 # Start Web server.
pascal@11214 47 while read daemon file; do
pascal@11214 48 [ -z "$1" ] || continue
pascal@11214 49 if [ -z "$1" -a -f "/var/run/$file" ]; then
pascal@11214 50 /etc/init.d/$daemon stop
pascal@11214 51 sleep 2
pascal@11214 52 fi
pascal@11214 53 if [ -z "$1" -a -f /etc/init.d/$daemon ]; then
pascal@11214 54 /etc/init.d/$daemon start
pascal@11214 55 fi
pascal@11214 56 done <<EOT
pascal@11214 57 apache apache/httpd.pid
pascal@11214 58 lighttpd lighttpd.pid
pascal@11214 59 EOT
pascal@18707 60 true
pascal@11214 61 }
pascal@11214 62
pascal@11214 63 # Pre and post remove commands for Tazpkg.
pascal@11214 64 pre_remove()
pascal@11214 65 {
pascal@11214 66 sed -i '/.*=pam_auth.so.*/d' /etc/php.ini
pascal@11214 67
pascal@11214 68 # Start Web server.
pascal@11214 69 while read daemon file; do
pascal@11214 70 if [ -f /etc/init.d/$daemon -a -f "/var/run/$file" ]; then
pascal@11214 71 /etc/init.d/$daemon stop
pascal@11214 72 sleep 2
pascal@11214 73 /etc/init.d/$daemon start
pascal@11214 74 fi
pascal@11214 75 done <<EOT
pascal@11214 76 apache apache/httpd.pid
pascal@11214 77 lighttpd lighttpd.pid
pascal@11214 78 EOT
pascal@11214 79 }