wok-current view php-auth-pam/receipt @ rev 22437

john: fix link, add to right place
author Erkan Yilmaz <erkan@slitaz.org>
date Sun Dec 22 16:03:18 2019 +0000 (2019-12-22)
parents 9e01bc6321ea
children b3301ae192ef
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 patch -p1 < $stuff/php-auth-pam-Makefile.global0.4.u || exit 1
24 sed -i 's/^function_entry/zend_&/;s/pval /zval /' pam_auth.c # php 5.4
26 ./configure $CONFIGURE_ARGS \
27 --prefix=/usr &&
29 make && make DESTDIR=$DESTDIR install
30 }
32 # Rules to gen a SliTaz package suitable for Tazpkg.
33 genpkg_rules()
34 {
35 mkdir -p $fs/usr/share/php
36 cp -a $install/usr/lib/php/extensions/*/*.so $fs/usr/share/php
37 }
39 post_install()
40 {
41 grep -q ^extension=pam_auth.so "$1/etc/php.ini" || \
42 sed -e 's|extension=bz2.so|extension=bz2.so\nextension=pam_auth.so|' -i "$1/etc/php.ini"
43 # Start Web server.
44 while read daemon file; do
45 [ -z "$1" ] || continue
46 if [ -z "$1" -a -f "/var/run/$file" ]; then
47 /etc/init.d/$daemon stop
48 sleep 2
49 fi
50 if [ -z "$1" -a -f /etc/init.d/$daemon ]; then
51 /etc/init.d/$daemon start
52 fi
53 done <<EOT
54 apache apache/httpd.pid
55 lighttpd lighttpd.pid
56 EOT
57 true
58 }
60 # Pre and post remove commands for Tazpkg.
61 pre_remove()
62 {
63 sed -i '/.*=pam_auth.so.*/d' /etc/php.ini
65 # Start Web server.
66 while read daemon file; do
67 if [ -f /etc/init.d/$daemon -a -f "/var/run/$file" ]; then
68 /etc/init.d/$daemon stop
69 sleep 2
70 /etc/init.d/$daemon start
71 fi
72 done <<EOT
73 apache apache/httpd.pid
74 lighttpd lighttpd.pid
75 EOT
76 }
79 clean_wok()
80 {
81 test -d ${PACKAGE}-${VERSION} && rm -rf ${PACKAGE}-${VERSION}
82 }