From f5c09fc4147d98dce157af710cf3d0360ff34a63 Mon Sep 17 00:00:00 2001 From: "Ryan P.C. McQuen" Date: Sun, 26 Apr 2015 18:21:55 -0700 Subject: network/copy: Fix ARCH and only install for ARCH. Thanks to Willy. Signed-off-by: Ryan P.C. McQuen --- network/copy/copy.SlackBuild | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) (limited to 'network/copy') diff --git a/network/copy/copy.SlackBuild b/network/copy/copy.SlackBuild index 17bbf96b4e..401167e727 100644 --- a/network/copy/copy.SlackBuild +++ b/network/copy/copy.SlackBuild @@ -1,5 +1,4 @@ #!/bin/sh - # Slackware build script for Copy # Ryan P.C. McQuen | Everett, WA | ryan.q@linux.com @@ -26,14 +25,25 @@ PRGNAM=copy SRCNAM=copy_agent DSKNAM=CopyAgent VERSION=${VERSION:-3.2.01.0481} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} -if [ -z "$ARCH" ]; then +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ] || [ -z "$SRCARCH" ]; then case "$( uname -m )" in - i?86) ARCH=x86 ;; - arm*) ARCH=armv6h ;; - *) ARCH=$( uname -m ) ;; + i?86) + ARCH=i486; + SRCARCH=x86; + ;; + arm*) + ARCH=arm; + SRCARCH=armv6h; + ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) + ARCH=$( uname -m ); + SRCARCH=$( uname -m ); + ;; esac fi @@ -69,10 +79,12 @@ find -L . \ mkdir -pv $PKG/opt/$PRGNAM mkdir -pv $PKG/usr/share/applications/ -cp -a * $PKG/opt/$PRGNAM +cp -a $SRCARCH/* $PKG/opt/$PRGNAM -find $PKG -print0 | xargs -0 file | \ - grep -e "executable" -e "shared object" | grep ELF \ +# Strip binaries and libraries - this can be done with 'make install-strip' +# in many source trees, and that's usually acceptable if so, but if not, +# use this: +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 mkdir -p $PKG/usr/bin @@ -81,12 +93,12 @@ cat < $PKG/usr/bin/CopyAgent #!/bin/sh ## thanks to Eric Hameleers ## Avoid Qt incompatibilities: -QT4DIR="" QT_PLUGIN_PATH="" /opt/$PRGNAM/$ARCH/CopyAgent +QT4DIR="" QT_PLUGIN_PATH="" /opt/$PRGNAM/CopyAgent EOT chmod 755 $PKG/usr/bin/CopyAgent -ln -sf /opt/$PRGNAM/$ARCH/CopyCmd $PKG/usr/bin -ln -sf /opt/$PRGNAM/$ARCH/CopyConsole $PKG/usr/bin +ln -sf /opt/$PRGNAM/CopyCmd $PKG/usr/bin/ +ln -sf /opt/$PRGNAM/CopyConsole $PKG/usr/bin/ install -m644 $CWD/$DSKNAM.desktop $PKG/usr/share/applications/ @@ -94,6 +106,7 @@ mkdir -p $PKG/usr/share/icons install -m644 $CWD/copy-client.png $PKG/usr/share/icons mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cat README > $PKG/usr/doc/$PRGNAM-$VERSION/README cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install -- cgit v1.2.3