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

Fix web site for the Shimmer Project themes
author Aleksej Bobylev <al.bobylev@gmail.com>
date Thu May 10 22:58:32 2018 +0300 (2018-05-10)
parents 9e01bc6321ea
children 4e6503d7a19f
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 test -d ${PACKAGE}-${VERSION} \
20 || make ${PACKAGE}-${VERSION}.orig ${PACKAGE}-${VERSION}
21 cd $src
22 phpize
23 sed -i 's/^function_entry/zend_&/;s/pval /zval /' pam_auth.c # php 5.4
25 ./configure $CONFIGURE_ARGS \
26 --prefix=/usr &&
28 make && make DESTDIR=$DESTDIR install
29 }
31 # Rules to gen a SliTaz package suitable for Tazpkg.
32 genpkg_rules()
33 {
34 mkdir -p $fs/usr/share/php
35 cp -a $install/usr/lib/php/extensions/*/*.so $fs/usr/share/php
36 }
38 post_install()
39 {
40 grep -q ^extension=pam_auth.so "$1/etc/php.ini" || \
41 sed -e 's|extension=msql.so|extension=msql.so\nextension=pam_auth.so|' -i "$1/etc/php.ini"
42 # Start Web server.
43 while read daemon file; do
44 [ -z "$1" ] || continue
45 if [ -z "$1" -a -f "/var/run/$file" ]; then
46 /etc/init.d/$daemon stop
47 sleep 2
48 fi
49 if [ -z "$1" -a -f /etc/init.d/$daemon ]; then
50 /etc/init.d/$daemon start
51 fi
52 done <<EOT
53 apache apache/httpd.pid
54 lighttpd lighttpd.pid
55 EOT
56 true
57 }
59 # Pre and post remove commands for Tazpkg.
60 pre_remove()
61 {
62 sed -i '/.*=pam_auth.so.*/d' /etc/php.ini
64 # Start Web server.
65 while read daemon file; do
66 if [ -f /etc/init.d/$daemon -a -f "/var/run/$file" ]; then
67 /etc/init.d/$daemon stop
68 sleep 2
69 /etc/init.d/$daemon start
70 fi
71 done <<EOT
72 apache apache/httpd.pid
73 lighttpd lighttpd.pid
74 EOT
75 }
78 clean_wok()
79 {
80 test -d ${PACKAGE}-${VERSION} && rm -rf ${PACKAGE}-${VERSION}
81 }