summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD114
1 files changed, 67 insertions, 47 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 6962c74696a9..beb1afeb0106 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,61 +1,81 @@
# Maintainer: Fabio Loli <loli_fabio@protonmail.com>
+# Contributor: grufo <madmurphy333 AT gmail DOT com>
# Contributor: vitamin1980 <vitamin.novgorod @ yandex.ru>
+# Contributor: TrialnError <autumn-wind AT web DOT de>
+# Contributor: Yardena Cohen <yardenack AT gmail DOT com>
+# Contributor: Max Roder <maxroder AT web DOT de>
+# Contributor: Sebastian Jug <seb AT stianj DOT ug>
+
+#
+# Before running makepkg, you must do this:
+#
+# gpg --keyserver hkp://pgp.mit.edu:11371 --recv-keys D1483FA6C3C07136
+#
+
+# To port this PKGBUILD to another language of tor-browser you have to
+# change ONLY the variable ${_language} in PKGBUILD and tor-browser.install
-pkgname='tor-browser-ru'
-pkgver='7.0.2'
_language='ru'
-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')
+
+# This PKGBUILD is based on https://aur.archlinux.org/packages/tor-browser/
+
+_pkgname='tor-browser'
+pkgname="${_pkgname}-${_language,,}"
+pkgver='7.0.4'
+pkgrel='1'
+pkgdesc="Tor Browser Bundle: Anonymous browsing using firefox and tor (${_language})"
+url='https://www.torproject.org/projects/torbrowser.html'
+arch=('i686' 'x86_64')
+_idstr32='linux32'
+_idstr64='linux64'
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')
+ 'dbus-glib' 'alsa-lib' 'desktop-file-utils' 'hicolor-icon-theme'
+ 'libvpx' 'icu' 'libevent' 'nss' 'hunspell' 'sqlite')
optdepends=('zenity: simple dialog boxes'
- '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"
-
-source_x86_64=("https://www.torproject.org/dist/torbrowser/${pkgver}/tor-browser-linux64-${pkgver}_${_language}.tar.xz")
-source_i686=("https://www.torproject.org/dist/torbrowser/${pkgver}/tor-browser-linux32-${pkgver}_${_language}.tar.xz")
-source=("${pkgname}.desktop"
- "${pkgname}.png"
- "${pkgname}.sh")
-
-sha256sums=('3d5fc01f2cfbae0a00b7117b0b0a24028d1686e6f81a347809f74de2d8522ff7'
- '17fc2f5784d080233aca16e788d62ab6fe3e57cf781b123cfe32767de97d6d3b'
- '1e5c48a957de2df3470c82873b59663fb2b682dfc38a53d508002e59f53effaa')
-sha256sums_x86_64=('fea7fb43258eb135d3fe975981f2cae06065be7b29aef8ed1258d5ebfd4acb42')
-sha256sums_i686=('32b30a5c41ebcd3d831fc3c70e8d1978ab7d595e965904104e01077a274d9a56')
-
-noextract=("tor-browser-linux${_pkgarch}-${pkgver}_${_language}.tar.xz")
-
-# Workaround due to different versions depending on CARCH
-if [[ "$CARCH" == 'i686' ]]; then
- _pkgarch='32'
-else
- _pkgarch='64'
-fi
+ '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"
+
+_archstr=$([ $CARCH = 'x86_64' ] && echo "${_idstr64}" || echo "${_idstr32}")
+
+validpgpkeys=('EF6E286DDA85EA2A4BA7DE684E2C6E8793298290')
+
+source_i686=("https://dist.torproject.org/torbrowser/${pkgver}/${_pkgname}-${_idstr32}-${pkgver}_${_language}.tar.xz"{,.asc})
+source_x86_64=("https://dist.torproject.org/torbrowser/${pkgver}/${_pkgname}-${_idstr64}-${pkgver}_${_language}.tar.xz"{,.asc})
+source=("${_pkgname}.desktop"
+ "${_pkgname}.png"
+ "${_pkgname}.sh")
+
+md5sums=('9178c9325979377f7ec57569b15fcb61'
+ '494afbfa60fb4ce21840244cc3f7208c'
+ '9ba504d97e5841d80e0d1388d3e18951')
+md5sums_i686=('SKIP'
+ 'SKIP')
+md5sums_x86_64=('SKIP'
+ 'SKIP')
+
+noextract=("${_pkgname}-${_idstr64}-${pkgver}_${_language}.tar.xz"
+ "${_pkgname}-${_idstr32}-${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_LANGUAGE__/${_language}/g" "${_pkgname}.desktop"
+ sed -i "s/__REPL_NAME__/${pkgname}/g" "${_pkgname}.desktop"
- 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
+ sed -i "s/__REPL_NAME__/${pkgname}/g" "${_pkgname}.sh"
+ sed -i "s/__REPL_VERSION__/${pkgver}/g" "${_pkgname}.sh"
+ sed -i "s/__REPL_RELEASE__/${pkgrel}/g" "${_pkgname}.sh"
+ sed -i "s/__REPL_LANGUAGE__/${_language}/g" "${_pkgname}.sh"
+ sed -i "s/__REPL_ARCH__/${_archstr}/g" "${_pkgname}.sh"
- 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}
+ 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}"
- install -Dm 644 tor-browser-linux${_pkgarch}-${pkgver}_${_language}.tar.xz ${pkgdir}/opt/${pkgname}/tor-browser-linux${_pkgarch}-${pkgver}_${_language}.tar.xz
-}
+ install -Dm 644 "${_pkgname}-${_archstr}-${pkgver}_${_language}.tar.xz" "${pkgdir}/opt/${pkgname}/${_pkgname}-${_archstr}-${pkgver}_${_language}.tar.xz"
+}