summaryrefslogtreecommitdiffstats
path: root/source/a/usb_modeswitch
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/usb_modeswitch')
-rw-r--r--source/a/usb_modeswitch/device_reference.txt14
-rw-r--r--source/a/usb_modeswitch/slack-desc10
-rwxr-xr-xsource/a/usb_modeswitch/usb_modeswitch.SlackBuild42
3 files changed, 40 insertions, 26 deletions
diff --git a/source/a/usb_modeswitch/device_reference.txt b/source/a/usb_modeswitch/device_reference.txt
index d34ec3ed0..d3065d9ea 100644
--- a/source/a/usb_modeswitch/device_reference.txt
+++ b/source/a/usb_modeswitch/device_reference.txt
@@ -1,16 +1,16 @@
#
# Device Reference (UTF-8 encoding used)
#
-# Last modified: 2014-05-29
+# Last modified: 2017-02-05
#
# Collection of configurations for usb_modeswitch, a mode switching
# tool for controlling flip flop (multiple mode) USB devices
#
# Detailed instructions and a friendly forum on the homepage:
# http://www.draisberghof.de/usb_modeswitch
-#
-# You may want to check for a newer version of this file at:
-# http://www.draisberghof.de/usb_modeswitch/device_reference.txt
+#
+# Note that new devices are no longer added to this file. See the
+# config files included with the data package for these
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
@@ -21,9 +21,10 @@
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
-# For a parameter reference see file REFERENCE in the data package
+# For a parameter reference see file REFERENCE in the data package or
+# http://www.draisberghof.de/usb_modeswitch/parameter_reference.txt
#
-# If you find working codes and configurations, please contribute
+# If you find new working codes and configurations, please report
# them!
@@ -31,6 +32,7 @@
#######################################################
# Option GlobeSurfer Icon (aka "Vodafone EasyBox")
+# This is the thing that started it all ...
#
# The MessageContent is identical for all Option devices
diff --git a/source/a/usb_modeswitch/slack-desc b/source/a/usb_modeswitch/slack-desc
index 9581428b2..378d3ae51 100644
--- a/source/a/usb_modeswitch/slack-desc
+++ b/source/a/usb_modeswitch/slack-desc
@@ -1,18 +1,18 @@
# 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
-# make exactly 11 lines for the formatting to be correct. It's also
+# 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------------------------------------------------------|
usb_modeswitch: usb_modeswitch (mode switching tool for multiple mode USB devices)
usb_modeswitch:
usb_modeswitch: USB-ModeSwitch is (surprise!) a small mode switching tool for
-usb_modeswitch: controlling "flip flop" (multiple device) USB gear. These devices
+usb_modeswitch: controlling "flip flop" (multiple device) USB gear. These devices
usb_modeswitch: initially appear to be USB storage, typically containing the MS
usb_modeswitch: Windows drivers for whatever the real purpose of the device is, such
-usb_modeswitch: as a wireless USB modem. To use these devices with Linux, they need
+usb_modeswitch: as a wireless USB modem. To use these devices with Linux, they need
usb_modeswitch: to be told to switch out of storage mode, which is the purpose of the
usb_modeswitch: USB-ModeSwitch utility.
usb_modeswitch:
diff --git a/source/a/usb_modeswitch/usb_modeswitch.SlackBuild b/source/a/usb_modeswitch/usb_modeswitch.SlackBuild
index 703222152..af59704c1 100755
--- a/source/a/usb_modeswitch/usb_modeswitch.SlackBuild
+++ b/source/a/usb_modeswitch/usb_modeswitch.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for usb_modeswitch.
-# Copyright 2010, 2012, 2013, 2015 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2010, 2012, 2013, 2015, 2017, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
# Copyright 2010 David Somero, Athens, TN, USA
# All rights reserved.
#
@@ -23,10 +23,12 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PKGNAM=usb_modeswitch
-VERSION=${VERSION:-2.2.6}
-DATAVER=${DATAVER:-20151101}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-2.5.1}
+DATAVER=${DATAVER:-20170806}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -38,10 +40,17 @@ if [ -z "$ARCH" ]; then
esac
fi
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
# Upstream is playing guess the program name.
SRCPKGNAM=$(echo $PKGNAM | tr _ -)
-CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
@@ -72,16 +81,19 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-make clean
+make clean || exit 1
# "make static" uses the embedded "jim" Tcl interpreter
-make static
+make static || exit 1
+
+make \
+ DESTDIR=$PKG \
+ MANDIR=$PKG/usr/man/man1 \
+ install || exit 1
+
+mv $PKG/etc/usb_modeswitch.conf $PKG/etc/usb_modeswitch.conf.new
-install -D -s --mode=755 usb_modeswitch $PKG/usr/sbin/usb_modeswitch
-install -D --mode=755 usb_modeswitch.sh $PKG/lib/udev/usb_modeswitch
-install -D --mode=644 usb_modeswitch.conf $PKG/etc/usb_modeswitch.conf.new
-install -D --mode=644 usb_modeswitch.1 $PKG/usr/man/man1/usb_modeswitch.1
-install -d $PKG/var/lib/usb_modeswitch
-install -D -s --mode=755 usb_modeswitch_dispatcher $PKG/usr/sbin/usb_modeswitch_dispatcher
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
# Compress and if needed symlink the man pages:
if [ -d $PKG/usr/man ]; then
@@ -103,7 +115,7 @@ cp -a \
COPYING* README* \
$PKG/usr/doc/$PKGNAM-$VERSION
# http://www.draisberghof.de/usb_modeswitch/device_reference.txt.gz
-cat $CWD/device_reference.txt.gz > $PKG/usr/doc/$PKGNAM-$VERSION/device_reference.txt
+zcat $CWD/device_reference.txt.gz > $PKG/usr/doc/$PKGNAM-$VERSION/device_reference.txt
mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION/jim
cp -a \
jim/{AUTHORS,LICENSE,README*} \