summaryrefslogtreecommitdiff
path: root/source/l/libusb
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2010-05-19 08:58:23 +0000
committerEric Hameleers <alien@slackware.com>2018-05-31 22:43:05 +0200
commitb76270bf9e6dd375e495fec92140a79a79415d27 (patch)
tree3dbed78b2279bf9f14207a16dc634b90995cbd40 /source/l/libusb
parent5a12e7c134274dba706667107d10d231517d3e05 (diff)
downloadcurrent-b76270bf9e6dd375e495fec92140a79a79415d27.tar.gz
Slackware 13.1slackware-13.1
Wed May 19 08:58:23 UTC 2010 Slackware 13.1 x86_64 stable is released! Lots of thanks are due -- see the RELEASE_NOTES and the rest of the ChangeLog for credits. The ISOs are on their way to replication, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. We are taking pre-orders now at store.slackware.com, and offering a discount if you sign up for a subscription. Consider picking up a copy to help support the project. Thanks again to the Slackware community for testing, contributing, and generally holding us to a high level of quality. :-) Enjoy!
Diffstat (limited to 'source/l/libusb')
-rwxr-xr-xsource/l/libusb/libusb.SlackBuild109
-rw-r--r--source/l/libusb/slack-desc6
2 files changed, 91 insertions, 24 deletions
diff --git a/source/l/libusb/libusb.SlackBuild b/source/l/libusb/libusb.SlackBuild
index 90db52ff..67d0756a 100755
--- a/source/l/libusb/libusb.SlackBuild
+++ b/source/l/libusb/libusb.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,9 +21,22 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-VERSION=${VERSION:-0.1.12}
-ARCH=${ARCH:-x86_64}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-1.0.6} # libusb version
+USBCOMPAT=${USBCOMPAT:-0.1.3} # libusb-compat version
+
+BUILD=${BUILD:-1}
+
+NUMJOBS=${NUMJOBS:--j6}
+
+# 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}
@@ -38,20 +51,60 @@ elif [ "$ARCH" = "s390" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
rm -rf $PKG
-mkdir -p $PKG
+mkdir -p $TMP $PKG
+
+# First we'll do the main libusb stuff
cd $TMP
rm -rf libusb-$VERSION
-tar xzvf $CWD/libusb-$VERSION.tar.gz
+tar xvf $CWD/libusb-$VERSION.tar.bz2
cd libusb-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
-# We used to apply a Debian patch here, and it's possible
-# that other archs need it still, but vanilla upstream is
-# working on ia32 just fine.
-#zcat $CWD/libusb_0.1.12-2.diff.gz | patch -p1
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/libusb-$VERSION \
+ --disable-static \
+ --build=$ARCH-slackware-linux
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG
+if [ ! -r /usr/lib${LIBDIRSUFFIX}/pkgconfig/libusb-1.0.pc ]; then
+ # We have to install this to proceed:
+ make install
+fi
+
+mkdir -p $PKG/usr/doc/libusb-$VERSION
+cp -a \
+ AUTHORS COPYING INSTALL NEWS PORTING README THANKS TODO \
+ $PKG/usr/doc/libusb-$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/libusb-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+# Now build the libusb-compat stuff
+cd $TMP
+rm -rf libusb-compat-$USBCOMPAT
+tar xvf $CWD/libusb-compat-$USBCOMPAT.tar.bz2
+cd libusb-compat-$USBCOMPAT
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -62,14 +115,34 @@ find . \
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX}
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/libusb-$VERSION \
+ --disable-static \
+ --build=$ARCH-slackware-linux
-make -j3 || exit 1
+make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG
+mkdir -p $PKG/usr/doc/libusb-$VERSION/libusb-compat-$USBCOMPAT
+cp -a \
+ AUTHORS COPYING INSTALL LICENSE NEWS README \
+ $PKG/usr/doc/libusb-$VERSION/libusb-compat-$USBCOMPAT
+
+# 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/libusb-compat-$USBCOMPAT)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+# Now handle the package-wide stuff
( 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
+ 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
)
# Compress and if needed symlink the man pages:
@@ -87,15 +160,9 @@ if [ -d $PKG/usr/man ]; then
)
fi
-mkdir -p $PKG/usr/doc/libusb-$VERSION
-cp -a \
- AUTHORS COPYING ChangeLog INSTALL.libusb LICENSE NEWS README \
- doc/html \
- $PKG/usr/doc/libusb-$VERSION
-
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-makepkg -l y -c n $TMP/libusb-$VERSION-$ARCH-$BUILD.txz
+/sbin/makepkg -l y -c n $TMP/libusb-$VERSION-$ARCH-$BUILD.txz
diff --git a/source/l/libusb/slack-desc b/source/l/libusb/slack-desc
index df9a5b25..e1a8b5df 100644
--- a/source/l/libusb/slack-desc
+++ b/source/l/libusb/slack-desc
@@ -10,10 +10,10 @@ libusb: libusb (USB library)
libusb:
libusb: This is libusb, a library which allows userspace application access
libusb: to USB devices. It is used to connect to USB devices like scanners.
+libusb: http://libusb.org/wiki/Libusb1.0
libusb:
-libusb:
-libusb:
-libusb:
+libusb: This package also contains libusb-compat for the "old" libusb users.
+libusb: http://libusb.org/wiki/LibusbCompat0.1
libusb:
libusb:
libusb: