build 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #!/bin/sh
  2. [% c("var/set_default_env") -%]
  3. mkdir -p /var/tmp/build/[% project %]
  4. tar -C /var/tmp/build/[% project %] -xf [% project %]-[% c("version") %].tar.gz
  5. cd /var/tmp/build/[% project %]/[% project %]-*
  6. mkdir packages
  7. cd packages
  8. [% FOREACH dep = ['aiohttp', 'aiohttp_socks', 'aiorpcx', 'async_timeout', 'attr', 'certifi', 'chardet', 'dns', 'ecdsa', 'idna', 'idna_ssl', 'jsonrpclib', 'multidict', 'pyaes', 'six', 'typing_extensions', 'yarl'] -%]
  9. tar -C . -xf $rootdir/[% c('input_files_by_name/' _ dep) %]
  10. [% END -%]
  11. mkdir -p /var/tmp/dist/
  12. cd /var/tmp/dist/
  13. cp -a /var/tmp/build/[% project %]/[% project %]* ./Electrum-NMC
  14. cd ./Electrum-NMC
  15. # Remove GUI, since it's not used in Tor Browser.
  16. rm -r electrum_nmc/electrum/gui/
  17. # Remove plugins, since they're not used in Tor Browser.
  18. rm -r electrum_nmc/electrum/plugins/*/
  19. # Remove wallet functionality, since it's not used in Tor Browser.
  20. mv electrum_nmc/electrum/null_impl/null_wallet/*.py electrum_nmc/electrum/
  21. rm -r electrum_nmc/electrum/null_impl/
  22. # Remove some other files that aren't needed. We have to leave
  23. # electrum-nmc.desktop there, because it's used in run_electrum_nmc's is_local
  24. # detection.
  25. rm -r .git*
  26. rm -r .travis*
  27. rm -r contrib/
  28. rm -r electrum_nmc/electrum/tests/
  29. rm -r pubkeys
  30. rm -r tox.ini
  31. cd ../
  32. [% c('tar', {
  33. tar_src => '.',
  34. tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
  35. }) %]