wok-6.x annotate php-auth-pam/receipt @ rev 22389

Add php-opcache
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Nov 28 21:44:13 2019 +0100 (2019-11-28)
parents 9e01bc6321ea
children b3301ae192ef
rev   line source
pascal@11214 1 # SliTaz package receipt.
pascal@11214 2
pascal@11214 3 PACKAGE="php-auth-pam"
pascal@11214 4 VERSION="0.4"
pascal@11214 5 CATEGORY="development"
pascal@11214 6 SHORT_DESC="PHP extension for PAM"
pascal@11214 7 MAINTAINER="erjo@slitaz.org"
pascal@15372 8 LICENSE="BSD"
pascal@11214 9 TARBALL="${PACKAGE}_${VERSION}.orig.tar.gz"
pascal@11214 10 WEB_SITE="http://packages.debian.org/"
pascal@11214 11 WGET_URL="http://ftp.de.debian.org/debian/pool/main/p/php-auth-pam/$TARBALL"
pascal@11214 12
pascal@15372 13 DEPENDS="php-apache pam"
pascal@15643 14 BUILD_DEPENDS="php-dev pam pam-dev autoconf automake sed coreutils-conditions"
pascal@11214 15
pascal@11214 16 # Rules to configure and make the package.
pascal@11214 17 compile_rules()
pascal@11214 18 {
pascal@11214 19 test -d ${PACKAGE}-${VERSION} \
pascal@11214 20 || make ${PACKAGE}-${VERSION}.orig ${PACKAGE}-${VERSION}
pascal@11214 21 cd $src
gokhlayeh@11573 22 phpize
pascal@11214 23 patch -p1 < $stuff/php-auth-pam-Makefile.global0.4.u || exit 1
pascal@15372 24 sed -i 's/^function_entry/zend_&/;s/pval /zval /' pam_auth.c # php 5.4
pascal@11214 25
gokhlayeh@11573 26 ./configure $CONFIGURE_ARGS \
pascal@11214 27 --prefix=/usr &&
pascal@11214 28
pascal@11214 29 make && make DESTDIR=$DESTDIR install
pascal@11214 30 }
pascal@11214 31
pascal@11214 32 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@11214 33 genpkg_rules()
pascal@11214 34 {
pascal@11214 35 mkdir -p $fs/usr/share/php
pascal@15372 36 cp -a $install/usr/lib/php/extensions/*/*.so $fs/usr/share/php
pascal@11214 37 }
pascal@11214 38
pascal@11214 39 post_install()
pascal@11214 40 {
pascal@18730 41 grep -q ^extension=pam_auth.so "$1/etc/php.ini" || \
pascal@22389 42 sed -e 's|extension=bz2.so|extension=bz2.so\nextension=pam_auth.so|' -i "$1/etc/php.ini"
pascal@11214 43 # Start Web server.
pascal@11214 44 while read daemon file; do
pascal@11214 45 [ -z "$1" ] || continue
pascal@11214 46 if [ -z "$1" -a -f "/var/run/$file" ]; then
pascal@11214 47 /etc/init.d/$daemon stop
pascal@11214 48 sleep 2
pascal@11214 49 fi
pascal@11214 50 if [ -z "$1" -a -f /etc/init.d/$daemon ]; then
pascal@11214 51 /etc/init.d/$daemon start
pascal@11214 52 fi
pascal@11214 53 done <<EOT
pascal@11214 54 apache apache/httpd.pid
pascal@11214 55 lighttpd lighttpd.pid
pascal@11214 56 EOT
pascal@18707 57 true
pascal@11214 58 }
pascal@11214 59
pascal@11214 60 # Pre and post remove commands for Tazpkg.
pascal@11214 61 pre_remove()
pascal@11214 62 {
pascal@11214 63 sed -i '/.*=pam_auth.so.*/d' /etc/php.ini
pascal@11214 64
pascal@11214 65 # Start Web server.
pascal@11214 66 while read daemon file; do
pascal@11214 67 if [ -f /etc/init.d/$daemon -a -f "/var/run/$file" ]; then
pascal@11214 68 /etc/init.d/$daemon stop
pascal@11214 69 sleep 2
pascal@11214 70 /etc/init.d/$daemon start
pascal@11214 71 fi
pascal@11214 72 done <<EOT
pascal@11214 73 apache apache/httpd.pid
pascal@11214 74 lighttpd lighttpd.pid
pascal@11214 75 EOT
pascal@11214 76 }
pascal@11214 77
pascal@11214 78
pascal@11214 79 clean_wok()
pascal@11214 80 {
pascal@11214 81 test -d ${PACKAGE}-${VERSION} && rm -rf ${PACKAGE}-${VERSION}
pascal@11214 82 }