wok annotate php-auth-pam/receipt @ rev 15473
Add some licenses
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Nov 09 20:47:29 2013 +0000 (2013-11-09) |
parents | b7319995b37e |
children | 15030aba419f |
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@15372 | 14 BUILD_DEPENDS="php-dev pam pam-dev autoconf automake" |
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@11214 | 41 grep -q ^extension=pam_auth.so $1/etc/php.ini || \ |
pascal@11214 | 42 sed -e 's|extension=msql.so|extension=msql.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@11214 | 57 } |
pascal@11214 | 58 |
pascal@11214 | 59 # Pre and post remove commands for Tazpkg. |
pascal@11214 | 60 pre_remove() |
pascal@11214 | 61 { |
pascal@11214 | 62 sed -i '/.*=pam_auth.so.*/d' /etc/php.ini |
pascal@11214 | 63 |
pascal@11214 | 64 # Start Web server. |
pascal@11214 | 65 while read daemon file; do |
pascal@11214 | 66 if [ -f /etc/init.d/$daemon -a -f "/var/run/$file" ]; then |
pascal@11214 | 67 /etc/init.d/$daemon stop |
pascal@11214 | 68 sleep 2 |
pascal@11214 | 69 /etc/init.d/$daemon start |
pascal@11214 | 70 fi |
pascal@11214 | 71 done <<EOT |
pascal@11214 | 72 apache apache/httpd.pid |
pascal@11214 | 73 lighttpd lighttpd.pid |
pascal@11214 | 74 EOT |
pascal@11214 | 75 } |
pascal@11214 | 76 |
pascal@11214 | 77 |
pascal@11214 | 78 clean_wok() |
pascal@11214 | 79 { |
pascal@11214 | 80 test -d ${PACKAGE}-${VERSION} && rm -rf ${PACKAGE}-${VERSION} |
pascal@11214 | 81 } |