build.android 1.1 KB

1234567891011121314151617181920212223242526272829
  1. #!/bin/bash
  2. [% c("var/set_default_env") -%]
  3. ext_dir=assets/distribution/extensions
  4. qa_apk=[% dest_dir %]/[% c('filename') %]/tor-browser-[% c("version") %]-[% c("var/osname") %]-multi-qa.apk
  5. apk=$rootdir/[% c('input_files_by_name/firefox') %]/tor-browser-unsigned-unaligned.apk
  6. mkdir -p /var/tmp/build/$ext_dir [% dest_dir _ '/' _ c('filename') %]
  7. cd /var/tmp/build
  8. mv $rootdir/[% c('input_files_by_name/https-everywhere') %] $ext_dir/https-everywhere-eff@eff.org.xpi
  9. mv $rootdir/[% c('input_files_by_name/noscript') %] $ext_dir/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi
  10. [% c("var/touch") %] $ext_dir $ext_dir/*
  11. zip -d $apk META-INF/\*
  12. zip -r -X $apk $ext_dir
  13. zip -d $apk lib/armeabi/tor.so
  14. [% IF c("var/android-x86") %]
  15. zip -d $apk lib/armeabi-v7a/tor.so
  16. [% END %]
  17. [% IF c("var/android-armv7") %]
  18. zip -d $apk lib/x86/tor.so
  19. [% END %]
  20. # Sign a QA build. This apk is not a debug version and doesn't contain a debug flag in the manifest
  21. [% c("var/faketime") %] jarsigner -verbose -digestalg SHA1 -sigalg MD5withRSA -keystore $rootdir/android-qa.keystore -signedjar $qa_apk $apk androidqakey -storepass android -keypass android