diff options
author | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2006-08-31 17:21:26 +0000 |
---|---|---|
committer | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2006-08-31 17:21:26 +0000 |
commit | 3f3b6f1e5e6212e933ce515461500753f67fcbb4 (patch) | |
tree | b9632ede42c59574b934ed8559d6ef61b76d2594 | |
parent | 9119e8a7a3fcdc31f7f77ab2b23ef30a934af0a4 (diff) | |
download | slackbuilds-3f3b6f1e5e6212e933ce515461500753f67fcbb4.tar.gz slackbuilds-3f3b6f1e5e6212e933ce515461500753f67fcbb4.tar.bz2 |
openldap update
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@85 370017ae-e619-0410-ac65-c121f96126d4
-rwxr-xr-x | openldap/openldap.SlackBuild | 53 |
1 files changed, 20 insertions, 33 deletions
diff --git a/openldap/openldap.SlackBuild b/openldap/openldap.SlackBuild index 09771dc9..a3fc4ab0 100755 --- a/openldap/openldap.SlackBuild +++ b/openldap/openldap.SlackBuild @@ -1,16 +1,18 @@ #!/bin/bash # -# slackbuild script for clamav +# slackbuild script for openldap # CWD="`pwd`" # default settings PACKAGE="openldap" -_VERSION="2.3.24" -_ARCH="x86_64" -_BUILD="1rha" -_TMP="/tmp" +ARCH=${ARCH:=x86_64} +VERSION=${VERSION:=2.3.24} +BUILD=${BUILD:=1rha} +SRC_DIR=${SRC:=$CWD} +TMP=${TMP:=/tmp} +REPOS=${REPOS:=$TMP} if [ -f "/etc/slackbuildrc" ]; then source /etc/slackbuildrc @@ -20,34 +22,12 @@ if [ -f "~/.slackbuildrc" ]; then source ~/.slackbuildrc fi -if [ -z "$VERSION" ]; then - VERSION="$_VERSION" -fi - -if [ -z "$ARCH" ]; then - ARCH="$_ARCH" -fi - -if [ -z "$BUILD" ]; then - BUILD="$_BUILD" -fi - if [ "$ARCH" == "x86_64" ]; then LIBDIR=/usr/lib64 else LIBDIR=/usr/lib fi -if [ -z "$SRC" ]; then - SRC_DIR="$CWD" -else - SRC_DIR="$SRC" -fi - -if [ -z "$TMP" ]; then - TMP="$_TMP" -fi - RTOOL="wget" PACKAGE_EXT="tgz" SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT" @@ -61,6 +41,9 @@ else tarflag="z" fi +SRC_DIR="$SRC_DIR/$PACKAGE" +mkdir -p $SRC_DIR + if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then wget "$URL" -O "$SRC_DIR/$SRC" fi @@ -71,10 +54,10 @@ else LIBDIR="/usr/lib" fi +TMP="$TMP/$PACKAGE" +rm -rf $TMP +mkdir -p $TMP cd $TMP -rm -rf package-$PACKAGE -mkdir package-$PACKAGE -cd package-$PACKAGE tar xvf$tarflag $SRC_DIR/$SRC cd $PACKAGE-$VERSION @@ -90,7 +73,7 @@ ln -sf /usr/include/db4/db.h /usr/include/db.h ./configure --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR make depend make -make DESTDIR=$TMP/package-$PACKAGE/$PACKAGE install +make DESTDIR=$TMP/package-$PACKAGE install # fix your system if [ ! -f "$DBINC" ]; then @@ -101,7 +84,7 @@ fi CWD="`pwd`" -cd $TMP/package-$PACKAGE/$PACKAGE +cd $TMP/package-$PACKAGE find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null @@ -144,5 +127,9 @@ done echo '( if [ ! -f "etc/openldap/ldap.conf" ]; then mv etc/openldap/ldap.conf.new etc/openldap/ldap.conf; fi )' > install/doinst.sh echo '( if [ ! -f "etc/openldap/slapd.conf" ]; then mv etc/openldap/slapd.conf.new etc/openldap/slapd.conf; fi )' >> install/doinst.sh -makepkg -c y -l y $TMP/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz +makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz + +if [ "$CLEANUP" == "yes" ]; then + rm -rf $TMP +fi |