summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO49
-rw-r--r--PKGBUILD64
-rw-r--r--tor-browser-ja.desktop8
-rw-r--r--tor-browser-ja.install43
-rw-r--r--tor-browser-ja.pngbin0 -> 13877 bytes
-rwxr-xr-xtor-browser-ja.sh110
6 files changed, 274 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..5efd12681c4
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,49 @@
+# Generated by mksrcinfo v8
+# Mon Feb 22 07:35:06 UTC 2016
+pkgbase = tor-browser-ja
+ pkgdesc = Tor Browser Bundle: Anonymous browsing using firefox and tor
+ pkgver = 5.5.2
+ pkgrel = 1
+ url = https://www.torproject.org/projects/torbrowser.html.en
+ install = tor-browser-ja.install
+ arch = x86_64
+ arch = i686
+ 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-ja.desktop
+ source = tor-browser-ja.png
+ source = tor-browser-ja.sh
+ sha256sums = 3d5fc01f2cfbae0a00b7117b0b0a24028d1686e6f81a347809f74de2d8522ff7
+ sha256sums = 17fc2f5784d080233aca16e788d62ab6fe3e57cf781b123cfe32767de97d6d3b
+ sha256sums = 89ed1cda6611abcbfdafef9aec78ada146643455d6675b22b72319ae286ea67e
+ source_x86_64 = https://dist.torproject.org/torbrowser/5.5.2/tor-browser-linux64-5.5.2_ja.tar.xz
+ source_x86_64 = https://dist.torproject.org/torbrowser/5.5.2/tor-browser-linux64-5.5.2_ja.tar.xz.asc
+ sha256sums_x86_64 = 08dbae0a353239fad62638073f395b04d6ddf664f9de43148184389e4f9fe1c2
+ sha256sums_x86_64 = SKIP
+ source_i686 = https://dist.torproject.org/torbrowser/5.5.2/tor-browser-linux32-5.5.2_ja.tar.xz
+ source_i686 = https://dist.torproject.org/torbrowser/5.5.2/tor-browser-linux32-5.5.2_ja.tar.xz.asc
+ sha256sums_i686 = adb02492193eec5a9ec3cff3724eb5e8f5a6115eb4cbb1d1127211685d8d2a62
+ sha256sums_i686 = SKIP
+
+pkgname = tor-browser-ja
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..9846f166bd0
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,64 @@
+# Maintainer: Atnanasi <ys2000pro at gmail dot com>
+# Contributor: Atnanasi <ys2000pro at gmail dot com>
+
+# To port this PKGBUILD to another language of tor-browser you
+# have to change $pkgname, $_language, $pkgdesc and $url in PKGBUILD
+# AND (!) the first line in the .install file!
+
+pkgname='tor-browser-ja'
+pkgver='5.5.2'
+_language='ja'
+pkgrel=1
+pkgdesc='Tor Browser Bundle: Anonymous browsing using firefox and tor'
+url='https://www.torproject.org/projects/torbrowser.html.en'
+arch=('x86_64' 'i686')
+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')
+install="${pkgname}.install"
+
+validpgpkeys=('8738A680B84B3031A630F2DB416F061063FEE659'
+ 'EF6E286DDA85EA2A4BA7DE684E2C6E8793298290')
+source_x86_64=("https://dist.torproject.org/torbrowser/${pkgver}/tor-browser-linux64-${pkgver}_${_language}.tar.xz"{,.asc})
+source_i686=("https://dist.torproject.org/torbrowser/${pkgver}/tor-browser-linux32-${pkgver}_${_language}.tar.xz"{,.asc})
+source+=("${pkgname}.desktop"
+ "${pkgname}.png"
+ "${pkgname}.sh")
+
+sha256sums_x86_64=('08dbae0a353239fad62638073f395b04d6ddf664f9de43148184389e4f9fe1c2' 'SKIP')
+sha256sums_i686=( 'adb02492193eec5a9ec3cff3724eb5e8f5a6115eb4cbb1d1127211685d8d2a62' 'SKIP')
+sha256sums+=('3d5fc01f2cfbae0a00b7117b0b0a24028d1686e6f81a347809f74de2d8522ff7'
+ '17fc2f5784d080233aca16e788d62ab6fe3e57cf781b123cfe32767de97d6d3b'
+ '89ed1cda6611abcbfdafef9aec78ada146643455d6675b22b72319ae286ea67e')
+
+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_VERSION/${pkgver}/g" ${pkgname}.sh
+ sed -i "s/REPL_LANGUAGE/${_language}/g" ${pkgname}.sh
+
+ sed -i "s/REPL_NAME/${pkgname}/g" ${pkgname}.desktop
+ sed -i "s/REPL_LANGUAGE/${_language}/g" ${pkgname}.desktop
+ sed -i "s/REPL_COMMENT/${pkgdesc}/g" ${pkgname}.desktop
+
+ install -Dm 644 ${pkgname}.desktop ${pkgdir}/usr/share/applications/${pkgname}.desktop
+ install -Dm 644 ${pkgname}.png ${pkgdir}/usr/share/pixmaps/${pkgname}.png
+ install -Dm 755 ${pkgname}.sh ${pkgdir}/usr/bin/${pkgname}
+
+ if [[ "$CARCH" == 'i686' ]]; then
+ install -Dm 644 tor-browser-linux32-${pkgver}_${_language}.tar.xz ${pkgdir}/opt/${pkgname}/tor-browser-linux32-${pkgver}_${_language}.tar.xz
+ else
+ install -Dm 644 tor-browser-linux64-${pkgver}_${_language}.tar.xz ${pkgdir}/opt/${pkgname}/tor-browser-linux64-${pkgver}_${_language}.tar.xz
+ fi
+}
diff --git a/tor-browser-ja.desktop b/tor-browser-ja.desktop
new file mode 100644
index 00000000000..14a9e67f6a5
--- /dev/null
+++ b/tor-browser-ja.desktop
@@ -0,0 +1,8 @@
+[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;
+Comment=REPL_COMMENT
diff --git a/tor-browser-ja.install b/tor-browser-ja.install
new file mode 100644
index 00000000000..8ac87b6a449
--- /dev/null
+++ b/tor-browser-ja.install
@@ -0,0 +1,43 @@
+pkgname="tor-browser-ja"
+
+pre_install() {
+ echo
+ echo "==> If you want to verify the gnupg signature you have to"
+ echo "==> import the proper public key first (Found on https://www.torproject.org/docs/signing-keys.html.en)."
+ echo "==> Choose one and use the following command to import it:"
+ echo "==> "
+ echo "==> gpg --recv-keys <keyid>"
+ echo "==> "
+ echo "==> After that, signature verifying should work."
+ echo
+}
+
+post_install() {
+ echo
+ echo "==> ${pkgname} will be extracted to ~/.$pkgname"
+ echo "==> the first time you run $pkgname as your normal user!"
+ echo "==> Just start it and have fun."
+ echo
+}
+
+pre_upgrade() {
+ # remove old files
+ rm -rf /opt/$pkgname
+}
+
+post_upgrade() {
+ echo
+ echo "==> The $pkgname copy in your home directory will be upgraded at the"
+ echo "==> first time you run it as your normal user!"
+ echo "==> Just start and have fun."
+ echo
+}
+
+post_remove() {
+ echo
+ echo "==> You have to remove the tor-brower directory in your home"
+ echo "==> directory by hand: As your normal user, do:"
+ echo "==> "
+ echo "==> rm -rf ~/.${pkgname}"
+ echo
+}
diff --git a/tor-browser-ja.png b/tor-browser-ja.png
new file mode 100644
index 00000000000..39c4ab220c2
--- /dev/null
+++ b/tor-browser-ja.png
Binary files differ
diff --git a/tor-browser-ja.sh b/tor-browser-ja.sh
new file mode 100755
index 00000000000..cd4abf137c1
--- /dev/null
+++ b/tor-browser-ja.sh
@@ -0,0 +1,110 @@
+#!/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>
+#
+# 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"
+
+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[@]}"