diff options
author | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2010-02-27 15:11:14 +0000 |
---|---|---|
committer | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2010-02-27 15:11:14 +0000 |
commit | 979dd19f7b8e10d1e6e245dc44a5ff53664cac47 (patch) | |
tree | 14b03fc66258979ea9943a4162e536b6c5d6b69c | |
parent | 06c3396bce4418c7aab513fc9c0f44ebd30b1912 (diff) | |
download | slackbuilds-979dd19f7b8e10d1e6e245dc44a5ff53664cac47.tar.gz slackbuilds-979dd19f7b8e10d1e6e245dc44a5ff53664cac47.tar.bz2 |
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@2273 370017ae-e619-0410-ac65-c121f96126d4
-rw-r--r-- | net/im/bitlbee/Manifest | 25 | ||||
-rwxr-xr-x | net/im/bitlbee/bitlbee.SlackBuild | 99 |
2 files changed, 106 insertions, 18 deletions
diff --git a/net/im/bitlbee/Manifest b/net/im/bitlbee/Manifest new file mode 100644 index 00000000..ec71d32d --- /dev/null +++ b/net/im/bitlbee/Manifest @@ -0,0 +1,25 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +DIST bitlbee-1.2.4.tar.gz 483115 MD5 26b9bfc5446bdf0e932e8074d117be67 RMD160 d18221ada6c99184e5c8e1d2c8292a4f577d51d0 SHA1 fa1e8a1f278cf566be2af4849e9c70a830153dd7 SHA256 c2f5f464dd44ab77435eb621e623780937b4a150a271d99d71b8079403948cd3 SHA512 c6d4e4c942e9ee527c541c491e30740bab303a0b2e146e535846393400f6c8ede166108cfbd350d5eab9026aa2ec927f54c7d139be196d13ea6e72edf6e956ef +MKBUILD bitlbee.mkbuild 3221 MD5 dce1cbd0a8933066c535deeefa358961 RMD160 5d83ebfb3add949e58a53d6fbda516427a9e7edb SHA1 8a615d3276cde0b61825fa025b1bea36bda65577 SHA256 4af815e0fcc28bf3d4d4908031572d34fbb2e06427489072352b88d1566f04e0 SHA512 73c285f720a6b7b569a2ea487dc77cb649f41ebe538940a98f2bfe81f1d630785e90af90db8ace3cdf25b08d7a180f02580977cd3916476b1c6b42d28735d843 +PATCH bitlbee-1.2.1-x86_64.diff 528 MD5 6123a83749230181bcc1677e0afee358 RMD160 97a5fdd8d0d898cee04b57f8a22b29402f0d791e SHA1 21d20514a16a3ce362d8ddb6e5fff91e0807f4fe SHA256 d6293291cec755d35fc4c84890be13c00ccf4fe9966be0acbd697e25a099253f SHA512 c76b72428f05f58679171f27a277b276e62b9df4e354b64ef5e85a8e816fd100ce1616d0349557f6639946520f8094f396a79dc56ec10770374acd6bcd32daed +SLACK-REQUIRED slack-required 78 MD5 39bb3ed51fbea82905aa7e4fb5563e55 RMD160 265dff060add39820dc80b7eb9758149bf7e8956 SHA1 9a1be276dc7f122156a040079ec2eba8728f2a52 SHA256 c0669c3f53b6594050cf318734bf3dce10b08b72dc1131a25df738e3b8f1b731 SHA512 74e45884855fd1b729215440ca288046480b9df00c9539c9e08ac87a0be60db5f2e23e1648ab105f05c3a853d1b97b49a57b378336a1ed420d677fb10748298c +SLACKBUILD bitlbee.SlackBuild 9481 MD5 69373b4e83874214fedd0cd22f0ea203 RMD160 ffea5ef2fce37dc065fd45eb18121feb7b8d8f35 SHA1 0dfb4722798b942f6e3a908834579d0f8aabbc00 SHA256 e3e87f52b469622b08e6e3e34a7fff7af7f8624b034d8bec468e5eaa21ec9870 SHA512 6066c0c51e6a4b8a779209a1b0225702b2420544c9cd3d9dfa59d580988e2af3831a8b173edb2ede088cc00d0511644bb6544050bd7817dd2a973c1e9f00c715 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.9 (GNU/Linux) + +iQIcBAEBCAAGBQJLiTMEAAoJEEHL93ESzgeiFesP/RUmbXGACSrJLKFQGBVVb4MA +FQ4kilc3meKZy6gc9eHfWYs6+9pDuKIjnDz538tdvIxGPK1xNm4UVvh77G6zCA9e +yuvKQFYR/3a6WNysPzrR5lqHFGElFx3wmIlt/ynYW2Sy3cSkOmGndc1z6kVhEXzY +akTt5ZSpL1qu4zycEDr/wgm3bEEnewC5e0VWA0x7gzuxeQY83XahyC3RtP/M/2+Q +8rgJ+g5HLvLjNcb7wUp0W8nPVhOuToZpt3bnp/JOFJGC9vgfWf1eCA+ZN0CHgaBG +c2oHtk6Efai1hltVl4dmVCDKE/gZu15ZtfSY2vxPF0zV8GUBWsW3KcaobY3NMh96 +tpSWv/KgxOkcL6RNjZptscbPpFcA6TxEtmmxrxHAm+GjDYWR+kaNu6/ntpZVoB0W +6RG7C6KWOuVfWp8HT4Z9A6meoAGWICT1moYIiRM2VOYGWBB0+UsSI6SAZWDA07Ua +PDH6wqOZgsWmz1FxL0Iv9fUo90NBEaZ9F1fip2fpizzCdt8lUWZ875tIyJw9OUkt +7XgWCPBWDDpA++FeQAL2Q/7abr7VReXOXDkj24rXMt/JgL7nJvWoCga4yvzfOdMP +R7Fl9y46OFE8xWWzWZKH9bn0QKrOYI4m4FG3stY3zZX/ywA2OFniaCzvBWvgNNc+ +3mdP/uQqNNClCiaAvqdY +=c9SB +-----END PGP SIGNATURE----- diff --git a/net/im/bitlbee/bitlbee.SlackBuild b/net/im/bitlbee/bitlbee.SlackBuild index 33d99982..b2934fc4 100755 --- a/net/im/bitlbee/bitlbee.SlackBuild +++ b/net/im/bitlbee/bitlbee.SlackBuild @@ -15,8 +15,9 @@ # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # # slackbuild for bitlbee, by Silvio Rhatto -# requires: gnutls -# tested: bitlbee-1.2.3 +# requires: +# tested: bitlbee-1.2.4 +# model: generic.mkSlackBuild $Rev: 824 $ # # Look for slackbuildrc @@ -31,13 +32,14 @@ CWD="$(pwd)" SRC_NAME="bitlbee" PKG_NAME="bitlbee" ARCH=${ARCH:=i486} -SRC_VERSION=${VERSION:=1.2.3} +SRC_VERSION=${VERSION:=1.2.4} 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:="net/im/bitlbee"} PREFIX=${PREFIX:=/usr} PKG_WORK="$TMP/$SRC_NAME" CONF_OPTIONS=${CONF_OPTIONS:="--etcdir=/etc/bitlbee"} @@ -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 @@ -65,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 @@ -84,6 +87,72 @@ if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET fi +# 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 @@ -91,10 +160,11 @@ PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" cd "$PKG_SRC" # Patch source -patches=" +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 @@ -103,15 +173,7 @@ for patch in $patches; do 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 - fi -done - -if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then - for patch_url in [[PATCH URLS]]; do - patch="`basename $patch_url`" - if [ ! -s "$SRC_DIR/$patch" ]; then - wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET - fi + 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 @@ -119,8 +181,8 @@ if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then else patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH fi - done -fi + fi +done # Configure CFLAGS="$SLKCFLAGS" \ @@ -233,7 +295,8 @@ fi mkdir -p $PKG/etc/bitlbee cp bitlbee.conf $PKG/etc/bitlbee/bitlbee.conf.new 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" ] || [ "$1" = "--cleanup" ]; then |