wok-current view php-auth-pam/receipt @ rev 25677
Remove lguest, linux-firmware
author | Stanislas Leduc <shann@slitaz.org> |
---|---|
date | Thu Mar 07 14:36:06 2024 +0000 (9 months ago) |
parents | 505d1daeed6c |
children |
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="https://packages.debian.org/"
11 WGET_URL="http://archive.debian.org/debian/pool/main/p/$PACKAGE/$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 sed -i 's/^function_entry/zend_&/;s/pval /zval /' pam_auth.c # php 5.4
22 sed -e 's|(\(\*[a-z]*)\)->value.str.val;|Z_STRVAL(*\1;|' \
23 -e 's|(\*status)->value.str.val|Z_STR(**status)|' \
24 -e 's|(\*status)->value.str.len|Z_STRLEN(**status)|' \
25 -e 's|(\*status)->type|Z_TYPE_INFO(**status)|' \
26 -i pam_auth.c # php 7.3
28 ./configure $CONFIGURE_ARGS \
29 --prefix=/usr &&
31 make && make INSTALL_ROOT=$DESTDIR install
32 }
34 # Rules to gen a SliTaz package suitable for Tazpkg.
35 genpkg_rules()
36 {
37 mkdir -p $fs/usr/share/php
38 cp -a $install/usr/lib/php/extensions/*/*.so $fs/usr/share/php
39 }
41 post_install()
42 {
43 grep -q ^extension=pam_auth.so "$1/etc/php.ini" || \
44 sed -e 's|extension=bz2.so|extension=bz2.so\nextension=pam_auth.so|' -i "$1/etc/php.ini"
45 # Start Web server.
46 while read daemon file; do
47 [ -z "$1" ] || continue
48 if [ -z "$1" -a -f "/var/run/$file" ]; then
49 /etc/init.d/$daemon stop
50 sleep 2
51 fi
52 if [ -z "$1" -a -f /etc/init.d/$daemon ]; then
53 /etc/init.d/$daemon start
54 fi
55 done <<EOT
56 apache apache/httpd.pid
57 lighttpd lighttpd.pid
58 EOT
59 true
60 }
62 # Pre and post remove commands for Tazpkg.
63 pre_remove()
64 {
65 sed -i '/.*=pam_auth.so.*/d' /etc/php.ini
67 # Start Web server.
68 while read daemon file; do
69 if [ -f /etc/init.d/$daemon -a -f "/var/run/$file" ]; then
70 /etc/init.d/$daemon stop
71 sleep 2
72 /etc/init.d/$daemon start
73 fi
74 done <<EOT
75 apache apache/httpd.pid
76 lighttpd lighttpd.pid
77 EOT
78 }