#!/ffp/bin/sh # # openldap build script for funplug ala Slackware style (client only) set -e CWD=`pwd` PKGNAME=openldap PKG=$CWD/package-$PKGNAME VERSION=2.4.21 BUILD=1 TAG=jag PKGDIR=/ffp/var/cache/packages URL=ftp://ftp.openldap.org/pub/OpenLDAP/$PKGNAME-release CLEANUP=yes # Make the package directory if not found: if [ ! -d $PKGDIR ]; then mkdir -p $PKGDIR fi # Grab the source ( mkdir -p source && cd source wget -N $URL/$PKGNAME-$VERSION.tgz ) rm -rf $PKG mkdir -p $PKG if [ ! -f /ffp/var/packages/cyrus-sasl-* ]; then echo && echo "cyrus-sasl is an optional dependency" && sleep 6 else CYRUS=--with-cyrus-sasl fi echo echo "$PKGNAME-$VERSION source is now extracting..." rm -rf $PKGNAME-$VERSION tar xf $CWD/source/$PKGNAME-$VERSION.tgz cd $PKGNAME-$VERSION chown -R root:root . CFLAGS="-march=armv5te -O2" \ ./configure --prefix=/ffp \ --libexecdir=/ffp/sbin \ --sysconfdir=/ffp/etc \ --mandir=/ffp/share/man \ --localstatedir=/ffp/var/lib \ --disable-debug \ --disable-static \ --with-tls \ --with-readline \ --with-threads \ --enable-syslog \ --enable-dynamic \ --enable-local \ --enable-proctitle \ --enable-shared \ --disable-slapd \ --disable-slurpd \ $CYRUS make depend make make test make install DESTDIR=$PKG # companion binaries wern't installed find $PKG/ffp/share/man -name slap* -exec rm -f {} \; find $PKG/ffp/share/man -name slurp* -exec rm -f {} \; mv $PKG/ffp/etc/openldap/ldap.conf.default $PKG/ffp/etc/openldap/ldap.conf.orig cat << EOF >> $PKG/ffp/etc/openldap/ldap.conf # In order to avoid problems with self-signed certificates using TLS: # "TLS certificate verification: Error, self signed certificate" # See also 'man ldap.conf' or http://www.openldap.org/doc/admin/tls.html TLS_REQCERT allow EOF # Strip: find $PKG | xargs file | grep -e "executable" -e "shared object" \ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null \ | true # Build the package: cd $PKG rm -rf ffp/share/man/man8 echo && echo "Making funplug package..." && echo tar czvf $PKGDIR/$PKGNAME-$VERSION-$BUILD$TAG.tgz * echo && echo "Your $PKGNAME package is in $PKGDIR" && echo # Clean up: [[ $CLEANUP == yes ]] && \ rm -rf $CWD/$PKGNAME-$VERSION $CWD/package-$PKGNAME exit 1