summaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
authorRyan P.C. McQuen <ryan.q@linux.com>2015-04-26 18:21:55 -0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2015-05-03 07:44:05 +0700
commitf5c09fc4147d98dce157af710cf3d0360ff34a63 (patch)
treef8479f4d5e1e166457854cc698ae7a6ec22eaf09 /network
parent397fa441ea2e1f274319f68deabb129cf2d05c5c (diff)
downloadslackbuilds-f5c09fc4147d98dce157af710cf3d0360ff34a63.tar.gz
network/copy: Fix ARCH and only install for ARCH.
Thanks to Willy. Signed-off-by: Ryan P.C. McQuen <ryan.q@linux.com>
Diffstat (limited to 'network')
-rw-r--r--network/copy/copy.SlackBuild37
1 files changed, 25 insertions, 12 deletions
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 <<EOT > $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