wok-6.x annotate php-auth-pam/receipt @ rev 25391
updated usb-modeswitch-data (20170806 -> 20191128)
author | Hans-G?nter Theisgen |
---|---|
date | Mon Aug 01 15:21:41 2022 +0100 (2022-08-01) |
parents | e424d38736d6 |
children | 73f36875e5a7 |
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@25026 | 11 WGET_URL="http://archive.debian.org/debian/pool/main/p/$PACKAGE/$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 { |
gokhlayeh@11573 | 19 phpize |
pascal@15372 | 20 sed -i 's/^function_entry/zend_&/;s/pval /zval /' pam_auth.c # php 5.4 |
pascal@23062 | 21 |
pascal@23062 | 22 sed -e 's|(\(\*[a-z]*)\)->value.str.val;|Z_STRVAL(*\1;|' \ |
pascal@23062 | 23 -e 's|(\*status)->value.str.val|Z_STR(**status)|' \ |
pascal@23062 | 24 -e 's|(\*status)->value.str.len|Z_STRLEN(**status)|' \ |
pascal@23062 | 25 -e 's|(\*status)->type|Z_TYPE_INFO(**status)|' \ |
pascal@23062 | 26 -i pam_auth.c # php 7.3 |
pascal@11214 | 27 |
gokhlayeh@11573 | 28 ./configure $CONFIGURE_ARGS \ |
pascal@11214 | 29 --prefix=/usr && |
pascal@11214 | 30 |
pascal@24081 | 31 make && make INSTALL_ROOT=$DESTDIR install |
pascal@11214 | 32 } |
pascal@11214 | 33 |
pascal@11214 | 34 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@11214 | 35 genpkg_rules() |
pascal@11214 | 36 { |
pascal@11214 | 37 mkdir -p $fs/usr/share/php |
pascal@15372 | 38 cp -a $install/usr/lib/php/extensions/*/*.so $fs/usr/share/php |
pascal@11214 | 39 } |
pascal@11214 | 40 |
pascal@11214 | 41 post_install() |
pascal@11214 | 42 { |
pascal@18730 | 43 grep -q ^extension=pam_auth.so "$1/etc/php.ini" || \ |
pascal@22389 | 44 sed -e 's|extension=bz2.so|extension=bz2.so\nextension=pam_auth.so|' -i "$1/etc/php.ini" |
pascal@11214 | 45 # Start Web server. |
pascal@11214 | 46 while read daemon file; do |
pascal@11214 | 47 [ -z "$1" ] || continue |
pascal@11214 | 48 if [ -z "$1" -a -f "/var/run/$file" ]; then |
pascal@11214 | 49 /etc/init.d/$daemon stop |
pascal@11214 | 50 sleep 2 |
pascal@11214 | 51 fi |
pascal@11214 | 52 if [ -z "$1" -a -f /etc/init.d/$daemon ]; then |
pascal@11214 | 53 /etc/init.d/$daemon start |
pascal@11214 | 54 fi |
pascal@11214 | 55 done <<EOT |
pascal@11214 | 56 apache apache/httpd.pid |
pascal@11214 | 57 lighttpd lighttpd.pid |
pascal@11214 | 58 EOT |
pascal@18707 | 59 true |
pascal@11214 | 60 } |
pascal@11214 | 61 |
pascal@11214 | 62 # Pre and post remove commands for Tazpkg. |
pascal@11214 | 63 pre_remove() |
pascal@11214 | 64 { |
pascal@11214 | 65 sed -i '/.*=pam_auth.so.*/d' /etc/php.ini |
pascal@11214 | 66 |
pascal@11214 | 67 # Start Web server. |
pascal@11214 | 68 while read daemon file; do |
pascal@11214 | 69 if [ -f /etc/init.d/$daemon -a -f "/var/run/$file" ]; then |
pascal@11214 | 70 /etc/init.d/$daemon stop |
pascal@11214 | 71 sleep 2 |
pascal@11214 | 72 /etc/init.d/$daemon start |
pascal@11214 | 73 fi |
pascal@11214 | 74 done <<EOT |
pascal@11214 | 75 apache apache/httpd.pid |
pascal@11214 | 76 lighttpd lighttpd.pid |
pascal@11214 | 77 EOT |
pascal@11214 | 78 } |