summaryrefslogtreecommitdiffstats
path: root/source.local/l/libmtp/libmtp.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source.local/l/libmtp/libmtp.SlackBuild')
-rwxr-xr-xsource.local/l/libmtp/libmtp.SlackBuild92
1 files changed, 49 insertions, 43 deletions
diff --git a/source.local/l/libmtp/libmtp.SlackBuild b/source.local/l/libmtp/libmtp.SlackBuild
index ed7d870..079b876 100755
--- a/source.local/l/libmtp/libmtp.SlackBuild
+++ b/source.local/l/libmtp/libmtp.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2006, 2007, 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2006, 2007, 2008, 2009, 2010, 2012, 2013 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,38 +24,39 @@
PKGNAM=libmtp
-VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-1.1.5}
+BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:-" -j7 "}
-# Automatically determine the architecture we're building on:
-MARCH=$( uname -m )
-if [ -z "$ARCH" ]; then
- case "$MARCH" in
- i?86) export ARCH=i486 ;;
- armv7hl) export ARCH=$MARCH ;;
- arm*) export ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$MARCH ;;
- esac
-fi
-
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-elif [ "$ARCH" = "armv7hl" ]; then
- SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
- LIBDIRSUFFIX=""
+if [ -e $CWD/machine.conf ]; then
+ . $CWD/machine.conf ]
+elif [ -e /etc/slackbuild/machine.conf ]; then
+ . /etc/slackbuild/machine.conf ]
else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
+ # 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
+ # Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX:
+ if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+ elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+ else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ fi
fi
case "$ARCH" in
@@ -96,13 +97,13 @@ CFLAGS="$SLKCFLAGS" \
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
-# Add udev rules:
-mkdir -p $PKG/lib/udev/rules.d
-sed -e 's/MODE="666"/GROUP="audio", MODE="0660"/' libmtp.rules \
- > $PKG/lib/udev/rules.d/90-libmtp.rules
-# Add device information for HAL:
-mkdir -p $PKG/usr/share/hal/fdi/information/20thirdparty/
-cat libmtp.fdi > $PKG/usr/share/hal/fdi/information/20thirdparty/10-libmtp.fdi
+# Commented out, since the rules are added by the Makefile, and since
+# there's no longer any match for MODE=
+#
+## Add udev rules:
+#mkdir -p $PKG/lib/udev/rules.d
+#sed -e 's/MODE="666"/GROUP="audio", MODE="0660"/' libmtp.rules \
+# > $PKG/lib/udev/rules.d/90-libmtp.rules
# Guess someone didn't have enough to drink:
( cd $PKG/usr/bin
@@ -141,13 +142,18 @@ if [ -d $PKG/usr/info ]; then
)
fi
-# Why even bother to support --docdir if you can't make it work?
-mkdir -p $PKG/usr/doc
-mv $PKG/usr/share/doc/${PKGNAM}-$VERSION $PKG/usr/doc
-rmdir $PKG/usr/share/doc
-
-# We don't need these here
-rm -f $PKG/usr/doc/${PKGNAM}-$VERSION/libmtp.{rules,sh,usermap}
+mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
+cp -a \
+ AUTHORS COPYING ChangeLog INSTALL README* TODO \
+ $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/*-$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