wok-6.x rev 1155

Add openldap
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Jul 27 09:18:17 2008 +0000 (2008-07-27)
parents d442045183a5
children fad639db2f59
files db-dev/receipt db/receipt libdb/receipt libldap/receipt openldap-dev/receipt openldap/receipt openldap/stuff/etc/init.d/openldap php-ldap/receipt php/receipt phpldapadmin/receipt
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/db-dev/receipt	Sun Jul 27 09:18:17 2008 +0000
     1.3 @@ -0,0 +1,17 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="db-dev"
     1.7 +VERSION="4.5.20"
     1.8 +CATEGORY="system"
     1.9 +SHORT_DESC="Berkeley database development files."
    1.10 +MAINTAINER="pascal.bellard@slitaz.org"
    1.11 +WEB_SITE="http://www.oracle.com/technology/software/products/berkeley-db/db/"
    1.12 +WANTED="db"
    1.13 +
    1.14 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.15 +genpkg_rules()
    1.16 +{
    1.17 +	mkdir -p $fs/usr/lib
    1.18 +	cp -a $_pkg/usr/lib/*a $fs/usr/lib
    1.19 +	cp -a $_pkg/usr/include $fs/usr
    1.20 +}
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/db/receipt	Sun Jul 27 09:18:17 2008 +0000
     2.3 @@ -0,0 +1,39 @@
     2.4 +# SliTaz package receipt.
     2.5 +
     2.6 +PACKAGE="db"
     2.7 +VERSION="4.5.20"
     2.8 +CATEGORY="system"
     2.9 +SHORT_DESC="Berkeley database system."
    2.10 +MAINTAINER="pascal.bellard@slitaz.org"
    2.11 +TARBALL="$PACKAGE-$VERSION.NC.tar.gz"
    2.12 +WEB_SITE="http://www.oracle.com/technology/software/products/berkeley-db/db/"
    2.13 +WGET_URL="http://download.oracle.com/berkeley-db/$TARBALL"
    2.14 +BUILD_DEPENDS="patch"
    2.15 +DEPENDS="libdb"
    2.16 +
    2.17 +# Rules to configure and make the package.
    2.18 +compile_rules()
    2.19 +{
    2.20 +
    2.21 +	ln -s $PACKAGE-$VERSION.NC $src
    2.22 +	cd $src
    2.23 +	wget  http://www.oracle.com/technology/products/berkeley-db/db/update/4.5.20/patch.4.5.20.1
    2.24 +	patch -p0 < patch.4.5.20.1
    2.25 +	cd build_unix
    2.26 +	../dist/configure --prefix=/usr --infodir=/usr/share/info \
    2.27 +		--mandir=/usr/share/man $CONFIGURE_ARGS
    2.28 +	make
    2.29 +	make DESTDIR=$PWD/../_pkg install
    2.30 +}
    2.31 +
    2.32 +# Rules to gen a SliTaz package suitable for Tazpkg.
    2.33 +genpkg_rules()
    2.34 +{
    2.35 +	mkdir -p $fs/usr
    2.36 +	cp -a $_pkg/usr/bin $fs/usr
    2.37 +	# Package all db pkgs
    2.38 +	for i in $(cd $WOK; ls -d db-* libdb)
    2.39 +	do
    2.40 +		tazwok genpkg $i
    2.41 +	done
    2.42 +}
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/libdb/receipt	Sun Jul 27 09:18:17 2008 +0000
     3.3 @@ -0,0 +1,16 @@
     3.4 +# SliTaz package receipt.
     3.5 +
     3.6 +PACKAGE="libdb"
     3.7 +VERSION="4.5.20"
     3.8 +CATEGORY="system"
     3.9 +SHORT_DESC="Berkeley database libraries."
    3.10 +MAINTAINER="pascal.bellard@slitaz.org"
    3.11 +WEB_SITE="http://www.oracle.com/technology/software/products/berkeley-db/db/"
    3.12 +WANTED="db"
    3.13 +
    3.14 +# Rules to gen a SliTaz package suitable for Tazpkg.
    3.15 +genpkg_rules()
    3.16 +{
    3.17 +	mkdir -p $fs/usr/lib
    3.18 +	cp -a $_pkg/usr/lib/*so $fs/usr/lib
    3.19 +}
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/libldap/receipt	Sun Jul 27 09:18:17 2008 +0000
     4.3 @@ -0,0 +1,17 @@
     4.4 +# SliTaz package receipt.
     4.5 +
     4.6 +PACKAGE="libldap"
     4.7 +VERSION="2.3.39"
     4.8 +CATEGORY="system"
     4.9 +SHORT_DESC="LDAP database libraries."
    4.10 +MAINTAINER="pascal.bellard@slitaz.org"
    4.11 +TARBALL="$PACKAGE-stable-20071118.tgz"
    4.12 +WEB_SITE="http://www.openldap.org/"
    4.13 +WANTED="openldap"
    4.14 +
    4.15 +# Rules to gen a SliTaz package suitable for Tazpkg.
    4.16 +genpkg_rules()
    4.17 +{
    4.18 +	mkdir -p $fs/usr/lib
    4.19 +	cp -a $_pkg/usr/lib/*so* $fs/usr/lib
    4.20 +}
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/openldap-dev/receipt	Sun Jul 27 09:18:17 2008 +0000
     5.3 @@ -0,0 +1,18 @@
     5.4 +# SliTaz package receipt.
     5.5 +
     5.6 +PACKAGE="openldap-dev"
     5.7 +VERSION="2.3.39"
     5.8 +CATEGORY="system"
     5.9 +SHORT_DESC="LDAP database development files."
    5.10 +MAINTAINER="pascal.bellard@slitaz.org"
    5.11 +TARBALL="$PACKAGE-stable-20071118.tgz"
    5.12 +WEB_SITE="http://www.openldap.org/"
    5.13 +WANTED="openldap"
    5.14 +
    5.15 +# Rules to gen a SliTaz package suitable for Tazpkg.
    5.16 +genpkg_rules()
    5.17 +{
    5.18 +	mkdir -p $fs/usr/lib
    5.19 +	cp -a $_pkg/usr/include $fs/usr
    5.20 +	cp -a $_pkg/usr/lib/*a $fs/usr/lib
    5.21 +}
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/openldap/receipt	Sun Jul 27 09:18:17 2008 +0000
     6.3 @@ -0,0 +1,42 @@
     6.4 +# SliTaz package receipt.
     6.5 +
     6.6 +PACKAGE="openldap"
     6.7 +VERSION="2.3.39"
     6.8 +CATEGORY="system"
     6.9 +SHORT_DESC="LDAP database system."
    6.10 +MAINTAINER="pascal.bellard@slitaz.org"
    6.11 +TARBALL="$PACKAGE-stable-20071118.tgz"
    6.12 +WEB_SITE="http://www.openldap.org/"
    6.13 +WGET_URL="ftp://ftp.openldap.org/pub/OpenLDAP/$PACKAGE-stable/$TARBALL"
    6.14 +DEPENDS="libdb"
    6.15 +BUILD_DEPENDS="db-dev"
    6.16 +
    6.17 +# Rules to configure and make the package.
    6.18 +compile_rules()
    6.19 +{
    6.20 +
    6.21 +	cd $src
    6.22 +	./configure --prefix=/usr --infodir=/usr/share/info \
    6.23 +		--sysconfdir=/etc --localstatedir=/var \
    6.24 +		--mandir=/usr/share/man $CONFIGURE_ARGS
    6.25 +	make
    6.26 +	make DESTDIR=$PWD/_pkg install
    6.27 +}
    6.28 +
    6.29 +# Rules to gen a SliTaz package suitable for Tazpkg.
    6.30 +genpkg_rules()
    6.31 +{
    6.32 +	mkdir -p $fs/usr
    6.33 +	cp -a $_pkg/etc $fs
    6.34 +	cp -a $_pkg/usr/bin $fs/usr
    6.35 +	cp -a $_pkg/usr/sbin $fs/usr
    6.36 +	cp -a $_pkg/usr/libexec $fs/usr
    6.37 +	cp -a $_pkg/var $fs
    6.38 +	cp -a stuff/etc/init.d $fs/etc
    6.39 +	chmod 700 $fs/var/openldap-data $fs/etc/openldap
    6.40 +	# Package all mysql pkgs
    6.41 +	for i in $(cd $WOK; ls -d openldap-* libldap*)
    6.42 +	do
    6.43 +		tazwok genpkg $i
    6.44 +	done
    6.45 +}
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/openldap/stuff/etc/init.d/openldap	Sun Jul 27 09:18:17 2008 +0000
     7.3 @@ -0,0 +1,55 @@
     7.4 +#!/bin/sh
     7.5 +# /etc/init.d/openldap : Start, stop and restart LDAP server on SliTaz, at 
     7.6 +# boot time or with the command line.
     7.7 +#
     7.8 +# To start LDAP server at boot time, just put openldap in the $RUN_DAEMONS
     7.9 +# variable of /etc/rcS.conf and configure options with /etc/daemons.conf
    7.10 +#
    7.11 +. /etc/init.d/rc.functions
    7.12 +. /etc/daemons.conf
    7.13 +
    7.14 +NAME=Openldap
    7.15 +DESC="LDAP server"
    7.16 +DAEMON=/usr/libexec/slapd
    7.17 +OPTIONS=$LDAP_OPTIONS
    7.18 +PIDFILE=/var/run/slapd.pid
    7.19 +
    7.20 +case "$1" in
    7.21 +  start)
    7.22 +    if [ -f $PIDFILE ] ; then
    7.23 +      echo "$NAME already running."
    7.24 +      exit 1
    7.25 +    fi
    7.26 +    echo -n "Starting $DESC: $NAME... "
    7.27 +    $DAEMON $OPTIONS
    7.28 +    status
    7.29 +    ;;
    7.30 +  stop)
    7.31 +    if [ ! -f $PIDFILE ] ; then
    7.32 +      echo "$NAME is not running."
    7.33 +      exit 1
    7.34 +    fi
    7.35 +    echo -n "Stopping $DESC: $NAME... "
    7.36 +    kill `cat $PIDFILE`
    7.37 +    status
    7.38 +    ;;
    7.39 +  restart)
    7.40 +    if [ ! -f $PIDFILE ] ; then
    7.41 +      echo "$NAME is not running."
    7.42 +      exit 1
    7.43 +    fi
    7.44 +    echo -n "Restarting $DESC: $NAME... "
    7.45 +    kill `cat $PIDFILE`
    7.46 +    sleep 2
    7.47 +    $DAEMON $OPTIONS
    7.48 +    status
    7.49 +    ;;
    7.50 +  *)
    7.51 +    echo ""
    7.52 +    echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]"
    7.53 +    echo ""
    7.54 +    exit 1
    7.55 +    ;;
    7.56 +esac
    7.57 +
    7.58 +exit 0
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/php-ldap/receipt	Sun Jul 27 09:18:17 2008 +0000
     8.3 @@ -0,0 +1,37 @@
     8.4 +# SliTaz package receipt.
     8.5 +
     8.6 +PACKAGE="php-ldap"
     8.7 +VERSION="5.2.5"
     8.8 +CATEGORY="development"
     8.9 +SHORT_DESC="ldap module for PHP web programming language."
    8.10 +MAINTAINER="pascal.bellard@slitaz.org"
    8.11 +DEPENDS="libldap php openssl"
    8.12 +WEB_SITE="http://www.php.net/"
    8.13 +WANTED="php"
    8.14 +
    8.15 +# Rules to gen a SliTaz package suitable for Tazpkg.
    8.16 +genpkg_rules()
    8.17 +{
    8.18 +	mkdir -p $fs/usr/share/php
    8.19 +	cp $(find $_pkg | grep ldap.so) $fs/usr/share/php/
    8.20 +}
    8.21 +
    8.22 +# Post and pre install commans to stop
    8.23 +# and restart Web server if needed.
    8.24 +pre_install()
    8.25 +{
    8.26 +	if [ -z "$1" -a -f "/var/run/lighttpd.pid" ]; then
    8.27 +		/etc/init.d/lighttpd stop
    8.28 +	fi
    8.29 +}
    8.30 +
    8.31 +post_install()
    8.32 +{
    8.33 +	grep -q ^extension=msql.so $1/etc/php.ini || \
    8.34 +	    sed -e 's|;.*extension=msql.so|;   extension=msql.so\nextension=ldap.so|' -i $1/etc/php.ini
    8.35 +	# Start Web server.
    8.36 +	if [ -z "$1" -a ! -f "/var/run/lighttpd.pid" ]; then
    8.37 +		/etc/init.d/lighttpd start
    8.38 +	fi
    8.39 +}
    8.40 +
     9.1 --- a/php/receipt	Sun Jul 27 01:18:49 2008 +0200
     9.2 +++ b/php/receipt	Sun Jul 27 09:18:17 2008 +0000
     9.3 @@ -6,7 +6,7 @@
     9.4  SHORT_DESC="PHP web programming language."
     9.5  MAINTAINER="pankso@slitaz.org"
     9.6  DEPENDS="lighttpd zlib libxml2 sqlite"
     9.7 -BUILD_DEPENDS="sqlite-dev libxml2-dev zlib-dev mysql-dev postgresql postgresql-dev"
     9.8 +BUILD_DEPENDS="sqlite-dev libxml2-dev zlib-dev mysql-dev postgresql postgresql-dev gettext openssl-dev"
     9.9  TARBALL="$PACKAGE-$VERSION.tar.bz2"
    9.10  WEB_SITE="http://www.php.net/"
    9.11  WGET_URL="http://us2.php.net/distributions/$TARBALL"
    9.12 @@ -26,8 +26,10 @@
    9.13  		--enable-mbstring \
    9.14  		--with-config-file-path=/etc \
    9.15  		--with-zlib \
    9.16 +		--with-gettext \
    9.17  		--with-mysql=shared,usr \
    9.18  		--with-pgsql=shared,usr \
    9.19 +		--with-ldap=shared 
    9.20  		--disable-cli \
    9.21  		$CONFIGURE_ARGS
    9.22  	make
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/phpldapadmin/receipt	Sun Jul 27 09:18:17 2008 +0000
    10.3 @@ -0,0 +1,53 @@
    10.4 +# SliTaz package receipt.
    10.5 +
    10.6 +PACKAGE="phpldapadmin"
    10.7 +VERSION="1.1.0.5"
    10.8 +CATEGORY="misc"
    10.9 +SHORT_DESC="Administration of LDAP over the Web."
   10.10 +MAINTAINER="pascal.bellard@slitaz.org"
   10.11 +TARBALL="$PACKAGE-$VERSION.tar.gz"
   10.12 +WEB_SITE="http://$PACKAGE.sourceforge.net/"
   10.13 +WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
   10.14 +DEPENDS="php-ldap"
   10.15 +
   10.16 +# Rules to configure and make the package.
   10.17 +compile_rules()
   10.18 +{
   10.19 +	echo "$src compiled..."
   10.20 +}
   10.21 +
   10.22 +# Rules to gen a SliTaz package suitable for Tazpkg.
   10.23 +genpkg_rules()
   10.24 +{
   10.25 +	mkdir -p $fs/usr/share/phpldapadmin $fs/etc
   10.26 +	cp -a $src/. $fs/usr/share/phpldapadmin
   10.27 +	mv $fs/usr/share/phpldapadmin/config $fs/etc/phpldapadmin
   10.28 +	ln -s /etc/phpldapadmin $fs/usr/share/phpldapadmin/config
   10.29 +	mv $fs/etc/phpldapadmin/config.php.example $fs/etc/phpldapadmin/config.php
   10.30 +	chown -R www.www $fs/usr/share/phpldapadmin $fs/etc/phpldapadmin
   10.31 +	chmod 700 $fs/etc/phpldapadmin
   10.32 +	chmod 600 $fs/etc/phpldapadmin/config.php
   10.33 +}
   10.34 +
   10.35 +post_install()
   10.36 +{
   10.37 +	( cd $1/ ; cpio -o -H newc | gzip -9 ) > \
   10.38 +		$1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT
   10.39 +etc/phpldapadmin/config.php
   10.40 +EOT
   10.41 +	if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
   10.42 +		if ! grep -q /usr/share/phpldapadmin/ $1/etc/lighttpd/lighttpd.conf; then
   10.43 +	    		sed -e 's|.*"/examples/" => "/usr/share/examples/",|    "/examples/" => "/usr/share/examples/",\n    "/phpldapadmin/" => "/usr/share/phpldapadmin/",|g' -i $1/etc/lighttpd/lighttpd.conf
   10.44 +			if [ -z "$1" ]; then
   10.45 +				# Start Web server.
   10.46 +				/etc/init.d/lighttpd stop
   10.47 +				/etc/init.d/lighttpd start
   10.48 +			fi
   10.49 +		fi
   10.50 +	fi
   10.51 +}
   10.52 +
   10.53 +repack_cleanup()
   10.54 +{
   10.55 +        zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id )
   10.56 +}