wok-next view php-auth-pam/receipt @ rev 21722

efivar: typo in post_install
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Sep 01 10:31:46 2020 +0000 (2020-09-01)
parents 4e6503d7a19f
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="devel@slitaz.org"
8 LICENSE="BSD"
9 WEB_SITE="https://www.debian.org/distrib/packages" # and ..?
10 REPOLOGY="php:auth-pam"
12 TARBALL="${PACKAGE}_$VERSION.orig.tar.gz"
13 WGET_URL="http://ftp.de.debian.org/debian/pool/main/p/php-auth-pam/$TARBALL"
15 BUILD_DEPENDS="php-dev pam pam-dev autoconf automake sed coreutils-conditions"
17 compile_rules() {
18 [ -d $PACKAGE-$VERSION ] ||
19 make $PACKAGE-$VERSION.orig $PACKAGE-$VERSION
20 cd $src
21 phpize
22 sed -i 's|^function_entry|zend_&|; s|pval |zval |' pam_auth.c # php 5.4
24 ./configure \
25 --prefix=/usr \
26 $CONFIGURE_ARGS &&
27 make &&
28 make DESTDIR=$install install
29 }
31 genpkg_rules() {
32 mkdir -p $fs/usr/share/php
33 cp -a $install/usr/lib/php/extensions/*/*.so $fs/usr/share/php
34 DEPENDS="php-apache pam"
35 }
37 post_install() {
38 grep -q ^extension=pam_auth.so "$1/etc/php.ini" || \
39 sed -e 's|extension=msql.so|extension=msql.so\nextension=pam_auth.so|' -i "$1/etc/php.ini"
40 # Start Web server.
41 while read daemon file; do
42 [ -z "$1" ] || continue
43 if [ -z "$1" -a -f "/var/run/$file" ]; then
44 /etc/init.d/$daemon stop
45 sleep 2
46 fi
47 if [ -z "$1" -a -f /etc/init.d/$daemon ]; then
48 /etc/init.d/$daemon start
49 fi
50 done <<EOT
51 apache apache/httpd.pid
52 lighttpd lighttpd.pid
53 EOT
54 true
55 }
57 pre_remove() {
58 sed -i '/.*=pam_auth.so.*/d' /etc/php.ini
60 # Start Web server.
61 while read daemon file; do
62 if [ -f /etc/init.d/$daemon -a -f "/var/run/$file" ]; then
63 /etc/init.d/$daemon stop
64 sleep 2
65 /etc/init.d/$daemon start
66 fi
67 done <<EOT
68 apache apache/httpd.pid
69 lighttpd lighttpd.pid
70 EOT
71 }