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

libfm: define tar.xz for xarchiver
author Xander Ziiryanoff <psychomaniak@xakep.ru>
date Sun Oct 11 13:59:02 2015 +0200 (2015-10-11)
parents 3b3a139f4862
children 1067bb7f1e24
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=msql.so|extension=msql.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 }
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 }