diff options
author | Edinaldo P. Silva <edps.mundognu@gmail.com> | 2015-04-26 11:57:29 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2015-04-26 11:57:29 +0700 |
commit | 06429dd2e5c21786ce9d99577e5e340b3794b569 (patch) | |
tree | 9e41b2ec9d489942d0041a95bbf31db7e9717d2c /network/vivaldi | |
parent | 2e36ee2612aeba39608ad3ff5899049dee989492 (diff) | |
download | slackbuilds-06429dd2e5c21786ce9d99577e5e340b3794b569.tar.gz |
network/vivaldi: Added (web browser).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/vivaldi')
-rw-r--r-- | network/vivaldi/README | 3 | ||||
-rw-r--r-- | network/vivaldi/doinst.sh | 68 | ||||
-rw-r--r-- | network/vivaldi/slack-desc | 19 | ||||
-rw-r--r-- | network/vivaldi/vivaldi.SlackBuild | 90 | ||||
-rw-r--r-- | network/vivaldi/vivaldi.info | 10 |
5 files changed, 190 insertions, 0 deletions
diff --git a/network/vivaldi/README b/network/vivaldi/README new file mode 100644 index 0000000000..4c6ecdc846 --- /dev/null +++ b/network/vivaldi/README @@ -0,0 +1,3 @@ +vivaldi + +A new browser for our friends diff --git a/network/vivaldi/doinst.sh b/network/vivaldi/doinst.sh new file mode 100644 index 0000000000..f608d70b4c --- /dev/null +++ b/network/vivaldi/doinst.sh @@ -0,0 +1,68 @@ +set -e + +# make links... +ln -sf /opt/vivaldi-snapshot/vivaldi-snapshot /usr/bin/vivaldi-snapshot +ln -sf /opt/vivaldi-snapshot/vivaldi-snapshot /opt/vivaldi-snapshot/vivaldi + +# chmod vivaldi_sandbox. +chmod 4755 /opt/vivaldi-snapshot/vivaldi-sandbox + +# modify .desktop file. +sed -i 's/TargetEnvironment/X-TargetEnvironment/g' /usr/share/applications/vivaldi-snapshot.desktop + +# Add icons to the system icons +XDG_ICON_RESOURCE="`which xdg-icon-resource 2> /dev/null || true`" +if [ ! -x "$XDG_ICON_RESOURCE" ]; then + echo "Error: Could not find xdg-icon-resource" >&2 + exit 1 +fi +for icon in "/opt/vivaldi-snapshot/product_logo_"*.png; do + size="${icon##*/product_logo_}" + "$XDG_ICON_RESOURCE" install --novendor --size "${size%.png}" "$icon" "vivaldi-snapshot" +done + +# begin SlackBuild options. +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi + +if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then + if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi +# end SlackBuild options. + +# Updates defaults.list file if present. +update_defaults_list() { + # $1: name of the .desktop file + + local DEFAULTS_FILE="/usr/share/applications/defaults.list" + + if [ ! -f "${DEFAULTS_FILE}" ]; then + return + fi + + # Split key-value pair out of MimeType= line from the .desktop file, + # then split semicolon-separated list of mime types (they should not contain + # spaces). + mime_types="$(grep MimeType= /usr/share/applications/${1} | + cut -d '=' -f 2- | + tr ';' ' ')" + for mime_type in ${mime_types}; do + if egrep -q "^${mime_type}=" "${DEFAULTS_FILE}"; then + if ! egrep -q "^${mime_type}=.*${1}" "${DEFAULTS_FILE}"; then + default_apps="$(grep ${mime_type}= "${DEFAULTS_FILE}" | + cut -d '=' -f 2-)" + egrep -v "^${mime_type}=" "${DEFAULTS_FILE}" > "${DEFAULTS_FILE}.new" + echo "${mime_type}=${default_apps};${1}" >> "${DEFAULTS_FILE}.new" + mv "${DEFAULTS_FILE}.new" "${DEFAULTS_FILE}" + fi + else + # If there's no mention of the mime type in the file, add it. + echo "${mime_type}=${1};" >> "${DEFAULTS_FILE}" + fi + done +} + +update_defaults_list "vivaldi-snapshot.desktop" diff --git a/network/vivaldi/slack-desc b/network/vivaldi/slack-desc new file mode 100644 index 0000000000..26059e2b73 --- /dev/null +++ b/network/vivaldi/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +vivaldi: vivaldi (web browser) +vivaldi: +vivaldi: A new browser for our friends +vivaldi: +vivaldi: Homepage: https://vivaldi.com/ +vivaldi: +vivaldi: +vivaldi: +vivaldi: +vivaldi: +vivaldi: diff --git a/network/vivaldi/vivaldi.SlackBuild b/network/vivaldi/vivaldi.SlackBuild new file mode 100644 index 0000000000..da7e0b0b94 --- /dev/null +++ b/network/vivaldi/vivaldi.SlackBuild @@ -0,0 +1,90 @@ +#!/bin/sh + +# Slackware build script for Vivaldi Snapshot + +# Copyright 2015 Edinaldo P. Silva +# 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="vivaldi" +SRCNAM="vivaldi-snapshot" +VERSION=${VERSION:-1.0.161.2_1} +SRCVER=${SRCVERSION:-1.0.161.2-1} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -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 + +set -e + +rm -rf $PKG $TMP/$PRGNAM +mkdir -p $TMP/$PRGNAM $PKG $OUTPUT + +cd $TMP/$PRGNAM +ar p $CWD/${SRCNAM}_${SRCVER}_${BITS}.deb data.tar.xz | tar xvJ +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 opt usr $PKG/ + +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/doc/$PRGNAM-$VERSION +cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README +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} diff --git a/network/vivaldi/vivaldi.info b/network/vivaldi/vivaldi.info new file mode 100644 index 0000000000..64460c343f --- /dev/null +++ b/network/vivaldi/vivaldi.info @@ -0,0 +1,10 @@ +PRGNAM="vivaldi" +VERSION="1.0.161.2_1" +HOMEPAGE="https://vivaldi.com/" +DOWNLOAD="http://repo.vivaldi.com/archive/deb/pool/main/vivaldi-snapshot_1.0.161.2-1_i386.deb" +MD5SUM="5fb92396cff1bc748faf5c16e277b556" +DOWNLOAD_x86_64="http://repo.vivaldi.com/archive/deb/pool/main/vivaldi-snapshot_1.0.161.2-1_amd64.deb" +MD5SUM_x86_64="0a233ce16bee7f83a15283b7a0c48369" +REQUIRES="" +MAINTAINER="Edinaldo P. Silva" +EMAIL="edps.mundognu@gmail.com" |