SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
It is embedded here and is an attachment to this posting. Modify the attachment to remove the .txt suffix.
Code:
#!/bin/sh
# Copyright 2010-2015 Robby Workman, Tuscaloosa, Alabama, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# 20160409 get version embedded inside the plugin
# 20161117 use npapi version of the plugin (no choice)
PRGNAM=flashplayer-plugin
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
case "$( uname -m )" in
i?86) ARCH=i386 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
if [ "$ARCH" = "x86_64" ]; then
LIBDIRSUFFIX="64"
elif [ "$ARCH" = "i386" ]; then
LIBDIRSUFFIX=""
else
printf "\n\n$ARCH is unsupported...\n"
exit 1
fi
SOURCE="flash_player_npapi_linux.${ARCH}.tar.gz"
VERSION=$(tar -O -zxf $SOURCE libflashplayer.so \
| strings -a - | grep FlashPlayer_ \
| sed -e s/^FlashPlayer_// -e s/_FlashPlayer$// -e s/_/\./g)
VERS_MAJ=$(printf $VERSION | cut -d. -f1)
case $VERS_MAJ in
*[0-9]*) ;;
*) printf "\n\nMajor VERSION invalid: ${VERS_MAJ} VERSION: ${VERSION}\n"
exit 1
;;
esac
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
tar -C $PKG -xf $CWD/$SOURCE
if ! grep -wq "^Version ${VERSION}$" $PKG/readme.txt 2>/dev/null ; then
printf "\n\tThis script could not find Version $VERSION of the plugin,\n"
printf "\tinside the readme.txt ...\n\n"
printf "Fix the script or get a different source file...\n\n"
exit 1
fi
mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/mozilla/plugins
mv $PKG/libflashplayer.so $PKG/usr/lib${LIBDIRSUFFIX}/mozilla/plugins
if [ "$ARCH" = "x86_64" ]; then
rm -rf $PKG/usr/lib
fi
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
mv $PKG/*pdf $PKG/*.txt $PKG/LGPL/* $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
rm -rf $PKG/LGPL
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
chown -R root:root $PKG
chmod -R g-w $PKG
find $PKG -type f -name "*.so" -exec chmod 0755 {} \;
/sbin/makepkg -l y -c n -p $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
So far it works fine with my AMD 64-bit (x86_64) system running Firefox.
There is a 32-bit x86 version of the beta software. I have not tested it yet, but the script might work.
-----
Edit 2016-11-17 22:18 UTC: The script works fine on i386 (x86) machines too.
I tried your solution, and when I tried to compile it, an error message came back that said "No such file or directory" .
Odd, but for some reason it worked correctly this time, but this time I tried it in terminl mode (as "root"), whereas I had previously tried it in text mode (as "root"), but it DID work this time.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.