summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Lucas2016-03-20 13:13:06 -0400
committerJean Lucas2016-03-20 13:13:06 -0400
commit2c969bef939d58c259b90f5b036c4085d7904863 (patch)
tree6a3a08c68ad60117d12970dda393e280a31b4213
downloadaur-2c969bef939d58c259b90f5b036c4085d7904863.tar.gz
initial commit
-rw-r--r--.SRCINFO48
-rw-r--r--PKGBUILD56
-rw-r--r--tor-browser.desktop8
-rw-r--r--tor-browser.pngbin0 -> 19033 bytes
-rwxr-xr-xtor-browser.sh111
5 files changed, 223 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..3e0029d214f6
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,48 @@
+# Generated by mksrcinfo v8
+# Sun Mar 20 17:06:23 UTC 2016
+pkgbase = tor-browser-bin
+ pkgdesc = Tor Browser is +1 for privacy and -1 for mass surveillance
+ pkgver = 5.5.4
+ pkgrel = 1
+ url = https://www.torproject.org/projects/torbrowser.html.en
+ arch = i686
+ arch = x86_64
+ license = GPL
+ depends = gtk2
+ depends = mozilla-common
+ depends = libxt
+ depends = startup-notification
+ depends = mime-types
+ depends = dbus-glib
+ depends = alsa-lib
+ depends = desktop-file-utils
+ depends = hicolor-icon-theme
+ depends = libvpx
+ depends = icu
+ depends = libevent
+ depends = nss
+ depends = hunspell
+ depends = sqlite
+ optdepends = zenity: simple dialog boxes
+ optdepends = kdebase-kdialog: KDE dialog boxes
+ optdepends = gst-plugins-good: h.264 video
+ optdepends = gst-libav: h.264 video
+ optdepends = libpulse: PulseAudio audio driver
+ optdepends = libnotify: GNOME dialog boxes
+ source = tor-browser.desktop
+ source = tor-browser.png
+ source = tor-browser.sh
+ sha512sums = eaa9f60d8b6343253c12c2438f3a6b805768b407ec43c34e88780ceec6a6f853c13b56749bccd73d7183402fd490a68c61de356728531744ca3b2f744fc92ffe
+ sha512sums = 236338469e13b4991c2abb94d4844d0149bb98094f1661b0a41256df0400cfe9904882117aae9edbea9261d99aea42745e03d745b523243d9a75fa5151062e18
+ sha512sums = 54ba3df337f07b3072636bf42b255de26eddde773e82f7588c4ed9cf29c20ea5522c460855151036dad307dc023c76266e57f530352bb129b6afef95bf28c038
+ source_i686 = https://dist.torproject.org/torbrowser/5.5.4/tor-browser-linux32-5.5.4_en-US.tar.xz
+ source_i686 = https://dist.torproject.org/torbrowser/5.5.4/tor-browser-linux32-5.5.4_en-US.tar.xz.asc
+ sha512sums_i686 = ab92f1c879afba1bf3c98fcc2765edcc521e309825c3ea94fc0ec38f1c796c33e810964a2f3e3ae05141e17405b42b1dc80f2e8abde4be11a52a054b14b5c053
+ sha512sums_i686 = SKIP
+ source_x86_64 = https://dist.torproject.org/torbrowser/5.5.4/tor-browser-linux64-5.5.4_en-US.tar.xz
+ source_x86_64 = https://dist.torproject.org/torbrowser/5.5.4/tor-browser-linux64-5.5.4_en-US.tar.xz.asc
+ sha512sums_x86_64 = 3204a4ada30fa7b2a675535ed129204e0fc713753780e462059ee1c13ce6188d7074e1cd3c907aab0720ec8a86296bce9944c85ad5db34bbcd502045c2457c30
+ sha512sums_x86_64 = SKIP
+
+pkgname = tor-browser-bin
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..d970398133e4
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,56 @@
+# Maintainer: Jean Lucas <jean at 4ray dot co>
+# Contributor: Yardena Cohen <yardenack at gmail dot com>
+# Contributor: Max Roder <maxroder at web dot de>
+
+pkgname=tor-browser-bin
+pkgver=5.5.4
+_language='en-US'
+pkgrel=1
+pkgdesc="Tor Browser is +1 for privacy and -1 for mass surveillance"
+arch=('i686' 'x86_64')
+url="https://www.torproject.org/projects/torbrowser.html.en"
+license=('GPL')
+depends=('gtk2' 'mozilla-common' 'libxt' 'startup-notification' 'mime-types'
+ 'dbus-glib' 'alsa-lib' 'desktop-file-utils' 'hicolor-icon-theme'
+ 'libvpx' 'icu' 'libevent' 'nss' 'hunspell' 'sqlite')
+optdepends=('zenity: simple dialog boxes'
+ 'kdebase-kdialog: KDE dialog boxes'
+ 'gst-plugins-good: h.264 video'
+ 'gst-libav: h.264 video'
+ 'libpulse: PulseAudio audio driver'
+ 'libnotify: GNOME dialog boxes')
+source_i686=("https://dist.torproject.org/torbrowser/${pkgver}/tor-browser-linux32-${pkgver}_${_language}.tar.xz"{,.asc})
+source_x86_64=("https://dist.torproject.org/torbrowser/${pkgver}/tor-browser-linux64-${pkgver}_${_language}.tar.xz"{,.asc})
+source+=(tor-browser.desktop
+ tor-browser.png
+ tor-browser.sh)
+sha512sums_i686=('ab92f1c879afba1bf3c98fcc2765edcc521e309825c3ea94fc0ec38f1c796c33e810964a2f3e3ae05141e17405b42b1dc80f2e8abde4be11a52a054b14b5c053'
+ 'SKIP')
+sha512sums_x86_64=('3204a4ada30fa7b2a675535ed129204e0fc713753780e462059ee1c13ce6188d7074e1cd3c907aab0720ec8a86296bce9944c85ad5db34bbcd502045c2457c30'
+ 'SKIP')
+sha512sums+=('eaa9f60d8b6343253c12c2438f3a6b805768b407ec43c34e88780ceec6a6f853c13b56749bccd73d7183402fd490a68c61de356728531744ca3b2f744fc92ffe'
+ '236338469e13b4991c2abb94d4844d0149bb98094f1661b0a41256df0400cfe9904882117aae9edbea9261d99aea42745e03d745b523243d9a75fa5151062e18'
+ '54ba3df337f07b3072636bf42b255de26eddde773e82f7588c4ed9cf29c20ea5522c460855151036dad307dc023c76266e57f530352bb129b6afef95bf28c038')
+validpgpkeys=('8738A680B84B3031A630F2DB416F061063FEE659'
+ 'EF6E286DDA85EA2A4BA7DE684E2C6E8793298290')
+noextract_i686=("tor-browser-linux32-${pkgver}_${_language}.tar.xz")
+noextract_x86_64=("tor-browser-linux64-${pkgver}_${_language}.tar.xz")
+
+package() {
+ cd ${srcdir}
+
+ sed -i \
+ -e "s|REPL_VERSION|${pkgver}|g" \
+ -e "s|REPL_LANGUAGE|${_language}|g" \
+ tor-browser.sh
+
+ install -Dm0644 tor-browser.desktop ${pkgdir}/usr/share/applications/tor-browser.desktop
+ install -Dm0644 tor-browser.png ${pkgdir}/usr/share/pixmaps/tor-browser.png
+ install -Dm0755 tor-browser.sh ${pkgdir}/usr/bin/tor-browser
+
+ if [ '$CARCH' == 'i686' ] ; then
+ install -Dm0644 tor-browser-linux32-${pkgver}_${_language}.tar.xz ${pkgdir}/opt/tor-browser/tor-browser-linux32-${pkgver}_${_language}.tar.xz
+ else
+ install -Dm0644 tor-browser-linux64-${pkgver}_${_language}.tar.xz ${pkgdir}/opt/tor-browser/tor-browser-linux64-${pkgver}_${_language}.tar.xz
+ fi
+}
diff --git a/tor-browser.desktop b/tor-browser.desktop
new file mode 100644
index 000000000000..f5c3f70f6f81
--- /dev/null
+++ b/tor-browser.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Type=Application
+Name=Tor Browser
+GenericName=Web Browser
+Comment=Tor Browser is +1 for privacy and -1 for mass surveillance
+Categories=Network;
+Exec=/usr/bin/tor-browser
+Icon=/usr/share/pixmaps/tor-browser.png
diff --git a/tor-browser.png b/tor-browser.png
new file mode 100644
index 000000000000..8fc3530cffa7
--- /dev/null
+++ b/tor-browser.png
Binary files differ
diff --git a/tor-browser.sh b/tor-browser.sh
new file mode 100755
index 000000000000..00769520d98e
--- /dev/null
+++ b/tor-browser.sh
@@ -0,0 +1,111 @@
+#!/usr/bin/env bash
+#
+# Copyright (C) 2009 Benjamin Drung <bdrung at ubuntu dot com>
+# Copyright (C) 2012 Alessio Sergi <al3hex at gmail dot com>
+# modified 2012 for tor-browser (Max Roder <maxroder at web dot de>)
+# modified 2014 by Yardena Cohen <yardenack at gmail dot com>
+# modified 2016 by Jean Lucas <jean at 4ray dot co>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+set -e
+
+# filled by the PKGBUILD
+NAME='tor-browser'
+VERSION='REPL_VERSION'
+LANGUAGE="REPL_LANGUAGE"
+
+ARCH=$(getconf LONG_BIT)
+
+notify() {
+ local title="$1"
+ local message="$2"
+
+ if [ $(which zenity 2>/dev/null) ]; then
+ zenity --info --title "$title" --text "$message"
+ elif [ $(which notify-send 2>/dev/null) ]; then
+ notify-send "$title" "$message"
+ elif [ $(which kdialog 2>/dev/null) ]; then
+ kdialog --title "$title" --passivepopup "$message"
+ else
+ echo -e "$0: [$title] $message" >&2
+ fi
+}
+
+update() {
+ echo "$0: Extracting files to $INSTALL_DIRECTORY." >> $LOG_FILE
+ rm -rf $INSTALL_DIRECTORY/*
+ tar --strip-components=1 -xJf /opt/$NAME/tor-browser-linux${ARCH}-${VERSION}_${LANGUAGE}.tar.xz \
+ -C $INSTALL_DIRECTORY >> $LOG_FILE 2>&1 || notify "Error" \
+ "The tor-browser archive could not be extracted to your home directory. \
+ \nCheck permissions of $INSTALL_DIRECTORY. \
+ \nThe error log can be found in $LOG_FILE."
+
+ [[ -f $INSTALL_DIRECTORY/Browser/start-tor-browser ]] && echo $VERSION > $VERSION_FILE
+}
+
+usage() {
+ cat <<EOF
+Usage: ${0##*/} [option]
+
+Options:
+ -h|--help Show this help message and exit
+ -u|--update Force update of the copy in your home directory
+ --dir=<directory> The Tor-Browser directory to use
+
+ All unrecognized arguments will be passed to the browser,
+ but arguments with spaces will break, until Tor fixes this bug:
+ https://trac.torproject.org/projects/tor/ticket/12161
+EOF
+}
+
+DIRECTORY=~/.$NAME
+args=()
+for arg; do
+ case "$arg" in
+ -h|--help) usage; exit 0 ;;
+ -u|--update) update=1 ;;
+ --dir=*) DIRECTORY="${arg#*=}" ;;
+ *) args+=("$arg") ;;
+ esac
+done
+
+INSTALL_DIRECTORY=$DIRECTORY/INSTALL
+VERSION_FILE=$DIRECTORY/VERSION
+LOG_FILE=$DIRECTORY/LOG
+
+# create directory, if it is missing (e.g. first run)
+[[ ! -d "$INSTALL_DIRECTORY" ]] && mkdir -p "$INSTALL_DIRECTORY"
+cd "$DIRECTORY"
+
+# create version file if missing
+[[ ! -f $VERSION_FILE ]] && echo 0 > $VERSION_FILE
+
+#get installed version
+while read line
+do
+ INSTALLED_VERSION=$line
+done < $VERSION_FILE
+
+# start update if old or no tor-browser is installed
+if [[ "$INSTALLED_VERSION" == "$VERSION" ]] && [[ $update != 1 ]]; then
+ # clear log
+ > $LOG_FILE
+else
+ echo "$0: Your version in $DIRECTORY is outdated or you do not have installed $NAME yet." > $LOG_FILE
+ update
+fi
+
+# start tor-browser
+cd $INSTALL_DIRECTORY/Browser && ./start-tor-browser --class Tor\ Browser "${args[@]}"