aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2009-04-29 02:26:21 +0000
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2009-04-29 02:26:21 +0000
commitb518da297a303ff279abcdfa33250e655ee69266 (patch)
treeb3d7eab674a880a87748fd09d6654caa96f6faaa
parent0ccf4e039bca3d14b98e844c4ac263eb7cf00333 (diff)
downloadslackbuilds-b518da297a303ff279abcdfa33250e655ee69266.tar.gz
slackbuilds-b518da297a303ff279abcdfa33250e655ee69266.tar.bz2
postfix: adding postfix mkbuild
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@2171 370017ae-e619-0410-ac65-c121f96126d4
-rw-r--r--app/office/broffice/Manifest30
-rwxr-xr-xapp/office/broffice/broffice.SlackBuild10
-rw-r--r--mail/mta/postfix/Manifest25
-rw-r--r--mail/mta/postfix/postfix-2.2.10.diff (renamed from mail/mta/postfix/postfix-anon-2.2.10.diff)0
-rw-r--r--mail/mta/postfix/postfix-2.2.3.diff (renamed from mail/mta/postfix/postfix-anon-2.2.3.diff)0
-rwxr-xr-xmail/mta/postfix/postfix.SlackBuild449
-rw-r--r--mail/mta/postfix/rc.postfix.new59
-rw-r--r--mail/mta/postfix/script_postfix.tgzbin1182 -> 0 bytes
-rw-r--r--mail/mta/postfix/slack-desc20
-rw-r--r--mail/mta/postfix/slack-required11
10 files changed, 376 insertions, 228 deletions
diff --git a/app/office/broffice/Manifest b/app/office/broffice/Manifest
index 5a95c990..637044fd 100644
--- a/app/office/broffice/Manifest
+++ b/app/office/broffice/Manifest
@@ -2,22 +2,22 @@
Hash: SHA1
DIST BrOo_3.0.1_LinuxIntel_install_pt-BR.tar.gz 149194596 MD5 68883c544b9686a3cc34876004c65bac RMD160 7a2f71487a4d6fafb9b021249640bc8877df906d SHA1 1ec774eeac8542ba2d66a2c3759faffdfef7bd65 SHA256 ba4e96f4bfa3b7a9b252965c082b97cbefe29c4a955b42661dffb128ae7f5887 SHA512 c896639e20f8792b3df68138d2efafc56cee08367a0f85d6d83838ef8405aae49c4b85c1bc5880963bb09c771abb41056a92da24761843321a774dba1c965c23
-MKBUILD broffice.mkbuild 5381 MD5 a8deaed90d372176b8c8ac25b232cebf RMD160 e76688dc457082558841e654cdb1695ee7473021 SHA1 e7462b2b7457e7c68b9e5c1f47f85a227c501069 SHA256 cbec92704f448a7c603bffcb4906421cc15f745c6ef8223e75c08f505561db8d SHA512 4a8cc640ee5257c5e9311f35158ffbe6718b1f1e0c837286a00e1e560ff90e0cbc7c005e2184d0209883709760473bf7f25d07027e0ee0c29e872b8fc1d0a16b
-SLACKBUILD broffice.SlackBuild 5058 MD5 bf184861c03d39ac2c33f74bb32bf5d7 RMD160 819f059bb9a8acd46519df6074e303f487806892 SHA1 027b5088f2ed17bb592066bf94d394a8a62038b2 SHA256 ef2d9ded3807cbca7dd4e6fdc878324b05cd25a16375f0c523662a437e611dea SHA512 787e395ef095385e3b8e064fabaedcb135585e76d1d4398bd2f7b9a52ec907b800b3028cdb8b40b78b6e737676ba96f1ab1565b6f5e89c42a23e4d08c84b3109
+MKBUILD broffice.mkbuild 5365 MD5 015c267bd2cc89ab64499682d14ab563 RMD160 41dfd4abe481990a8caefbe1524dead06174c2c7 SHA1 ea538c04e6413c90290643f4073d64f13e99b12b SHA256 9574d30462b1c46e6acccf4ee90415d67b472fc969c7a3ff024944d1b1e8e1ec SHA512 729ac7833592eeb0b21e7cc8e36ac5b385218ff28fe724f9b00fc1e06f78f740d7dd55b60788313a2abc8b2ce00bd7f24810c24272586ed4c8a724c5eb8bddb9
+SLACKBUILD broffice.SlackBuild 5042 MD5 d2e38d8ef542942d09292e127cc3e9c3 RMD160 865e22a8c46fd64bb7b0994d62f3138e02f03634 SHA1 4be5808e3e0617f91335482158888a03660bc91e SHA256 cd09064d460096f9766a974d95655f2c567fbcf4f310cc0363c3f6d265483468 SHA512 30cd29dc9ba0be0157342c2b2faae011af13fc16d6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kWMK+bxfemGbXgYgQn+yIe8Rct1L09jhtK9yruZ1MpAucKTscfbGjrFiqh
+/88qIhNsyjmnG878Imd5jARx1Oz4mjTw/eFe3EA5XmbS0A63NVmwxXW4LyCFVp/F
+26zyXauAuoPkIuDEWSji6Y9u6rU0xTJ4U3oiICjolmmn2U7H4UVDV5/oaS8br3y7
+h2uk0M1waS87eJ5+R+txdwrzKQfY1+0yP6eytPCWA1jhmFceU4gm0kYK17raXIG3
+3yNH39CU24SvraN0DbxumUg5lSOTkn+kJajbJGlAfopJIogrgfzjHvkbJIMQzALd
+gSz69X/AwEBKmVexdZPXZM2VYFJS4xTOwxuVJnH8m4YS0mYp5BBbFHplUmdRmzo0
++d8X2gr/1ImZovYnzKiF2unT2H5Ffm1WWWOAKMzzMjjDH9iJHReYBTM38yRw21NE
+MRXqXyJEdPgzcreXzivr98+rwZ5mc2Xs1PbrZnLCry8vrAhkYS2CUh0YgN6lXv2i
+Y0Ixb9MBQMmNkrK8OQpn
+=/owU
-----END PGP SIGNATURE-----
diff --git a/app/office/broffice/broffice.SlackBuild b/app/office/broffice/broffice.SlackBuild
index 0fe04d6f..5205b110 100755
--- a/app/office/broffice/broffice.SlackBuild
+++ b/app/office/broffice/broffice.SlackBuild
@@ -40,7 +40,7 @@ TMP=${TMP:=/tmp}
PKG=${PKG:=$TMP/package-$PKG_NAME}
REPOS=${REPOS:=$TMP}
SLACKBUILD_PATH=${SLACKBUILD_PATH:="app/office/broffice"}
-PREFIX=${PREFIX:=/usr/share/broffice.org2.4}
+PREFIX=${PREFIX:=/usr/share/broffice.org}
PKG_WORK="$TMP/$SRC_NAME"
CONF_OPTIONS=${CONF_OPTIONS:=""}
NUMJOBS=${NUMJOBS:=""}
@@ -91,20 +91,20 @@ rm *.rpm 2>/dev/null
# Convert links to KDE
cd desktop-integration
-echo -e "\ninstall broffice.org-slackware-menus-2.4*.rpm"
-tar xvf broffice.org-slackware-menus-2.4*.tgz -C $PKG || exit $ERROR_TAR
+echo -e "\ninstall broffice.org-slackware-menus-*.rpm"
+tar xvf broffice.org*-slackware-menus-*.tgz -C $PKG || exit $ERROR_TAR
rm *.rpm *.deb 2>/dev/null
cd ..
# Change opt directory
mkdir -p $PKG/usr/share
-mv $PKG/opt/broffice.org2.4 $PKG/usr/share/
+mv $PKG/opt/broffice.org* $PKG/usr/share/
mv $PKG/opt/kde/share/* $PKG/usr/share/
rm -rf $PKG/opt
# Change doinstall install directory
-sed 's/\/opt\/broffice.org2.4/\/usr\/share\/broffice.org2.4\//' $PKG/install/doinst.sh > $PKG/install/doinst.sh.new
+sed 's/\/opt\/broffice.org/\/usr\/share\/broffice.org\//' $PKG/install/doinst.sh > $PKG/install/doinst.sh.new
mv $PKG/install/doinst.sh.new $PKG/install/doinst.sh
# Strip binaries
diff --git a/mail/mta/postfix/Manifest b/mail/mta/postfix/Manifest
new file mode 100644
index 00000000..d329a4c5
--- /dev/null
+++ b/mail/mta/postfix/Manifest
@@ -0,0 +1,25 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+DIST postfix-2.5.6.tar.gz 3157891 MD5 ec2cb63b53f5f36c3ca91da8f3bc9407 RMD160 a6d41ac85003b6c24d7400cb8de0d95abecfbfeb SHA1 b6aae7ec9996937c9a901f41c6c262eceba44479 SHA256 8e0178cc1540cb349ed341ae717f0f9ef663e85136db2889e6953bdcd5992abb SHA512 b48e81c05073d807fdef5df1be93daec480c265002abe31281fb06042b08363c5b6bc1b59852990bbb942d3e06c46d1b709a31277df511813edd6b6c7f0f46c2
+MISC rc.postfix 1442 MD5 b6911ab3fce19b796ee4205156b53697 RMD160 e6f914bc44e31a0e1a62c4ec0977db2bfa6eab44 SHA1 d182c64f0ba60da62cbeae854d2cf952a25d9aab SHA256 4ca12082b275293ce20fa6a6531c571ec9bb78a748e87200eea727ab65300369 SHA512 f879af55737c4f89761cba44977ab1a72df58c7bcf24d0b19f4b2cc3084ac4d702652aa9440adbbd0cfb1248a952eed102b9563d825f646d2a030b965a35ca43
+MISC rc.postfix.new 1442 MD5 b6911ab3fce19b796ee4205156b53697 RMD160 e6f914bc44e31a0e1a62c4ec0977db2bfa6eab44 SHA1 d182c64f0ba60da62cbeae854d2cf952a25d9aab SHA256 4ca12082b275293ce20fa6a6531c571ec9bb78a748e87200eea727ab65300369 SHA512 f879af55737c4f89761cba44977ab1a72df58c7bcf24d0b19f4b2cc3084ac4d702652aa9440adbbd0cfb1248a952eed102b9563d825f646d2a030b965a35ca43
+MKBUILD postfix.mkbuild 7243 MD5 302275f96fb8b5c671b8d59dc0691f51 RMD160 a4b0588b545e1be2629b5a19ba255ea16daee059 SHA1 cf9337ded1eecb1e1bcab20541fe0bdb4bcf778f SHA256 d3553e538a5dd8cdc6b73c5dbbcc2767923d667e3bd397b022dfe9e6206690b9 SHA512 c263e152134c5cc0a26224490a50c45dead783e11635432ae7e61cd5dd07ca0e4b1ac9caf95b3884ef79567cfb9c84dbca8c0bab49cf5642cce0edb51c3627a4
+SLACKBUILD postfix.SlackBuild 11075 MD5 68fcb89615e6be142867310b63329972 RMD160 c8954b42b7b80ad2bf5ad03dac5bdd203f6c2c04 SHA1 95d9167fd2713618ad2d415f8aee9b1f82528180 SHA256 a64f69a195eea2f7f5c914d52594c48d3baa781653881ec2ba40ec45ee9fc355 SHA512 38b1e8628ba5b1602d3dac8942d5856ace8ccd5742ab61465ac3526f45fed90e77e933e79e084bca7147d77aabc68620a3e89799520df8d99d6efe1907462adb
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+iQIcBAEBAgAGBQJJ97t8AAoJEEHL93ESzgeieC0P/1p7FGdYM19qTcfzRZbdP6o6
+ddcC++8Drh/0TFDplPX2b15I2Z9n6qqgim3/l+q/xGE7v0Ye5OUk8b2GSGnDy1MJ
+owhekCvLpVOLFOso+nE/8M4DlcP1970a2/c6EM+SkarSMgIlOtdkDMTL+1hnIDF+
+/MKGPAdTfrSjeMV+SK+tJ8SDo+k40sd2uLrHNnBDtOMpFmgVfNAy6OSjqfaqh2pL
+lEguMEcwFlCHuaeSI/EeyeibvVAj/N76Q+pSALDc4iRVWs+2izV8N3XAvOEz6Ak0
+i0Dwo6dcpKe7PHJbHS5oO6VTHKJIERFhHoaOrMklGfL65MwcGkroizAAxGI9zVkV
+Odyz+o9zS8KwlTNIyrzL+S/k8O3VzfUuntA3n61B2uatw+aQ7LGFwVnr7PATWUEK
+VPaYu5WnuFv8cGAQuG3qz3OglzJEH/XCaJbK2LtNZ4GYcpUzpu0GUwqY8SGhO9Gm
+b1nrEgRAe6XDQvXxCGjghzKdRlYltfIuCR99nascllneYuc8TmTm6YiYX1ETjTuz
+qVG4gzq/S1qg/HJGKD8Q+swWlJ6Zri/ynOl/vQiXTF/Te1+qjUowoaOZAc0VqhBc
+npfFgJwRzRGKLLQLtN8sofNIluwL0TNPf0tKHe4S+u9PH1+BHuE5uc3s0mk3ww9o
+XXNPnjND0lDSank7amB7
+=pvyZ
+-----END PGP SIGNATURE-----
diff --git a/mail/mta/postfix/postfix-anon-2.2.10.diff b/mail/mta/postfix/postfix-2.2.10.diff
index 056c2200..056c2200 100644
--- a/mail/mta/postfix/postfix-anon-2.2.10.diff
+++ b/mail/mta/postfix/postfix-2.2.10.diff
diff --git a/mail/mta/postfix/postfix-anon-2.2.3.diff b/mail/mta/postfix/postfix-2.2.3.diff
index fc1321fc..fc1321fc 100644
--- a/mail/mta/postfix/postfix-anon-2.2.3.diff
+++ b/mail/mta/postfix/postfix-2.2.3.diff
diff --git a/mail/mta/postfix/postfix.SlackBuild b/mail/mta/postfix/postfix.SlackBuild
index 4cbdda6b..6fca1ae1 100755
--- a/mail/mta/postfix/postfix.SlackBuild
+++ b/mail/mta/postfix/postfix.SlackBuild
@@ -1,222 +1,317 @@
#!/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
+# postfix.SlackBuild is free software; you can redistribute
+# it and/or modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of the License,
+# or any later version.
+#
+# postfix.SlackBuild is distributed in the hope that it will
+# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+#
+# slackbuild for postfix, by Silvio Rhatto
+# requires:
+# tested: postfix-2.5.6
+# model: generic.mkSlackBuild $Rev: 805 $
#
-if [ -s "slack-required" ]; then
- echo Recomended and required packages for building postfix are:
- cat slack-required | sed -e 's/^/\t/'
- if [ "$INTERACT" != "no" ]; then
- echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER.
- read crap
-# else
-# echo Sleeping 3 seconds...
-# sleep 3
- fi
-fi
-
-CWD=`pwd`
-
+# Look for slackbuildrc
if [ -f ~/.slackbuildrc ]; then
source ~/.slackbuildrc
elif [ -f /etc/slackbuildrc ]; then
source /etc/slackbuildrc
fi
-# default settings
-PACKAGE=postfix
+# Set variables
+CWD="$(pwd)"
+SRC_NAME="postfix"
+PKG_NAME="postfix"
ARCH=${ARCH:=i486}
-VERSION=${VERSION:=2.4.9}
+SRC_VERSION=${VERSION:=2.5.6}
+PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')"
BUILD=${BUILD:=1rha}
-SRC_DIR=${SRC:=$CWD}
+SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME
TMP=${TMP:=/tmp}
+PKG=${PKG:=$TMP/package-$PKG_NAME}
REPOS=${REPOS:=$TMP}
+SLACKBUILD_PATH=${SLACKBUILD_PATH:="mail/mta/postfix"}
+PREFIX=${PREFIX:=/usr}
+PKG_WORK="$TMP/$SRC_NAME"
+CONF_OPTIONS=${CONF_OPTIONS:=""}
+NUMJOBS=${NUMJOBS:=""}
+
+# Set system libraries' path and optmization flags based on $ARCH
+LIBDIR="$PREFIX/lib"
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mtune=i686"
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIR="$PREFIX/lib64"
+ LDFLAGS="-L/lib64 -L/usr/lib64"
+fi
-# ------- error codes for createpkg --------------
+# Set error codes (used by createpkg)
ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39
-ERROR_PATCH=40
+ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42
+ERROR_MANIFEST=43;
-if [ "$ARCH" == "x86_64" ]; then
- LIBDIR=/usr/lib64
-else
- LIBDIR=/usr/lib
-fi
+# Clean up any leftovers of previous builds
+rm -rf "$PKG_WORK" 2> /dev/null
+rm -rf "$PKG" 2> /dev/null
-# general definitions
-PACKAGE_EXT="gz"
-NAME=$PACKAGE
-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"
-SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT"
-
-# url definitions
-VDA="$PACKAGE-$VERSION-vda.patch.gz"
-VDA_URL="http://web.onda.com.br/nadal/postfix/VDA/$VDA"
-ANON="postfix-anon-$VERSION.diff"
-#URL="ftp://ftp.pucpr.br/$PACKAGE/official/$SRC"
+# Create directories if necessary
+mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR
+mkdir -p "$PKG" || exit $ERROR_MKDIR
+mkdir -p "$REPOS" || exit $ERROR_MKDIR
+mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR
+
+# Dowload source if necessary
+SRC="$SRC_NAME-$VERSION.tar.gz"
URL="http://ftp.unicamp.br/pub/postfix/official/$SRC"
-SRC_DIR="$SRC_DIR/$PACKAGE"
-mkdir -p $SRC_DIR
-
-# download sources
-if [ "$RTOOL" == "wget" ]; then
- if [ ! -f "$SRC_DIR/$SRC" ]; then
- wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
- fi
-# if [ ! -f "$SRC_DIR/$VDA" ]; then
-# wget "$VDA_URL" -O "$SRC_DIR/$VDA" # || exit $ERROR_WGET
-# fi
- if [ ! -f "$SRC_DIR/$SRC.sig" ]; then
- wget "$URL.sig" -O "$SRC_DIR/$SRC.sig" || exit $ERROR_WGET
- fi
+if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then
+ wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
fi
-#gpg --import << EOGPG
-#-----BEGIN PGP PUBLIC KEY BLOCK-----
-#Version: GnuPG v1.4.5 (GNU/Linux)
-#
-#mQENA0Ije1oAAAEIALlEqB1UICFF3dfwDij9LHtBhtiEfGnv0PL5rRmSJ4rA9pqs
-#oM3oc0nfgnB502XpeCkT1RW5ymQggEx7+8fXnWhNUAmNGPrbmWzymvrdr4XnPOoB
-#ODlnVYkc9Gt5BLRNSfuLbc1G3nH+FDzhpuJ5zqtb8RrYm5FOPU7eC9QnVoC2nXPW
-#fPfTWVXQoCOEuQQ3zZHEculWQYhRVgxI+CFZjWzWgwZq3wWi/nGGZcFYRtCfodH4
-#UiP0lvj8tOEhD8vUGQKiQGwiw/BBbiCm5ZPcCkSOWxXbZTUrkfTzwse9Ka2blmgH
-#AhlySLtSD/tCX2ykzQEK9JJDw4++By9g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MFEC99Gmfc
-#gPKm1TJ8uQEBJzsD+waYQmJKG0btGU0+GUTg+bRMSfCGwb9p9vbwnXQIPlQrsF8B
-#ozm8IyFGWxsfKT8dRljqmAEwKLhaFgYdFrnliuYfmVMw+nSpdpTDVE0N4d7hd8mT
-#N+WCvY0g6x9rv1uBPKK6lPgWoZHskbzNLwiDXZ5vPKdoSCCIi3aQkCQd+6qx
-#=FFWq
-#-----END PGP PUBLIC KEY BLOCK-----
-#EOGPG
-#
-#gpg --verify $SRC_DIR/$SRC.sig $SRC_DIR/$SRC || exit $ERROR_GPG
+# Check Manifest file
+if [ -e "$CWD/Manifest" ]; then
-rm -rf ${PKGDIR}
-mkdir -p ${PKGDIR}
+ # Manifest signature checking
+ if grep -q -- "-----BEGIN PGP SIGNED MESSAGE-----" $CWD/Manifest; then
+ echo "Checking Manifest signature..."
+ gpg --verify $CWD/Manifest
+ if [ "$?" != "0" ]; then
+ exit $ERROR_MANIFEST
+ fi
+ fi
-cd ${PKGDIR}
-# install scripts
+ MANIFEST_LINES="`grep -E -v "^(MKBUILD|SLACKBUILD)" $CWD/Manifest | wc -l`"
+
+ for ((MANIFEST_COUNT=1; MANIFEST_COUNT <= $MANIFEST_LINES; MANIFEST_COUNT++)); do
+
+ MANIFEST_LINE="`grep -E -v "^(MKBUILD|SLACKBUILD)" $CWD/Manifest | head -n $MANIFEST_COUNT | tail -n 1`"
+ MANIFEST_FILE="`echo $MANIFEST_LINE | awk '{ print $2 }'`"
+ MANIFEST_FILE_TYPE="`echo $MANIFEST_LINE | awk '{ print $1 }'`"
+
+ if [ -e "$SRC_DIR/$MANIFEST_FILE" ]; then
+ MANIFEST_FILE="$SRC_DIR/$MANIFEST_FILE"
+ else
+ MANIFEST_FILE="`find $CWD -name $MANIFEST_FILE`"
+ fi
+
+ if [ ! -e "$MANIFEST_FILE" ] || [ -d "$MANIFEST_FILE" ]; then
+ continue
+ fi
+
+ echo "Checking Manifest for $MANIFEST_FILE_TYPE $MANIFEST_FILE integrity..."
+
+ SIZE_SRC="`wc -c $MANIFEST_FILE | awk '{ print $1 }'`"
+ SIZE_MANIFEST="`echo $MANIFEST_LINE | awk '{ print $3 }'`"
+
+ # Check source code size
+ if [ "$SIZE_SRC" != "$SIZE_MANIFEST" ]; then
+ echo "SIZE Manifest: $SIZE_MANIFEST; SIZE $SRC: $SIZE_SRC"
+ exit $ERROR_MANIFEST
+ else
+ echo "Size match."
+ fi
+
+ # Check source code integrity
+ for ALGO in md5 rmd160 sha1 sha256 sha512; do
+ if [ $ALGO = "rmd160" ]; then
+ ALGO_SRC="`openssl rmd160 $MANIFEST_FILE | awk '{ print $2 }'`"
+ else
+ ALGO_SRC="`"$ALGO"sum $MANIFEST_FILE | awk '{ print $1 }'`"
+ fi
+ ALGO="`echo $ALGO | tr '[:lower:]' '[:upper:]'`"
+ ALGO_MANIFEST=$(echo $MANIFEST_LINE | sed "s/.* $ALGO //" | awk '{ print $1 }')
+ if [ "$ALGO_SRC" != "$ALGO_MANIFEST" ]; then
+ echo "$ALGO Manifest: $ALGO_MANIFEST; $ALGO $SRC: $ALGO_SRC"
+ exit $ERROR_MANIFEST
+ else
+ echo "$ALGO match."
+ fi
+ done
+
+ done
-if [ -e ${CWD}/script_${NAME}.tgz ]; then
- tar zxvf ${CWD}/script_${NAME}.tgz || exit $ERROR_TAR
else
- mkdir -v install
-fi
-sleep 1
-if [ -e ${CWD}/slack-desc ];then
- cat ${CWD}/slack-desc | grep ^${NAME} > ${PKGDIR}/install/slack-desc
-fi
-
-# Extract
-
-cd ${TMP}
-rm -rf ${NAME}-${VERSION} ${SOURCEDIR}
-tar xzvf $SRC_DIR/${NAME}-$VERSION.tar.gz || exit $ERROR_TAR
-# Patch
-
-if [ -s "$SRC_DIR/$VDA" ]; then
- gzip -dc $SRC_DIR/$VDA | patch -p0
-fi
-
-if [ -f "$CWD/$ANON" ]; then
- patch -p0 < $CWD/$ANON
+ exit $ERROR_MANIFEST
fi
-cd ${SOURCEDIR}
-sleep 1
-
-# Build
-
-# make -f Makefile.init makefiles \
-# 'CCARGS=-DUSE_TLS -DHAS_SSL -I/usr/include/openssl -DHAS_MYSQL -I/usr/include/mysql' \
-# 'AUXLIBS=-L/usr/lib -lssl -lcrypto -L/usr/lib/mysql -lmysqlclient -lz -lm'
+# Untar
+cd "$PKG_WORK"
+tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR
+PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`"
+cd "$PKG_SRC"
+
+# Patch source
+patches=" [[PATCH URLS]]
+ $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff
+ $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff"
+for patch in $patches; do
+ patch="`basename $patch`"
+ if [ -f "$CWD/$patch" ]; then
+ patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH
+ elif [ -f "$CWD/patches/$patch" ]; then
+ patch -Np1 < "$CWD/patches/$patch" || exit $ERROR_PATCH
+ elif [ -f "$CWD/$patch.gz" ]; then
+ gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH
+ elif [ -f "$CWD/patches/$patch.gz" ]; then
+ gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH
+ elif [ -f "$SRC_DIR/$patch" ]; then
+ if [ "`basename $patch .gz`" != "$patch" ]; then
+ gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH
+ elif [ "`basename $patch .bz2`" != "$patch" ]; then
+ bzip2 -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH
+ else
+ patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH
+ fi
+ fi
+done
-# db3 explicit
-# make -f Makefile.init makefiles CCARGS="-DUSE_SASL_AUTH -I/usr/include/sasl/ -DHAS_MYSQL -I/usr/include/mysql/ -I/usr/include -DHAS_LDAP -DUSE_TLS -I/usr/include/gnutls/ -DHAS_PCRE -I/usr/include -DHAS_DB -I/usr/include/db3" AUXLIBS="-L/usr/lib -lsasl2 -L/usr/lib/mysql/ -lmysqlclient -lz -lm -L/usr/lib -lssl -lcrypto -L/usr/lib -lpcre -L/usr/lib -lldap -L/usr/lib -llber -L/usr/include/db3 -ldb3"
+# Compile
+DOCDIR=/usr/doc/${PKG_NAME}-${VERSION}
+READMEDIR=${DOCDIR}/README_FILES
+HTMLDIR=${DOCDIR}/HTML
+MANDIR=/usr/man
make -f Makefile.init makefiles CCARGS="-DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl/ -DHAS_MYSQL -I/usr/include/mysql/ -I/usr/include -DHAS_LDAP -DUSE_TLS -I/usr/include/gnutls/ -DHAS_PCRE -I/usr/include" AUXLIBS="-L/usr/lib -lsasl2 -L/usr/lib/mysql/ -lmysqlclient -lz -lm -L/usr/lib -lssl -lcrypto -L/usr/lib -lpcre -L/usr/lib -lldap -L/usr/lib -llber" || exit $ERROR_CONF
make || exit $ERROR_MAKE
-sleep 1
-
-sh postfix-install \
- install_root=${PKGDIR} \
- tempdir=${SOURCE} \
- manpage_directory=${MANDIR} \
- readme_directory=${READMEDIR} \
- html_directory=${HTMLDIR} \
- config_directory=/etc/postfix \
- sample_directory=/etc/postfix/sample \
- daemon_directory=/usr/libexec/postfix \
- command_directory=/usr/sbin/ \
- queue_directory=/var/spool/postfix \
- sendmail_path=/usr/sbin/sendmail \
- newaliases_path=/usr/sbin/newaliases \
- mailq_path=/usr/sbin/mailq \
- mail_owner=postfix \
- setgid_group=postdrop \
- -non-interactive || exit $ERROR_INSTALL
-
-cd ${PKGDIR}/etc/postfix
-
-for a in access aliases canonical header_checks main.cf makedefs.out master.cf postfix-files relocated transport virtual; do
- mv ${a} ${a}.new
-done
-sleep 2
+# Install
+make non-interactive-package \
+ install_root=$PKG \
+ tempdir=$TMP/$PKG_NAME-temp \
+ manpage_directory=${MANDIR} \
+ readme_directory=${READMEDIR} \
+ html_directory=${HTMLDIR} \
+ config_directory=/etc/postfix \
+ sample_directory=/etc/postfix/sample \
+ daemon_directory=/usr/libexec/postfix \
+ command_directory=/usr/sbin/ \
+ queue_directory=/var/spool/postfix \
+ sendmail_path=/usr/sbin/sendmail \
+ newaliases_path=/usr/sbin/newaliases \
+ mailq_path=/usr/sbin/mailq \
+ mail_owner=postfix \
+ setgid_group=postdrop \
+ || exit $ERROR_INSTALL
+
+# Strip binaries
+( cd "$PKG"
+ 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
+)
-mkdir -p ${PKGDIR}/${DOCDIR}
+# Copy init scripts
+mkdir -p $PKG/etc/rc.d
+cp $CWD/rc.* $PKG/etc/rc.d/
-for file in AUTHORS COPYING HACKING NEWS README TODO INSTALL AAAREADME COMPATIBILITY COPYRIGHT HISTORY LICENSE RELEASE_NOTES* TLS_* US_PATENT_6321267; do
- if [ -e "${SOURCEDIR}/${file}" ]; then
- cp -v ${SOURCEDIR}/${file} ${PKGDIR}/${DOCDIR}/
+# Install documentation
+DOCS="AUTHORS COPYING HACKING NEWS README TODO INSTALL AAAREADME COMPATIBILITY COPYRIGHT HISTORY LICENSE RELEASE_NOTES* TLS_* US_PATENT_6321267"
+mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR
+for doc in $DOCS; do
+ if [ -f "$doc" ]; then
+ cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION"
fi
done
-( cd $PKGDIR
- 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
-)
+# Add package description (slack-desc)
+mkdir -p "$PKG/install" || exit $ERROR_MKDIR
+cat << EODESC > "$PKG/install/slack-desc"
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+postfix: Postfix (an alternative to the widely-used Sendmail program.)
+postfix:
+postfix: Postfix attempts to be fast, easy to administer, and secure, while at
+postfix: the same time being sendmail compatible enough to not upset existing
+postfix: users. Thus, the outside has a sendmail-ish flavor, but the inside is
+postfix: completely different.
+postfix:
+postfix: This is postfix compiled with pcre, mysql, sasl, tls, ldap and
+postfix: patched with VDA and postfix-anon.
+postfix:
+postfix:
+EODESC
+
+# Move config files to .new to avoid overwriting any system config
+for config_file in etc/postfix/access etc/postfix/aliases etc/postfix/canonical etc/postfix/generic etc/postfix/header_checks etc/postfix/main.cf etc/postfix/master.cf etc/postfix/relocated etc/postfix/transport etc/postfix/virtual; do
+ mv $PKG/$config_file $PKG/$config_file.new
+done
+
+# Add a post-installation script (doinst.sh)
+mkdir -p "$PKG/install" || exit $ERROR_MKDIR
+cat << EOSCRIPT > "$PKG/install/doinst.sh"
+config() {
+ NEW="\$1"
+ OLD="\$(dirname \$NEW)/\$(basename \$NEW .new)"
+ OLD="\$(dirname \$NEW)/\$(basename \$OLD .sample)"
+ OLD="\$(dirname \$NEW)/\$(basename \$OLD .dist)"
+
+ # If there's no config file by that name, mv it over:
+ if [ ! -r \$OLD ]; then
+ mv \$NEW \$OLD
+ elif [ "\$(cat \$OLD | md5sum)" = "\$(cat \$NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm \$NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+mkgroup() {
+ GROUP="\$1"
+ if ! grep -qe "^\$GROUP:" etc/group; then
+ echo Creating group \$GROUP...
+ chroot . /usr/sbin/groupadd \$GROUP
+ fi
+}
+
+mkuser() {
+ USER="\$1"
+ if [ ! -z "\$2" ]; then
+ GROUP="\$2"
+ else
+ GROUP="\$USER"
+ fi
+ if ! grep -qe "^\$USER:" etc/passwd; then
+ echo Creating user \$USER...
+ chroot . /usr/sbin/useradd \$USER -g \$GROUP
+ fi
+}
-find ${PKGDIR}/${DOCDIR} ${PKGDIR}/${MANDIR} -type f | xargs gzip -v
+config etc/postfix/access.new ; config etc/postfix/aliases.new ; config etc/postfix/canonical.new ; config etc/postfix/generic.new ; config etc/postfix/header_checks.new ; config etc/postfix/main.cf.new ; config etc/postfix/master.cf.new ; config etc/postfix/relocated.new ; config etc/postfix/transport.new ; config etc/postfix/virtual.new; config etc/rc.d/rc.postfix.new
+EOSCRIPT
-find ${PKGDIR}/bin ${PKGDIR}/sbin ${PKGDIR}/usr/bin ${PKGDIR}/usr/sbin -type f | xargs chown -v root.bin
-# Build the package:
-cd $PKGDIR
-#requiredbuilder -v -y -s $CWD $PKGDIR
-/sbin/makepkg -l n -c n --prepend $REPOS/${NAME}-${VERSION}-${ARCH}-${BUILD}.tgz || exit $ERROR_MKPKG
+# Build the package
+cd "$PKG"
+mkdir -p $REPOS/$SLACKBUILD_PATH
+makepkg -l y -c n "$REPOS/$SLACKBUILD_PATH/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG
-# Clean up the extra stuff:
-if [ "$CLEANUP" == "yes" ]; then
- rm -rf $TMP
+# Delete source and build directories if requested
+if [ "$CLEANUP" == "yes" ] || [ "$1" = "--cleanup" ]; then
+ rm -rf "$PKG_WORK" "$PKG"
fi
-
diff --git a/mail/mta/postfix/rc.postfix.new b/mail/mta/postfix/rc.postfix.new
new file mode 100644
index 00000000..4aa3a6c3
--- /dev/null
+++ b/mail/mta/postfix/rc.postfix.new
@@ -0,0 +1,59 @@
+#!/bin/bash
+# Copyright 2006, Alan Hicks, Lizella, GA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+postfix_start()
+{
+ postfix start
+}
+
+postfix_stop()
+{
+ postfix stop
+}
+
+postfix_restart()
+{
+ postfix_stop
+ postfix_start
+}
+
+postfix_reload()
+{
+ postfix reload
+}
+
+case $1 in
+'start')
+ postfix_start
+ ;;
+'stop')
+ postfix_stop
+ ;;
+'restart')
+ postfix_restart
+ ;;
+'reload')
+ postfix_reload
+ ;;
+*)
+ echo "usage $0 start|stop|restart|reload"
+esac
diff --git a/mail/mta/postfix/script_postfix.tgz b/mail/mta/postfix/script_postfix.tgz
deleted file mode 100644
index ec5f621e..00000000
--- a/mail/mta/postfix/script_postfix.tgz
+++ /dev/null
Binary files differ
diff --git a/mail/mta/postfix/slack-desc b/mail/mta/postfix/slack-desc
deleted file mode 100644
index b81e3bb6..00000000
--- a/mail/mta/postfix/slack-desc
+++ /dev/null
@@ -1,20 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in. You must
-# make exactly 11 lines for the formatting to be correct. It's also
-# customary to leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-postfix: Postfix (an alternative to the widely-used Sendmail program.)
-postfix:
-postfix: Postfix attempts to be fast, easy to administer, and secure, while at
-postfix: the same time being sendmail compatible enough to not upset existing
-postfix: users. Thus, the outside has a sendmail-ish flavor, but the inside is
-postfix: completely different.
-postfix:
-postfix: This is postfix compiled with pcre, mysql, sasl, tls, ldap and
-postfix: patched with VDA and postfix-anon.
-postfix:
-postfix:
-
diff --git a/mail/mta/postfix/slack-required b/mail/mta/postfix/slack-required
deleted file mode 100644
index 7d28ba71..00000000
--- a/mail/mta/postfix/slack-required
+++ /dev/null
@@ -1,11 +0,0 @@
-glibc-solibs >= 2.3.5-i486-5
-mysql >= 4.1.14-i486-1
-openssl >= 0.9.7g-i486-2
-openssl-solibs >= 0.9.7g-i486-2
-pcre >= 6.4-i486-1
-zlib >= 1.2.3-i486-1
-libgpg-error
-libgcrypt
-gnutls
-cyrus-sasl
-openldap-client