diff options
author | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2009-07-14 14:23:48 +0000 |
---|---|---|
committer | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2009-07-14 14:23:48 +0000 |
commit | 9fe1a048f6a61e9b36313af42c9294d26fe960fd (patch) | |
tree | 778f84401471d1e83ab54012f196d84fe338cfbd /dev/libs/cyrus-sasl | |
parent | 30278eddad7f73e234880e1944b8801095580fac (diff) | |
download | slackbuilds-9fe1a048f6a61e9b36313af42c9294d26fe960fd.tar.gz slackbuilds-9fe1a048f6a61e9b36313af42c9294d26fe960fd.tar.bz2 |
monkeysphere: updating dependencies; syslog-ng: updating; cyrus-sasl: updating
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@2227 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'dev/libs/cyrus-sasl')
-rw-r--r-- | dev/libs/cyrus-sasl/Manifest | 24 | ||||
-rwxr-xr-x | dev/libs/cyrus-sasl/cyrus-sasl.SlackBuild | 101 |
2 files changed, 112 insertions, 13 deletions
diff --git a/dev/libs/cyrus-sasl/Manifest b/dev/libs/cyrus-sasl/Manifest new file mode 100644 index 00000000..43946ca8 --- /dev/null +++ b/dev/libs/cyrus-sasl/Manifest @@ -0,0 +1,24 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +DIST cyrus-sasl-2.1.23.tar.gz 1613642 MD5 2eb0e48106f0e9cd8001e654f267ecbc RMD160 b2cd9734fa8b4bad82663517f019f9b92d9d3519 SHA1 5df33a6788d6cd8329b109eff777c6cfae1a21bd SHA256 20efcc4040cbab6e89a636a07dcf5720ee07b5c62359a4e7bf2500ef6020b136 SHA512 bf72db55fefe9eccfe4a12caf1160efc80aba98f8acc2743af360fda96659a3ee1fc3a5af6104b3dfc8fc4571f4e98526b9719a6cdf0948980cf76a9cb1a2b0e +MISC rc.saslauthd.new 1169 MD5 55bd59e6700b0d10b5caba7071ed1f99 RMD160 7574bdc35a5b81db2dd4df9c721a8984efb822ac SHA1 26432c67e25054c766d896caf50f252003db6b31 SHA256 b38e63eb33e1abece6b03102050efeced966d983b515cbef864fe80ca10476d4 SHA512 4c520d7e6e5225d285f59c66692934767f98faaa1d53d47d8243ede0ff346b2a2c3219f9daf79a7522729e82b08bf76b98efc688d2c50fb8497c30d5c91b0a63 +MKBUILD cyrus-sasl.mkbuild 3102 MD5 260a85dc2e861d3c8e23b13622949b82 RMD160 a2dcc40c0e2e2cdafb24905d44a112e91b8f1e6b SHA1 7cb1626f56c6f6398ac66aa257e37ee9aa069834 SHA256 387d9fad33961e0fa59316dcd2b527875ecef26b3cd2ba440b9b1f6d6793775e SHA512 df68dd1ba843a1aa898886dc2a2a4d8b2f956bc621b087803a69a9c269404ff38341d69eb87539a619914388783b79314c1d0d674c7aecec8b32ba00210d9d3a +SLACKBUILD cyrus-sasl.SlackBuild 9599 MD5 1d70665f8c7ec173ec2626d0a203c563 RMD160 fa042cc18beb0ebce7fbb15a59a21543475bdc06 SHA1 3f5acb759277adb069fcc204e4a7342ff5bb7fcb SHA256 4eb10d42cbe597b6c5152caed510d4781165a38e32114fc4e26c1497670920ab SHA512 a535b1cf3f45251bdc5ce3249e720bfff2d9fab777426bbb3a1abeed525e3ae9e6d11ee1d2a84d0e9939da10170a3a77126abdd89e78ac698056fb5b21fffcc1 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.9 (GNU/Linux) + +iQIcBAEBCAAGBQJKWpOhAAoJEEHL93ESzgeiNj8QAJ0Hb/lewmmQt+UD3JfCR8St +cIrcGn7kb2UrA/eGd0vIjy76/XO/peXDuF5EMqDFwWyMGdHwmt6SQw8O58T7FNyL +3NrKeUHEdzI1abblQvrUIjhO+RTqS4+My1lQMCU94BQK8lss8XnoDnpfhjdeIddS +GDcWogCJPjcB3UvGknkMqP/Jy1waz+cMIAxB83pcOhf45mzvPOwzY9vGSc8a7GSd +C+5moUt3PUeICWLUdU2w7hDmr3tmk3b1AT1gjBRyUNWHo1xac7UYuatjSf9XEn0Y +Jo0RFp3FHiRSlLq7nS2VgS5Ab9k+fWFZHV507zakJidaHtoYMoYsYLcYiH2YbdmB +2L/0cBwtTst6CdQBb1idvEjQ0LRKUoXpl/tZbsPwNeT4C1n2qZZAWZM6wiEcjxFe +ZuV2K8N6QwCUL150ChaOeTeLUcPHt05iCps8jfTnZUwyGMhOudZHe9O6OQ39VKM/ +eRPNxLPAqsli9QFj7INdUeiiF9FTEIBKbSNaM4WgimtTnt0HCBh3CA7JedjvkOCS +y6GH9ZfiWNVREtrWEzKLQglKUTNAg5ZGt/4kih8UuR3Z3hKu4o/5MBDZ3IUn56jt +h/fUVLeTUWWoLeo8J0cWnW9+L7iTJLH4SQtnBPr5w1OY2iBtIxk+QAJDS2yu0b72 +XkWdTrNLe8DoKNQP4RNQ +=8qt3 +-----END PGP SIGNATURE----- diff --git a/dev/libs/cyrus-sasl/cyrus-sasl.SlackBuild b/dev/libs/cyrus-sasl/cyrus-sasl.SlackBuild index a70a2b29..17123def 100755 --- a/dev/libs/cyrus-sasl/cyrus-sasl.SlackBuild +++ b/dev/libs/cyrus-sasl/cyrus-sasl.SlackBuild @@ -10,13 +10,14 @@ # 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 +# 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 cyrus-sasl, by Silvio Rhatto # requires: -# tested: cyrus-sasl-2.1.22 +# tested: cyrus-sasl-2.1.23 +# model: generic.mkSlackBuild $Rev: 805 $ # # Look for slackbuildrc @@ -31,13 +32,14 @@ CWD="$(pwd)" SRC_NAME="cyrus-sasl" PKG_NAME="cyrus-sasl" ARCH=${ARCH:=i486} -SRC_VERSION=${VERSION:=2.1.22} +SRC_VERSION=${VERSION:=2.1.23} PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" BUILD=${BUILD:=1rha} SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME TMP=${TMP:=/tmp} PKG=${PKG:=$TMP/package-$PKG_NAME} REPOS=${REPOS:=$TMP} +SLACKBUILD_PATH=${SLACKBUILD_PATH:="dev/libs/cyrus-sasl"} PREFIX=${PREFIX:=/usr} PKG_WORK="$TMP/$SRC_NAME" CONF_OPTIONS=${CONF_OPTIONS:="--sysconfdir=/etc --with-authdaemond=/usr/sbin/authdaemond"} @@ -47,9 +49,9 @@ NUMJOBS=${NUMJOBS:=""} LIBDIR="$PREFIX/lib" if [ "$ARCH" = "i386" ]; then - SLKCFLAGS="-O2 -march=i386 -mcpu=i686" + SLKCFLAGS="-O2 -march=i386 -mtune=i686" elif [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mcpu=i686" + SLKCFLAGS="-O2 -march=i486 -mtune=i686" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686" elif [ "$ARCH" = "s390" ]; then @@ -57,6 +59,7 @@ elif [ "$ARCH" = "s390" ]; then elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" fi # Set error codes (used by createpkg) @@ -64,6 +67,7 @@ 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_VCS=41; ERROR_MKDIR=42 +ERROR_MANIFEST=43; # Clean up any leftovers of previous builds rm -rf "$PKG_WORK" 2> /dev/null @@ -127,10 +131,76 @@ echo Checking $SRC_DIR/$SRC with gpg using $SRC_DIR/$SIGNATURE... gpg --verify "$SRC_DIR/$SIGNATURE" "$SRC_DIR/$SRC" || exit $ERROR_GPG echo Success. +# Check Manifest file +if [ -e "$CWD/Manifest" ]; then + + # 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 + + 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 + +else + exit $ERROR_MANIFEST +fi + # 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 $8 }'`" +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" cd "$PKG_SRC" # Configure @@ -170,9 +240,9 @@ done 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 +# 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 +# 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 ':'. @@ -191,10 +261,14 @@ cyrus-sasl-ldap: EODESC # 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 @@ -210,7 +284,7 @@ mkgroup() { if ! grep -qe "^\$GROUP:" etc/group; then echo Creating group \$GROUP... chroot . /usr/sbin/groupadd \$GROUP - fi + fi } mkuser() { @@ -231,9 +305,10 @@ EOSCRIPT # Build the package cd "$PKG" -makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG +mkdir -p $REPOS/$SLACKBUILD_PATH +makepkg -l y -c n "$REPOS/$SLACKBUILD_PATH/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG # Delete source and build directories if requested -if [ "$CLEANUP" == "yes" ]; then +if [ "$CLEANUP" == "yes" ] || [ "$1" = "--cleanup" ]; then rm -rf "$PKG_WORK" "$PKG" fi |