diff options
author | Edinaldo P. Silva <edps.mundognu@gmail.com> | 2016-10-30 11:46:59 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2016-10-31 23:33:50 +0700 |
commit | d3ff2bec998d8e21cc0ad0dd6d78b0e5a7cb6f2c (patch) | |
tree | 310d3f5edaa266f1907421c884f1188eb8ec3e48 /network/opera/opera.SlackBuild | |
parent | e0dbfcc9fef324cbd4cb4bd25b127673ab78b87f (diff) | |
download | slackbuilds-d3ff2bec998d8e21cc0ad0dd6d78b0e5a7cb6f2c.tar.gz |
network/opera: Added (Fast and secure web browser).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/opera/opera.SlackBuild')
-rw-r--r-- | network/opera/opera.SlackBuild | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/network/opera/opera.SlackBuild b/network/opera/opera.SlackBuild new file mode 100644 index 0000000000..d7d717d30d --- /dev/null +++ b/network/opera/opera.SlackBuild @@ -0,0 +1,112 @@ +#!/bin/sh +# +# Slackware build script for opera. +# +# Copyright 2016 Edinaldo P. Silva, Rio de Janeiro, Brazil. +# 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. + +PRGNAM=opera +VERSION=${VERSION:-41.0.2353.46} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +SRCNAM=$PRGNAM-stable + +set -e + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" + BITS="i386" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" + BITS="i386" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" + BITS="amd64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-${VERSION}-${BITS} +mkdir -p $PRGNAM-${VERSION} +ar p $CWD/${SRCNAM}_${VERSION}_${BITS}.deb data.tar.xz | xz -dv | tar -xf- \ + --transform="s,/lib/.*-linux-gnu,/lib$LIBDIRSUFFIX," \ + --exclude="./usr/share/lintian" --exclude="./usr/share/menu" -C $PRGNAM-${VERSION} +cd $PRGNAM-${VERSION} +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +mv usr $PKG + +if [ "$ARCH" = "i586" ]; then + chown root:root $PKG/usr/lib/$PRGNAM/opera_sandbox + chmod 4755 "$PKG/usr/lib/$PRGNAM/opera_sandbox" +elif [ "$ARCH" = "i686" ]; then + chown root:root $PKG/usr/lib/$PRGNAM/opera_sandbox + chmod 4755 "$PKG/usr/lib/$PRGNAM/opera_sandbox" +elif [ "$ARCH" = "x86_64" ]; then + chown root:root $PKG/usr/lib64/$PRGNAM/opera_sandbox + chmod 4755 "$PKG/usr/lib64/$PRGNAM/opera_sandbox" +fi + +mkdir -p $PKG/etc/$PRGNAM/ +install -Dm644 $CWD/default $PKG/etc/$PRGNAM/default + +rm $PKG/usr/bin/$PRGNAM +install -Dm755 $CWD/$PRGNAM $PKG/usr/bin/$PRGNAM + +mv $PKG/usr/share/doc $PKG/usr/ +mv $PKG/usr/doc/$PRGNAM-stable $PKG/usr/doc/${PRGNAM}-$VERSION +cd $PKG/usr/doc/${PRGNAM}-$VERSION/ +gzip -dc changelog.gz > ChangeLog; rm -f changelog.gz; +mkdir -p $PKG/usr/share/licenses/$PRGNAM +install -Dm644 copyright $PKG/usr/share/licenses/$PRGNAM/copyright +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |