Skip to content

Instantly share code, notes, and snippets.

@david415
Created March 26, 2015 19:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save david415/2a579ad456c3502e8aed to your computer and use it in GitHub Desktop.
Save david415/2a579ad456c3502e8aed to your computer and use it in GitHub Desktop.
arch-arm-TBB-PKGBUILD
# Maintainer: cypherpunks
# Contributor: David Stainton <dstainton415@gmail.com>
pkgname='tor-browser-en'
pkgver='4.0.5'
pkgrel=1
pkgdesc='Tor Browser Bundle: Anonymous browsing using firefox and tor'
url='https://www.torproject.org/projects/torbrowser.html.en'
sha1sums=()
license=('GPL')
source=('git+https://git.torproject.org/tor-browser.git#revision=fc034df7fb9c9cab6f726e1b5b4cecd1db9c991e')
depends=('base-devel' 'zip' 'unzip' 'freetype2' 'fontconfig' 'pkg-config' \
'gtk2' 'dbus-glib' 'iw' 'libidl2' 'python2' 'mercurial' 'alsa-lib' 'curl' 'libnotify' 'libxt' \
'mesa' 'autoconf2.13' 'yasm' 'wireless_tools' 'gstreamer0.10' \
'gstreamer0.10-base-plugins' 'libpulse')
prepare() {
cd "$srcdir/"
wget https://www.torproject.org/dist/torbrowser/4.0.5/tor-browser-linux64-4.0.5_en-US.tar.xz
tar xzf tor-browser-linux64-4.0.5_en-US.tar.xz
# created dir is called tor-browser_en-US
cd tor-browser
echo "ac_add_options --with-google-api-keyfile=\"$PWD/google-api-key\"" >>.mozconfig
sed -i 's/MOZ_MAKE_FLAGS=\"-j4\"/MOZ_MAKE_FLAGS=\"-j2\"/' .mozconfig
echo "mk_add_options PYTHON=/usr/bin/python2" >> .mozconfig
echo "mk_add_options AUTOCONF=autoconf-2.13" >> .mozconfig
echo "ac_add_options --with-arm-kuser" >> .mozconfig
echo "ac_add_options --with-arch=armv7-a" >> .mozconfig
make -f client.mk configure
}
build() {
cd "%srcdir/tor-browser"
make -f client.mk build
}
package() {
cd "%srcdir/tor-browser"
make -C obj-* package INNER_MAKE_PACKAGE=true
# Move the compiled firefox on top of the old TBB browser dir:
cp -a obj-*/dist/firefox/* $srcdir/tor-browser_en-US/Browser/
cp -a $srcdir/tor-browser_en-US $srcdir/opt/tor-browser-4.0.5
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment