diff options
author | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2006-08-31 17:22:52 +0000 |
---|---|---|
committer | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2006-08-31 17:22:52 +0000 |
commit | df14d11a2373eecbeb46bba143cf352f89ad8814 (patch) | |
tree | 4ed9d4f0d2568921415365d9e7de63811a448a56 /openldap/openldap-client.SlackBuild | |
parent | 3f3b6f1e5e6212e933ce515461500753f67fcbb4 (diff) | |
download | slackbuilds-df14d11a2373eecbeb46bba143cf352f89ad8814.tar.gz slackbuilds-df14d11a2373eecbeb46bba143cf352f89ad8814.tar.bz2 |
openldap update
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@86 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'openldap/openldap-client.SlackBuild')
-rwxr-xr-x | openldap/openldap-client.SlackBuild | 51 |
1 files changed, 19 insertions, 32 deletions
diff --git a/openldap/openldap-client.SlackBuild b/openldap/openldap-client.SlackBuild index 2d095d38..510c91c6 100755 --- a/openldap/openldap-client.SlackBuild +++ b/openldap/openldap-client.SlackBuild @@ -7,10 +7,12 @@ CWD="`pwd`" # default settings PACKAGE="openldap-client" -_VERSION="2.3.24" -_ARCH="x86_64" -_BUILD="2rha" -_TMP="/tmp" +ARCH=${ARCH:=x86_64} +VERSION=${VERSION:=2.3.24} +BUILD=${BUILD:=2rha} +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 mv openldap-$VERSION $PACKAGE-$VERSION @@ -85,11 +68,11 @@ cd $PACKAGE-$VERSION make depend make -make DESTDIR=$TMP/package-$PACKAGE/$PACKAGE install +make DESTDIR=$TMP/package-$PACKAGE install 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 @@ -133,5 +116,9 @@ for file in ANNOUNCEMENT CHANGES COPYRIGHT INSTALL LICENSE README; do cp $CWD/$file* usr/doc/$PACKAGE-$VERSION/ done -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 |