aboutsummaryrefslogtreecommitdiff
path: root/patches/glib2
diff options
context:
space:
mode:
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2009-09-20 15:05:35 +0000
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2009-09-20 15:05:35 +0000
commitda54a35be17ef4846797cdd824fba3f8e7443216 (patch)
treeb5bcc381270387bcc6ad8fcc482d14cf6fafea85 /patches/glib2
parent61d099994c5ba0b1a79e2fca5c5100603f97b56e (diff)
downloadslackbuilds-da54a35be17ef4846797cdd824fba3f8e7443216.tar.gz
slackbuilds-da54a35be17ef4846797cdd824fba3f8e7443216.tar.bz2
gwhere: adding gwhere; avahi: updating; arno-iptables-firewall: adding arno-iptables-firewall; glib2: updating; orbit: updating; afterstep: updating
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@2243 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'patches/glib2')
-rw-r--r--patches/glib2/Manifest23
-rw-r--r--patches/glib2/glib2.SlackBuild86
2 files changed, 101 insertions, 8 deletions
diff --git a/patches/glib2/Manifest b/patches/glib2/Manifest
new file mode 100644
index 00000000..07443a93
--- /dev/null
+++ b/patches/glib2/Manifest
@@ -0,0 +1,23 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+DIST glib-2.20.5.tar.gz 7207305 MD5 59dc2682bb4f94aa9585a541369a4543 RMD160 085043b7201298fad1d817059ae92aa26bb39250 SHA1 23ff228ad5b6816f70938ef785b25ed83ae99d6f SHA256 9462c43b1bb54042103c541ed38af9e5ec7ecdbfd2c912ff51ef759385cac8ea SHA512 18b5122e6a4fc294a6602acb305b85b1a10648925d9b7edeee91e6594bc7d199abf437b66e4dfdd5d249b4f1b747c0eb15f0def5d9b5ac46615a39f2cef6aa55
+MKBUILD glib2.mkbuild 4296 MD5 787c819281de6a269284f16f9681361a RMD160 8fbd30af89ac90354005a98292bce79393f01aab SHA1 6d107d390304e603ed60d94d74917b0ef0cec875 SHA256 f36303ef54180a667894c56076f80b2574db5015c394f930fafbd23f4743df3d SHA512 c93d4b8a32c3fe601ee2b16716cd460668194a943118206eae6f97fc1c223fdf7988f0190d1a0d87de4633cd061683eaeb3c8985dbe62c9d0f295837a568fdfd
+SLACKBUILD glib2.SlackBuild 6977 MD5 0af5f0ae36ededcdce27843439a17671 RMD160 bcc44f554a665af8ec69a123eef7cc2d5a6be8e1 SHA1 a0c624f7a05cd891eb5e74dd58822236c6dec41a SHA256 2ac1246e1d71fa8c9fd695c058482101bc36e9ad0ab78af74e8548ffc1a8ef25 SHA512 e35da80f99f3dab4370ff5e6e9d5136cda9abca53a2921241c20faf36d0b671660c03951e9e8a74d3250836c7c434a82732c40f76f6a0b3360232cd7905c6d14
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+iQIcBAEBCAAGBQJKtkNLAAoJEEHL93ESzgeiIXQQALEl2n4dVAJ3gHQkyoizRsPY
+KGjoxWbtyfOtdofNpOJuUhrs50op9vYxj7e1V7X325AyawJ6NpG5H/IUBvxGUbJe
+U5sWzC1pZv5skIg+dTaD5Ss503SycjBMMUTzY3CM9ts5+n/ZLK4LlfVt6NWufK6P
+G7xcaZ8h6BXanjFYy60Qd0p5yeOuLpCAuMvXlVBpigfHa6HhvEy6YarQCv6NvL8V
+jD1Ea6/A3L5tsMN9r7eQubizoSyhh9F38SN/Gw8PfpB+84AGwsqDapyIfzOl6g1/
+59UIRLXtIBP/3lF+Ae9BtlYgEV1AZ6hDIjnFQlj15cUWOvGJ5Ov8syjXrVf39d85
+K43gGFSqtj/V90h241qOlrcQ95/0q3R/NQofxRSiWIzUcxTT80m5A1LcojisPG46
+NUhyQIw1fDK0VfubicaXs87PDKqnqvupAT9RaYKI9u+yPn3V+HZqDNGNByeeE+D9
+Z3euGpISAwN9jiIqymWYYa9Z0v5JB1j2dHnO34DVvrKPQ489JnWaHBIWePdrKyRL
+IArPd4U6KCVktpJwfyY2AYIivH+1wNM4SbmXvkNKMSHy+o3ovV+Zvc/ekTPDilE7
+iLPg/RiKNMznt1S5+HefQ8cFc56HRusD9G06rApPUl/81t+WoicR5MzxHGcEcoaP
+p9gJqWA8Y+MKLJ/czPRZ
+=/nba
+-----END PGP SIGNATURE-----
diff --git a/patches/glib2/glib2.SlackBuild b/patches/glib2/glib2.SlackBuild
index a365b92c..6d1ea5d3 100644
--- a/patches/glib2/glib2.SlackBuild
+++ b/patches/glib2/glib2.SlackBuild
@@ -16,7 +16,8 @@
#
# slackbuild for glib2, by Rafael Diniz
# requires:
-# tested: glib2-2.16.3
+# tested: glib2-2.20.5
+# model: generic.mkSlackBuild $Rev: 808 $
#
# Look for slackbuildrc
@@ -31,25 +32,26 @@ CWD="$(pwd)"
SRC_NAME="glib"
PKG_NAME="glib2"
ARCH=${ARCH:=i486}
-SRC_VERSION=${VERSION:=2.16.3}
+SRC_VERSION=${VERSION:=2.20.5}
PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')"
BUILD=${BUILD:=1rd}
SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME
TMP=${TMP:=/tmp}
PKG=${PKG:=$TMP/package-$PKG_NAME}
REPOS=${REPOS:=$TMP}
+SLACKBUILD_PATH=${SLACKBUILD_PATH:="patches/glib2"}
PREFIX=${PREFIX:=/usr}
PKG_WORK="$TMP/$SRC_NAME"
-CONF_OPTIONS=${CONF_OPTIONS:=""}
+CONF_OPTIONS=${CONF_OPTIONS:="--with-libiconv=gnu"}
NUMJOBS=${NUMJOBS:="-j3"}
# Set system libraries' path and optmization flags based on $ARCH
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
@@ -78,12 +81,78 @@ mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR
# Dowload source if necessary
SRC="$SRC_NAME-$VERSION.tar.gz"
-URL="http://ftp.gnome.org/pub/GNOME/sources/glib/2.16/$SRC"
+URL="http://ftp.gnome.org/pub/GNOME/sources/glib/2.20/$SRC"
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
@@ -145,9 +214,10 @@ EODESC
# 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