diff options
author | OmeGa | 2015-07-08 02:39:49 -0500 |
---|---|---|
committer | OmeGa | 2015-07-08 02:39:49 -0500 |
commit | e14b8d9113856b1c83ae815dd79ca3c165b4f88a (patch) | |
tree | 4f944bd0a0e9d31e0a0fdb4dcb3df567ebed6516 | |
download | aur-e14b8d9113856b1c83ae815dd79ca3c165b4f88a.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 31 | ||||
-rw-r--r-- | PKGBUILD | 62 | ||||
-rw-r--r-- | tor-browser-es.desktop | 10 | ||||
-rw-r--r-- | tor-browser-es.install | 52 | ||||
-rw-r--r-- | tor-browser-es.png | bin | 0 -> 13877 bytes | |||
-rwxr-xr-x | tor-browser-es.sh | 105 |
6 files changed, 260 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..5a78ec34261d --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,31 @@ +pkgbase = tor-browser-es + pkgdesc = Navegación anónima utilizando Firefox y Tor + pkgver = 4.5.3 + pkgrel = 1 + url = https://www.torproject.org/projects/torbrowser.html + install = tor-browser-es.install + arch = i686 + arch = x86_64 + license = GPL + depends = dbus-glib + depends = gtk2 + optdepends = kdebase-kdialog: KDE dialog boxes + optdepends = libnotify: Gnome dialog boxes + optdepends = zenity: simple dialog boxes + source = tor-browser-es.desktop + source = tor-browser-es.png + source = tor-browser-es.sh + sha1sums = 28e65f7537e7dc76af475166365ad0deabb91cb9 + sha1sums = 7a283313a21bb9cd8331891f99d2646186231636 + sha1sums = d4da2996d4b99d847a9ed382401b9f41cea4098b + source_i686 = https://www.torproject.org/dist/torbrowser/4.5.3/tor-browser-linux32-4.5.3_es-ES.tar.xz + source_i686 = https://www.torproject.org/dist/torbrowser/4.5.3/tor-browser-linux32-4.5.3_es-ES.tar.xz.asc + sha256sums_i686 = 196cfd81e726d0e1f7ecf0fe0183eac6b7e2cf8e8c5bc89b9105ce4d82e0922a + sha256sums_i686 = SKIP + source_x86_64 = https://www.torproject.org/dist/torbrowser/4.5.3/tor-browser-linux64-4.5.3_es-ES.tar.xz + source_x86_64 = https://www.torproject.org/dist/torbrowser/4.5.3/tor-browser-linux64-4.5.3_es-ES.tar.xz.asc + sha256sums_x86_64 = df7961b4384012eedd96c31d62633c9b95ae727f12f5e650ffdf7f6d5ca30617 + sha256sums_x86_64 = SKIP + +pkgname = tor-browser-es + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..30eb2e72f7cd --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,62 @@ +# Maintainer: OmeGa <omega [U+0040] mailoo [.] org> +# Maintainer (English version): Max Roder <maxroder@web.de> + +pkgname=tor-browser-es +_language=es-ES +pkgver=4.5.3 +pkgrel=1 +pkgdesc="Navegación anónima utilizando Firefox y Tor" +arch=('i686' 'x86_64') +url="https://www.torproject.org/projects/torbrowser.html" +license=('GPL') +depends=('dbus-glib' 'gtk2') +optdepends=('kdebase-kdialog: KDE dialog boxes' + 'libnotify: Gnome dialog boxes' + 'zenity: simple dialog boxes') +install=$pkgname.install +validpgpkeys=('EF6E286DDA85EA2A4BA7DE684E2C6E8793298290') + +source_x86_64=("https://www.torproject.org/dist/torbrowser/$pkgver/tor-browser-linux64-${pkgver}_${_language}.tar.xz" + "https://www.torproject.org/dist/torbrowser/$pkgver/tor-browser-linux64-${pkgver}_${_language}.tar.xz.asc") +source_i686=("https://www.torproject.org/dist/torbrowser/$pkgver/tor-browser-linux32-${pkgver}_${_language}.tar.xz" + "https://www.torproject.org/dist/torbrowser/$pkgver/tor-browser-linux32-${pkgver}_${_language}.tar.xz.asc") +source+=("$pkgname.desktop" + "$pkgname.png" + "$pkgname.sh") + +sha256sums_x86_64=('df7961b4384012eedd96c31d62633c9b95ae727f12f5e650ffdf7f6d5ca30617' + 'SKIP') +sha256sums_i686=('196cfd81e726d0e1f7ecf0fe0183eac6b7e2cf8e8c5bc89b9105ce4d82e0922a' + 'SKIP') +sha1sums=('28e65f7537e7dc76af475166365ad0deabb91cb9' + '7a283313a21bb9cd8331891f99d2646186231636' + 'd4da2996d4b99d847a9ed382401b9f41cea4098b') + +noextract_x86_64=("tor-browser-linux64-${pkgver}_${_language}.tar.xz") +noextract_i686=("tor-browser-linux32-${pkgver}_${_language}.tar.xz") + +package() { + cd "$srcdir" + + sed -i "s/REPL_NAME/$pkgname/g" $pkgname.sh + sed -i "s/REPL_LANGUAGE/$_language/g" $pkgname.sh + sed -i "s/REPL_VERSION/$pkgver/g" $pkgname.sh + + sed -i "s/REPL_NAME/$pkgname/g" $pkgname.desktop + sed -i "s/REPL_COMMENT/$pkgdesc/" $pkgname.desktop + sed -i "s/REPL_LANGUAGE/$_language/" $pkgname.desktop + + install -Dm755 $pkgname.sh "$pkgdir/usr/bin/$pkgname" + install -Dm644 $pkgname.png "$pkgdir/usr/share/pixmaps/$pkgname.png" + install -Dm644 $pkgname.desktop "$pkgdir/usr/share/applications/$pkgname.desktop" + + if [[ "$CARCH" == 'i686' ]]; then + install -Dm644 tor-browser-linux32-${pkgver}_${_language}.tar.xz \ + "$pkgdir/opt/$pkgname/tor-browser-linux32-${pkgver}_${_language}.tar.xz" + else + install -Dm644 tor-browser-linux64-${pkgver}_${_language}.tar.xz \ + "$pkgdir/opt/$pkgname/tor-browser-linux64-${pkgver}_${_language}.tar.xz" + fi +} + +# vim:set ts=2 sw=2 et: diff --git a/tor-browser-es.desktop b/tor-browser-es.desktop new file mode 100644 index 000000000000..11f843518708 --- /dev/null +++ b/tor-browser-es.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=Tor Browser (REPL_LANGUAGE) +Exec=/usr/bin/REPL_NAME +Icon=/usr/share/pixmaps/REPL_NAME.png +Categories=Network; +StartupNotify=true +Terminal=false +Comment=REPL_COMMENT diff --git a/tor-browser-es.install b/tor-browser-es.install new file mode 100644 index 000000000000..9aab3ade893a --- /dev/null +++ b/tor-browser-es.install @@ -0,0 +1,52 @@ +pkgname="tor-browser-es" + +pre_install() { + echo + echo "==> Si deseas verificar la firma GPG, primero debes importar la clave pública" + echo "==> correspondiente (se encuentra en https://www.torproject.org/docs/signing-keys.html)." + echo "==> Elige la clave que firma el Tor Browser, y utiliza el siguiente comando:" + echo "==> " + echo "==> $ gpg --recv-keys <keyid>" + echo "==> " + echo "==> Comprueba que la «huella digital» sea correcta:" + echo "==> " + echo "==> $ gpg --fingerprint <keyid>" + echo "==> " + echo "==> Después, la verificación de la firma debería funcionar." + echo +} + +post_install() { + echo + echo "==> ¡$pkgname se extraerá en tu directorio de inicio" + echo "==> la primera vez que ejecutes $pkgname como tu usuario normal!" + echo "==> Simplemente inícialo y diviértete." + echo +} + +pre_upgrade() { + # remove old files + rm -rf /opt/$pkgname +} + +post_upgrade() { + echo + echo "==> ¡La copia de $pkgname en tu directorio de inicio se actualizará" + echo "==> la primera vez que ejecutes $pkgname como tu usuario normal!" + echo "==> Simplemente inícialo y diviértete." + echo +} + +post_remove() { + # remove old files + rm -rf /opt/$pkgname + + echo + echo "==> Debes eliminar la carpeta ~/.$pkgname de tu directorio" + echo "==> de inicio manualmente. Como tu usuario normal, ejecuta:" + echo "==> " + echo "==> $ rm -rf ~/.$pkgname" + echo +} + +# vim:set ts=2 sw=2 et: diff --git a/tor-browser-es.png b/tor-browser-es.png Binary files differnew file mode 100644 index 000000000000..39c4ab220c25 --- /dev/null +++ b/tor-browser-es.png diff --git a/tor-browser-es.sh b/tor-browser-es.sh new file mode 100755 index 000000000000..1080150c7426 --- /dev/null +++ b/tor-browser-es.sh @@ -0,0 +1,105 @@ +#!/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>) +# +# 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='REPL_NAME' +VERSION='REPL_VERSION' +LANGUAGE="REPL_LANGUAGE" + +DIRECTORY=~/.$NAME +INSTALL_DIRECTORY=$DIRECTORY/INSTALL +VERSION_FILE=$DIRECTORY/VERSION +LOG_FILE=$DIRECTORY/LOG +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/start-tor-browser.desktop ]] && echo $VERSION > $VERSION_FILE +} + +usage() { + cat <<EOF +Usage: ${0##*/} [option] + +Options: + -h Show this help message and exit + -u Force update of the copy in your home directory + -r <directory> The Tor-Browser directory to use +EOF +} + +while getopts ':hu' opt; do + case "$opt" in + h) usage; exit 0 ;; + u) update=1 ;; + :) echo "$0: Option '-$OPTARG' requires an argument" >&2 + exit 1 ;; + *) echo "$0: Invalid option '-$OPTARG'" >&2 + usage; exit 1 ;; + esac +done + +# 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 && './start-tor-browser.desktop' |