Username: Password: Remember me
# Maintainer: Your name here
# Contributor: Mark Haferkamp <chakralinux dot org at refola dot com>
# Contributor: Yardena Cohen <yardenack at gmail dot com>
# Contributor: Max Roder <maxroder@web.de>
# Contributor: Sebastian Jug <seb AT stianj DOT ug>
 
# For makepkg to verify the signature, you need to import the key into
# your user (not system) keyring. Per <link>, the command is:
#
# gpg --auto-key-locate nodefault,wkd --locate-keys torbrowser@torproject.org
#
# link: https://support.torproject.org/tbb/how-to-verify-signature/
 
# 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-en'
pkgver='10.0.1'
_language='en-US'
pkgrel=1
pkgdesc='Tor Browser Bundle: Anonymous browsing using firefox and tor'
url='https://www.torproject.org/projects/torbrowser.html.en'
arch=('x86_64')
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'
            '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=('EF6E286DDA85EA2A4BA7DE684E2C6E8793298290')
source=("https://www.torproject.org/dist/torbrowser/${pkgver}/tor-browser-linux64-${pkgver}_${_language}.tar.xz"{,.asc}
        "${pkgname}.desktop"
        "${pkgname}.png"
        "${pkgname}.sh")
b2sums=('20e21ae8963432e3184572660b7993ad2751672390ff622dfb4be54d84c738a8e9d7d30b33720b92088f3114b20086e6e8032f98c8ff9890ea06852882c89977'
        'SKIP'
        'f4c5822f78cbc1ba90387409a5609c6c8aa9a5697c6ed6c76ebf5028aa662c32571662c6f8327b25788955a4e20c39d11903c255ccafd1e77db1165717fc23ea'
        '845238e2b4af9950ec2b22c81606160fcbbcc3909b3c61a6aea8ca3fbe8be81a31bb84dd730cb7a0067dbc6a99b125f160554fd1c911a1f839d96765ae99348d'
        'ce68d58d1eaf5438a88cc791180cd1448819879c58de2e5632d094f9526f889be806cad0566537d7632e6a6a70f8fe84514e9ff19241dcba2a05fe26ec22f41f')
noextract=("tor-browser-linux64-${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}
 
   install -Dm 644 tor-browser-linux64-${pkgver}_${_language}.tar.xz ${pkgdir}/opt/${pkgname}/tor-browser-linux64-${pkgver}_${_language}.tar.xz
}