wok-current view php-auth-pam/receipt @ rev 15185
linux-source: add mirror src fallback
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Aug 23 18:59:48 2013 +0000 (2013-08-23) |
parents | 2f79d601d5bc |
children | 3b3a139f4862 |
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 DEPENDS="php-apache pam"
9 BUILD_DEPENDS="php-dev pam pam-dev autoconf automake"
10 TARBALL="${PACKAGE}_${VERSION}.orig.tar.gz"
11 WEB_SITE="http://packages.debian.org/"
12 WGET_URL="http://ftp.de.debian.org/debian/pool/main/p/php-auth-pam/$TARBALL"
15 # Rules to configure and make the package.
16 compile_rules()
17 {
18 test -d ${PACKAGE}-${VERSION} \
19 || make ${PACKAGE}-${VERSION}.orig ${PACKAGE}-${VERSION}
20 cd $src
21 phpize
22 patch -p1 < $stuff/php-auth-pam-Makefile.global0.4.u || exit 1
24 ./configure $CONFIGURE_ARGS \
25 --prefix=/usr &&
27 make && make DESTDIR=$DESTDIR install
28 }
30 # Rules to gen a SliTaz package suitable for Tazpkg.
31 genpkg_rules()
32 {
33 mkdir -p $fs/usr/share/php
34 cp -a $_pkg/usr/lib/php/extensions/*/*.so $fs/usr/share/php
35 }
37 post_install()
38 {
39 grep -q ^extension=pam_auth.so $1/etc/php.ini || \
40 sed -e 's|extension=msql.so|extension=msql.so\nextension=pam_auth.so|' -i $1/etc/php.ini
41 # Start Web server.
42 while read daemon file; do
43 [ -z "$1" ] || continue
44 if [ -z "$1" -a -f "/var/run/$file" ]; then
45 /etc/init.d/$daemon stop
46 sleep 2
47 fi
48 if [ -z "$1" -a -f /etc/init.d/$daemon ]; then
49 /etc/init.d/$daemon start
50 fi
51 done <<EOT
52 apache apache/httpd.pid
53 lighttpd lighttpd.pid
54 EOT
55 }
57 # Pre and post remove commands for Tazpkg.
58 pre_remove()
59 {
60 sed -i '/.*=pam_auth.so.*/d' /etc/php.ini
62 # Start Web server.
63 while read daemon file; do
64 if [ -f /etc/init.d/$daemon -a -f "/var/run/$file" ]; then
65 /etc/init.d/$daemon stop
66 sleep 2
67 /etc/init.d/$daemon start
68 fi
69 done <<EOT
70 apache apache/httpd.pid
71 lighttpd lighttpd.pid
72 EOT
73 }
76 clean_wok()
77 {
78 test -d ${PACKAGE}-${VERSION} && rm -rf ${PACKAGE}-${VERSION}
79 }