diff options
author | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2006-08-31 18:45:45 +0000 |
---|---|---|
committer | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2006-08-31 18:45:45 +0000 |
commit | c024c7823048f0ae571cebe852411c76696c7663 (patch) | |
tree | 36cc8625273630bb7a0c8573f33dfaf4e4b2a526 | |
parent | a5b4ef18b62e99d1b6be75bdbca41ecb626e2280 (diff) | |
download | slackbuilds-c024c7823048f0ae571cebe852411c76696c7663.tar.gz slackbuilds-c024c7823048f0ae571cebe852411c76696c7663.tar.bz2 |
postfix update
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@104 370017ae-e619-0410-ac65-c121f96126d4
-rwxr-xr-x | postfix/postfix.SlackBuild | 49 |
1 files changed, 16 insertions, 33 deletions
diff --git a/postfix/postfix.SlackBuild b/postfix/postfix.SlackBuild index d14da9a3..3bee29e2 100755 --- a/postfix/postfix.SlackBuild +++ b/postfix/postfix.SlackBuild @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # original script from http://www.slacky.it/download/network/tool/postfix/2.2.10/src/postfix.SlackBuild # changes by rhatto at riseup.net @@ -27,13 +27,6 @@ read CWD=`pwd` -# default settings -PACKAGE=postfix -_VERSION="2.2.10" -_ARCH="x86_64" -_BUILD="2rha" -_TMP="/tmp" - if [ -f "/etc/slackbuildrc" ]; then source /etc/slackbuildrc fi @@ -42,17 +35,14 @@ 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 +# default settings +PACKAGE=postfix +ARCH=${ARCH:=x86_64} +VERSION=${VERSION:=2.2.10} +BUILD=${BUILD:=2rha} +SRC_DIR=${SRC:=$CWD} +TMP=${TMP:=/tmp} +REPOS=${REPOS:=$TMP} if [ "$ARCH" == "x86_64" ]; then LIBDIR=/usr/lib64 @@ -60,16 +50,6 @@ else LIBDIR=/usr/lib fi -if [ -z "$SRC" ]; then - SRC_DIR="$CWD" -else - SRC_DIR="$SRC" -fi - -if [ -z "$TMP" ]; then - TMP="$_TMP" -fi - # general definitions PACKAGE_EXT="gz" NAME=$PACKAGE @@ -77,6 +57,7 @@ DOCDIR=/usr/doc/${NAME}-${VERSION} READMEDIR=${DOCDIR}/README_FILES HTMLDIR=${DOCDIR}/HTML MANDIR=/usr/man +TMP="$TMP/$PACKAGE" PKGDIR=${TMP}/package-${NAME} SOURCEDIR=${TMP}/${NAME}-${VERSION} RTOOL="wget" @@ -88,6 +69,9 @@ VDA_URL="http://web.onda.com.br/nadal/postfix/VDA/$VDA" ANON="postfix-anon-$VERSION.diff" URL="ftp://ftp.pucpr.br/$PACKAGE/official/$SRC" +SRC_DIR="$SRC_DIR/$PACKAGE" +mkdir -p $SRC_DIR + # download sources if [ "$RTOOL" == "wget" ]; then if [ ! -f "$SRC_DIR/$SRC" ]; then @@ -194,11 +178,10 @@ find ${PKGDIR}/bin ${PKGDIR}/sbin ${PKGDIR}/usr/bin ${PKGDIR}/usr/sbin -type f | # Build the package: cd $PKGDIR #requiredbuilder -v -y -s $CWD $PKGDIR -/sbin/makepkg -l n -c n --prepend ${TMP}/${NAME}-${VERSION}-${ARCH}-${BUILD}.tgz +/sbin/makepkg -l n -c n --prepend $REPOS/${NAME}-${VERSION}-${ARCH}-${BUILD}.tgz # Clean up the extra stuff: -if [ "$1" = "--cleanup" ]; then - rm -rf ${SOURCE} - rm -rf ${PKGDIR} +if [ "$CLEANUP" == "yes" ]; then + rm -rf $TMP fi |