From da54a35be17ef4846797cdd824fba3f8e7443216 Mon Sep 17 00:00:00 2001 From: rhatto Date: Sun, 20 Sep 2009 15:05:35 +0000 Subject: 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 --- app/misc/gwhere/Manifest | 23 ++++ app/misc/gwhere/gwhere.SlackBuild | 223 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 246 insertions(+) create mode 100644 app/misc/gwhere/Manifest create mode 100644 app/misc/gwhere/gwhere.SlackBuild (limited to 'app') diff --git a/app/misc/gwhere/Manifest b/app/misc/gwhere/Manifest new file mode 100644 index 00000000..616d5e1b --- /dev/null +++ b/app/misc/gwhere/Manifest @@ -0,0 +1,23 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +DIST gwhere-0.2.2.tar.gz 1284775 MD5 838db0e07214f324420e8a87baf540ad RMD160 d024318c1c36d7e447f88a555fb268fb03391b1a SHA1 3b8f5f2b4df893734ee95ec8193f66baad4fdc4a SHA256 0f67e8863ba24dd7f8b0b50b91d6e8167c924546293e1ffc3c673c04417c73ef SHA512 383303c7fd946ff255f9d629f72f6800c1763fcdfbf553b6db2922f01b3086794b274ef60851507d1834790fbbbd69599dc6a072ca60487e711c51d9a78125dc +MKBUILD gwhere.mkbuild 5082 MD5 02a869f19972024f97d50677596586c4 RMD160 15cdea5c3a4e8757a831a911b996bf6d5d15f215 SHA1 cb3ee56c73f3243331a1b3e5d93c2fd18dfad19c SHA256 801bbaa45c8f522eff35e14ffcb3cdbce844cbbd786a8f1fd70f23ab5098a865 SHA512 199dc2c07d24fccc9b08aa8774ef1adeb6c43b01d9b5f73d5488e9216159a8fb15b8c46140c12a2cc91dd0ed61445f42e0f16d7e423a60dcd656c9011355ea43 +SLACKBUILD gwhere.SlackBuild 7121 MD5 a32dc1fa1e4efd7a8d42dab73fbbdb99 RMD160 369a6f1e75d843abc458fda1d06534b166b30cf6 SHA1 b4314adbf9c40f91b65f55af78e813c06f18b2c1 SHA256 607e4cdc0a408ce2e83938da18526d18ebbde68393550ea548c68592aea57691 SHA512 1dcc83a1265d0d144585e63a1b5b0ab50a2b9b6a07489ec92173b4c8cf4de07fd04c405f84c5974e50f825e759e2a29e8250695c180cb88192e390e654c72fb6 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.9 (GNU/Linux) + +iQIcBAEBCAAGBQJKtjPZAAoJEEHL93ESzgeirZoP/jFuSJD2UvNtMrgLGgh2O+lj +5UJIjBO9HQRhJdo498TjF08o045EEzaIBWKsGpHZAEiWI/nrr4gkMq5ntuwW5/Rv +ybfDjsVPaK5JK4aaDAkPfElk2Q2TaAazDG6qypDHeT+GcocnCzj95lXsGJn7Mpi5 +eEx3CYSuGZ+766HfU/eBPFOwhuiOfZqTjYU/mxssDDuCxur2tacH3qlo8p2yG0qz +wysoEiKfvqLC5VQcfC1V2zZZuB3OnnBb6Eu4eXRKHFaAH8+TzW27dgRPEEebtOic +7+4627u0wo4p4+4yKEobo/EOETLrZw8G/5zQaX2A5n9CylNFH5t0Hy2K0aKK/vRx +SAFpcGHgTVSR13SZa1xW5tNuB3Hxc5J6c9OyTBihw/jznQSDgjlvO2M5NRMaemog +rSMolaNaHoHcbpY75xh1CgEXD30+Z9eRUjaiZOfCEDssXZVtOh0zf/QKvBKbivkL +HHyZznYbeKNy68Lpo4OgosT3REHPLYSzstSRAcpGwqJgRVTX0QJmUJVCgSq33/eg +/+kOMlnJxlNiVZQo4Sk23ToUzC2mZA47sxTf7Oa0krNssfA7q4se3do7icFRMrZI +lQryYHh9JtpHLly61yX9ZlzeR88OMAZfqy117leRICpwLQha7MD8qcRxDMEoBAHG +f+S6ebOEdj/5XW/a0n0T +=ssXh +-----END PGP SIGNATURE----- diff --git a/app/misc/gwhere/gwhere.SlackBuild b/app/misc/gwhere/gwhere.SlackBuild new file mode 100644 index 00000000..93693a31 --- /dev/null +++ b/app/misc/gwhere/gwhere.SlackBuild @@ -0,0 +1,223 @@ +#!/bin/bash +# +# gwhere.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. +# +# gwhere.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 gwhere, by Alexandre Vieira de Souza +# requires: +# tested: gwhere-0.2.2 +# model: generic.mkSlackBuild $Rev: 808 $ +# + +# Look for slackbuildrc +if [ -f ~/.slackbuildrc ]; then + source ~/.slackbuildrc +elif [ -f /etc/slackbuildrc ]; then + source /etc/slackbuildrc +fi + +# Set variables +CWD="$(pwd)" +SRC_NAME="gwhere" +PKG_NAME="gwhere" +ARCH=${ARCH:=i486} +SRC_VERSION=${VERSION:=0.2.2} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" +BUILD=${BUILD:=1avs} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME +TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} +REPOS=${REPOS:=$TMP} +SLACKBUILD_PATH=${SLACKBUILD_PATH:="app/misc/gwhere"} +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 + +# 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_VCS=41; ERROR_MKDIR=42 +ERROR_MANIFEST=43; + +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null + +# 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="ftp://ftp2.gwhere.org/gwhere/download/source/$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 +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Configure +CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF + +# Compile +make $NUMJOBS || exit $ERROR_MAKE + +# Install +make install DESTDIR="$PKG" || 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 +) + +# Install documentation +DOCS="NEWS TODO README AUTHORS INSTALL ChangeLog MAINTAINERS COPYING LICENSE SIGNATURE readme.*" +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 + +# 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-------------------------------------------------------| +gwhere: Gwhere by Slack.Sarava +gwhere: +gwhere: GWhere allows you to manage a catalog of your CDs and any other +gwhere: removable media (such as hard disks, floppy disks, Zip disks, +gwhere: CD-ROMs, etc...) indexed in a database. With GWhere it is easy to +gwhere: browse your CDs or to make a quick search without needing to +gwhere: insert each CD one after another. +gwhere: +gwhere: +gwhere: by avs +gwhere: +EODESC + +# 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 + +# Delete source and build directories if requested +if [ "$CLEANUP" == "yes" ] || [ "$1" = "--cleanup" ]; then + rm -rf "$PKG_WORK" "$PKG" +fi -- cgit v1.2.3