]> gitweb.fluxo.info Git - slackbuilds.git/commitdiff
gtk-doc: updating to 1.11 (thanks x-doctor)
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>
Fri, 9 Oct 2009 20:01:07 +0000 (20:01 +0000)
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>
Fri, 9 Oct 2009 20:01:07 +0000 (20:01 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@2257 370017ae-e619-0410-ac65-c121f96126d4

dev/util/gtk-doc/Manifest [new file with mode: 0644]
dev/util/gtk-doc/gtk-doc.SlackBuild

diff --git a/dev/util/gtk-doc/Manifest b/dev/util/gtk-doc/Manifest
new file mode 100644 (file)
index 0000000..c0b5334
--- /dev/null
@@ -0,0 +1,23 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+DIST gtk-doc-1.11.tar.bz2 453459 MD5 b5e268c71fa90aad890cf53715664d0a RMD160 802c61e4e2072f5e91fe65d6f40587313b7bd23b SHA1 685823e269cc08fdef50828b0a68697222877b1c SHA256 92135cdf89c48a52baa8920f69d702b22d1a7556af410709d2172b90ec33ff23 SHA512 e2d42737aa099d6e6b587ccea3ac996102a75fdc691231e8814cc7d8e52ccd4184e331a9b6492c7174cb4144a8cc5501af62a61bb9579fecb78c817089ac91a2
+MKBUILD gtk-doc.mkbuild 3892 MD5 8bc01dd38141e89abb528d9a70198539 RMD160 4b5ad8b5a9885467862c5e642155bcce73bce7ae SHA1 223fe6b1773f965bef97f3fbda847b1c80354de7 SHA256 75da261b172ec15ab52a629898f46e6b65300c88f29351c16d6cecb3f184a2e8 SHA512 cc85296c5efe3a6fa920f79a910d8bbcf5f404d6df2eba8e9d98e71b29cd978bb58c553fb9330dcc41cff04c1b55414beb07cfa2e25b80cf06388192cf544e8f
+SLACKBUILD gtk-doc.SlackBuild 7017 MD5 017f9326219325e656ea5c8ba952115d RMD160 c57c70cfb9a7072a17e9cc991e73cd64356b53b5 SHA1 ace0bf962110c8edd751611416125f5d5563a0e4 SHA256 63b4792239381bd926f5f52eb260da20873b5205c2d865d80e2d9256cb69b34b SHA512 29f4cc84fee0af43ca4ce4138e470cb2853330d45c7f25d20d15dfc2878a45b03c8723118dbcbc652b0c0f081765ddf521676cc97cfaf7950122573a88ffd46a
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+iQIcBAEBCAAGBQJKz5YIAAoJEEHL93ESzgeiQiAP+wVApMUDeuSrI8jbyrVZcUee
+J4s8sDDTHQy5HFSRQZ7/QUSzmUYLi41V6NW4V1JLFdSTpc7GCjY2Z/TgZDqo7yqD
+jVYFhIsoeRtErs62/vQcptCzQ+nnZLkUxlgrxO4j4UyDGAIaJRzP/IehoEhvOve0
+zq0ssv67bOMGTZyw35deBFuPYbSnRchKupQ3N4hzTLy54mgdx9tL1V2M10lVaiJg
+gQ0ps46sq0ipOwu+S/MAtutj1G+cK/c1zvE+qWHQTsbYPYz7L9NVxcDEnK4PxWuP
+DkpbgSNLBCdox+G+gNQZx8J1OlmM8mVPTVC0PcaMb0LRczzCXfsPKaSMFwk8nr/b
+FkIP7XbaIXVjasdlYPc7DHBG0fcwjUeDItg8uOsUXq6KQRD3pgljH1OXqZrOXYhC
+OyHSDiSReAJGVfOU4ANWhWB3tKChJxhe2JrpGvRdZBrO56FKvW/+PhmNyjKhHt6E
+/FEYazIFtEoAuRGtvSLDe/FfK9SrczZ6hj0Q2jHnYYot2iXIxtHGfFVqQ6DtnEYh
+d/Z1M7tyUPw3UgP5jpmmQNWm/vJY4mgGfjwxSQz0nrMx8uDPgIZUQEB/UEd6oCcL
+sRafxsT/r3VbDDhyrwXyXpHiHpMemvFfUNw9ZAZxVVHmaA/l9X+JfPqYXkjOHWP/
+K8kySJjihXbe0UQQHzIy
+=SEIt
+-----END PGP SIGNATURE-----
index dc01baa62e8ce3e8214f7601fd3e4c8ca39eb4ee..910cdfa3022323217348f97496ab4929709b1a01 100644 (file)
 #  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 gtk-doc, by Rudson R. Alves
 # requires:  
-# tested: gtk-doc-1.9
+# tested: gtk-doc-1.11
+# model: generic.mkSlackBuild $Rev: 808 $
 #
 
 # Look for slackbuildrc
@@ -31,13 +32,14 @@ CWD="$(pwd)"
 SRC_NAME="gtk-doc"
 PKG_NAME="gtk-doc"
 ARCH=${ARCH:=i486}
-SRC_VERSION=${VERSION:=1.9}
+SRC_VERSION=${VERSION:=1.11}
 PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')"
 BUILD=${BUILD:=1rra}
 SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME
 TMP=${TMP:=/tmp}
 PKG=${PKG:=$TMP/package-$PKG_NAME}
 REPOS=${REPOS:=$TMP}
+SLACKBUILD_PATH=${SLACKBUILD_PATH:="dev/util/gtk-doc"}
 PREFIX=${PREFIX:=/usr}
 PKG_WORK="$TMP/$SRC_NAME"
 CONF_OPTIONS=${CONF_OPTIONS:=""}
@@ -47,16 +49,17 @@ NUMJOBS=${NUMJOBS:="-j7"}
 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
   SLKCFLAGS="-O2"
 elif [ "$ARCH" = "x86_64" ]; then
-  SLKCFLAGS="-O2"
+  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
@@ -77,16 +81,82 @@ mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR
 
 # Dowload source if necessary
 SRC="$SRC_NAME-$VERSION.tar.bz2"
-URL="http://ftp.acc.umu.se/pub/gnome/sources/gtk-doc/1.9/$SRC"
+URL="http://ftp.acc.umu.se/pub/gnome/sources/gtk-doc/1.11/$SRC"
 
 if [ ! -s "$SRC_DIR/$SRC" ] || ! bunzip2 -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
-PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $8 }'`"
+PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`"
 cd "$PKG_SRC"
 
 # Configure
@@ -122,9 +192,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 ':'.
 
@@ -144,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