wok view php-auth-pam/receipt @ rev 23405

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