wok-next annotate php-auth-pam/receipt @ rev 21703
updated gputils (0.14.3 -> 1.5.0.1)
author | Hans-G?nter Theisgen |
---|---|
date | Wed Jul 01 14:31:24 2020 +0100 (2020-07-01) |
parents | 4e6503d7a19f |
children |
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" |
al@21020 | 7 MAINTAINER="devel@slitaz.org" |
pascal@15372 | 8 LICENSE="BSD" |
al@21020 | 9 WEB_SITE="https://www.debian.org/distrib/packages" # and ..? |
al@20884 | 10 REPOLOGY="php:auth-pam" |
al@20884 | 11 |
al@21020 | 12 TARBALL="${PACKAGE}_$VERSION.orig.tar.gz" |
pascal@11214 | 13 WGET_URL="http://ftp.de.debian.org/debian/pool/main/p/php-auth-pam/$TARBALL" |
pascal@11214 | 14 |
pascal@15643 | 15 BUILD_DEPENDS="php-dev pam pam-dev autoconf automake sed coreutils-conditions" |
pascal@11214 | 16 |
al@21020 | 17 compile_rules() { |
al@21020 | 18 [ -d $PACKAGE-$VERSION ] || |
al@21020 | 19 make $PACKAGE-$VERSION.orig $PACKAGE-$VERSION |
pascal@11214 | 20 cd $src |
gokhlayeh@11573 | 21 phpize |
al@21020 | 22 sed -i 's|^function_entry|zend_&|; s|pval |zval |' pam_auth.c # php 5.4 |
al@21020 | 23 |
al@21020 | 24 ./configure \ |
al@21020 | 25 --prefix=/usr \ |
al@21020 | 26 $CONFIGURE_ARGS && |
al@21020 | 27 make && |
al@21020 | 28 make DESTDIR=$install install |
pascal@11214 | 29 } |
pascal@11214 | 30 |
al@21020 | 31 genpkg_rules() { |
pascal@11214 | 32 mkdir -p $fs/usr/share/php |
pascal@15372 | 33 cp -a $install/usr/lib/php/extensions/*/*.so $fs/usr/share/php |
al@21020 | 34 DEPENDS="php-apache pam" |
pascal@11214 | 35 } |
pascal@11214 | 36 |
al@21020 | 37 post_install() { |
pascal@18730 | 38 grep -q ^extension=pam_auth.so "$1/etc/php.ini" || \ |
pascal@18730 | 39 sed -e 's|extension=msql.so|extension=msql.so\nextension=pam_auth.so|' -i "$1/etc/php.ini" |
pascal@11214 | 40 # Start Web server. |
pascal@11214 | 41 while read daemon file; do |
pascal@11214 | 42 [ -z "$1" ] || continue |
pascal@11214 | 43 if [ -z "$1" -a -f "/var/run/$file" ]; then |
pascal@11214 | 44 /etc/init.d/$daemon stop |
pascal@11214 | 45 sleep 2 |
pascal@11214 | 46 fi |
pascal@11214 | 47 if [ -z "$1" -a -f /etc/init.d/$daemon ]; then |
pascal@11214 | 48 /etc/init.d/$daemon start |
pascal@11214 | 49 fi |
pascal@11214 | 50 done <<EOT |
pascal@11214 | 51 apache apache/httpd.pid |
pascal@11214 | 52 lighttpd lighttpd.pid |
pascal@11214 | 53 EOT |
pascal@18707 | 54 true |
pascal@11214 | 55 } |
pascal@11214 | 56 |
al@21020 | 57 pre_remove() { |
pascal@11214 | 58 sed -i '/.*=pam_auth.so.*/d' /etc/php.ini |
pascal@11214 | 59 |
pascal@11214 | 60 # Start Web server. |
pascal@11214 | 61 while read daemon file; do |
pascal@11214 | 62 if [ -f /etc/init.d/$daemon -a -f "/var/run/$file" ]; then |
pascal@11214 | 63 /etc/init.d/$daemon stop |
pascal@11214 | 64 sleep 2 |
pascal@11214 | 65 /etc/init.d/$daemon start |
pascal@11214 | 66 fi |
pascal@11214 | 67 done <<EOT |
pascal@11214 | 68 apache apache/httpd.pid |
pascal@11214 | 69 lighttpd lighttpd.pid |
pascal@11214 | 70 EOT |
pascal@11214 | 71 } |