summaryrefslogtreecommitdiffstats
path: root/source/l/desktop-file-utils
diff options
context:
space:
mode:
Diffstat (limited to 'source/l/desktop-file-utils')
-rwxr-xr-xsource/l/desktop-file-utils/desktop-file-utils.SlackBuild30
-rw-r--r--source/l/desktop-file-utils/desktop-file-utils.quiet.warnings.diff18
2 files changed, 44 insertions, 4 deletions
diff --git a/source/l/desktop-file-utils/desktop-file-utils.SlackBuild b/source/l/desktop-file-utils/desktop-file-utils.SlackBuild
index 86d62f239..8beccbd5b 100755
--- a/source/l/desktop-file-utils/desktop-file-utils.SlackBuild
+++ b/source/l/desktop-file-utils/desktop-file-utils.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2006, 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2006, 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +22,20 @@
PKGNAM=desktop-file-utils
-VERSION=${VERSION:-0.15}
-ARCH=${ARCH:-x86_64}
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-2}
+
NUMJOBS=${NUMJOBS:-" -j7 "}
-BUILD=${BUILD:-1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
CWD=$(pwd)
TMP=${TMP:-/tmp}
@@ -37,6 +47,8 @@ elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
fi
rm -rf $PKG
@@ -46,6 +58,8 @@ rm -rf ${PKGNAM}-${VERSION}
tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z* || exit 1
cd ${PKGNAM}-$VERSION || exit 1
+zcat $CWD/desktop-file-utils.quiet.warnings.diff.gz | patch -p1 --verbose || exit 1
+
# Make sure ownerships and permissions are sane:
chown -R root:root .
find . \
@@ -100,6 +114,14 @@ cp -a \
AUTHORS COPYING* INSTALL NEWS README* \
$PKG/usr/doc/${PKGNAM}-$VERSION
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
diff --git a/source/l/desktop-file-utils/desktop-file-utils.quiet.warnings.diff b/source/l/desktop-file-utils/desktop-file-utils.quiet.warnings.diff
new file mode 100644
index 000000000..8e1f17f96
--- /dev/null
+++ b/source/l/desktop-file-utils/desktop-file-utils.quiet.warnings.diff
@@ -0,0 +1,18 @@
+--- ./src/update-desktop-database.c.orig 2010-03-09 20:33:41.000000000 -0600
++++ ./src/update-desktop-database.c 2010-05-11 09:00:08.000000000 -0500
+@@ -135,15 +135,9 @@
+ case MU_VALID:
+ break;
+ case MU_DISCOURAGED:
+- udd_print (_("Warning in file \"%s\": usage of MIME type \"%s\" is "
+- "discouraged (%s)\n"),
+- desktop_file, mime_types[i], valid_error);
+ g_free (valid_error);
+ break;
+ case MU_INVALID:
+- udd_print (_("Error in file \"%s\": \"%s\" is an invalid MIME type "
+- "(%s)\n"),
+- desktop_file, mime_types[i], valid_error);
+ g_free (valid_error);
+ /* not a break: we continue to the next mime type */
+ continue;