wok diff php-auth-pam/receipt @ rev 11433
freetype1-dev: move *a files to the correct path
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Fri Dec 16 15:42:01 2011 +0100 (2011-12-16) |
parents | |
children | b7319995b37e |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/php-auth-pam/receipt Fri Dec 16 15:42:01 2011 +0100 1.3 @@ -0,0 +1,79 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="php-auth-pam" 1.7 +VERSION="0.4" 1.8 +CATEGORY="development" 1.9 +SHORT_DESC="PHP extension for PAM" 1.10 +MAINTAINER="erjo@slitaz.org" 1.11 +DEPENDS="php-apache pam" 1.12 +BUILD_DEPENDS="php-dev pam pam-dev autoconf automake" 1.13 +TARBALL="${PACKAGE}_${VERSION}.orig.tar.gz" 1.14 +WEB_SITE="http://packages.debian.org/" 1.15 +WGET_URL="http://ftp.de.debian.org/debian/pool/main/p/php-auth-pam/$TARBALL" 1.16 + 1.17 + 1.18 +# Rules to configure and make the package. 1.19 +compile_rules() 1.20 +{ 1.21 + test -d ${PACKAGE}-${VERSION} \ 1.22 + || make ${PACKAGE}-${VERSION}.orig ${PACKAGE}-${VERSION} 1.23 + cd $src 1.24 + phpize 1.25 + patch -p1 < $stuff/php-auth-pam-Makefile.global0.4.u || exit 1 1.26 + 1.27 + ./configure \ 1.28 + --prefix=/usr && 1.29 + 1.30 + make && make DESTDIR=$DESTDIR install 1.31 +} 1.32 + 1.33 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.34 +genpkg_rules() 1.35 +{ 1.36 + mkdir -p $fs/usr/share/php 1.37 + cp -a $_pkg/usr/lib/php/extensions/*/*.so $fs/usr/share/php 1.38 +} 1.39 + 1.40 +post_install() 1.41 +{ 1.42 + grep -q ^extension=pam_auth.so $1/etc/php.ini || \ 1.43 + sed -e 's|extension=msql.so|extension=msql.so\nextension=pam_auth.so|' -i $1/etc/php.ini 1.44 + # Start Web server. 1.45 + while read daemon file; do 1.46 + [ -z "$1" ] || continue 1.47 + if [ -z "$1" -a -f "/var/run/$file" ]; then 1.48 + /etc/init.d/$daemon stop 1.49 + sleep 2 1.50 + fi 1.51 + if [ -z "$1" -a -f /etc/init.d/$daemon ]; then 1.52 + /etc/init.d/$daemon start 1.53 + fi 1.54 + done <<EOT 1.55 +apache apache/httpd.pid 1.56 +lighttpd lighttpd.pid 1.57 +EOT 1.58 +} 1.59 + 1.60 +# Pre and post remove commands for Tazpkg. 1.61 +pre_remove() 1.62 +{ 1.63 + sed -i '/.*=pam_auth.so.*/d' /etc/php.ini 1.64 + 1.65 + # Start Web server. 1.66 + while read daemon file; do 1.67 + if [ -f /etc/init.d/$daemon -a -f "/var/run/$file" ]; then 1.68 + /etc/init.d/$daemon stop 1.69 + sleep 2 1.70 + /etc/init.d/$daemon start 1.71 + fi 1.72 + done <<EOT 1.73 +apache apache/httpd.pid 1.74 +lighttpd lighttpd.pid 1.75 +EOT 1.76 +} 1.77 + 1.78 + 1.79 +clean_wok() 1.80 +{ 1.81 + test -d ${PACKAGE}-${VERSION} && rm -rf ${PACKAGE}-${VERSION} 1.82 +}