#!/bin/sh # All comments and suggestions to Alak Trakru # CWD=`pwd` CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp fi PKG=$TMP/package-openldap VERSION=2.1.22 ARCH=i386 BUILD=1 if [ ! -d $TMP ]; then mkdir -p $TMP # location to build the source fi rm -rf $PKG mkdir -p $PKG cd $TMP tar xzvf $CWD/openldap-$VERSION.tgz cd openldap-$VERSION # CFLAGS="-O2 -march=i386 -mcpu=i686" ./configure --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var/openldap \ --enable-syslog \ --enable-dynamic \ --with-readline \ --with-threads \ --with-tls \ --enable-slapd \ --enable-cleartext \ --enable-modules \ --enable-rlookups \ --enable-wrappers \ --enable-bdb \ --enable-slurpd make make install DESTDIR=$PKG mkdir -p $PKG/usr/doc/openldap-$VERSION cp -a AUTHORS COPYING ChangeLog INSTALL NEWS README \ $PKG/usr/doc/openldap-$VERSION chmod 644 $PKG/usr/doc/openldap-$VERSION/* chown root.root $PKG/usr/doc/openldap-$VERSION/* find $PKG -type f | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded gzip -9 $PKG/usr/man/*/* mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG makepkg -l y -c n $TMP/openldap-$VERSION-$ARCH-$BUILD.tgz # Clean up the extra stuff: if [ "$1" = "--cleanup" ]; then rm -rf $TMP/template-$VERSION rm -rf $PKG fi