mkextbuild 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #!/bin/bash
  2. # mkextbuild script: prepare a small source archive for those utils
  3. # that don't easily cross-compile. Then the tarball can be extracted
  4. # on those machines with the target architecture, and compiled.
  5. #
  6. # Copyright (C) 2014, 2015 Francis Rowe <info@gluglug.org.uk>
  7. #
  8. # This program is free software: you can redistribute it and/or modify
  9. # it under the terms of the GNU General Public License as published by
  10. # the Free Software Foundation, either version 3 of the License, or
  11. # (at your option) any later version.
  12. #
  13. # This program is distributed in the hope that it will be useful,
  14. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. # GNU General Public License for more details.
  17. #
  18. # You should have received a copy of the GNU General Public License
  19. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. #
  21. set -u -e -v
  22. # delete the old data
  23. rm -rf tobuild
  24. rm -f tobuild.tar.xz
  25. # this is where they will go
  26. mkdir tobuild
  27. # for reference (build dependencies)
  28. cp deps-trisquel tobuild/
  29. # flashrom
  30. cp -r flashrom tobuild/
  31. cd tobuild/flashrom/
  32. rm -f flashrom_lenovobios_sst flashrom_lenovobios_macronix
  33. make clean
  34. cd ../../
  35. mkdir tobuild/resources
  36. mkdir tobuild/resources/flashrom
  37. mkdir tobuild/resources/flashrom/patch
  38. cp -r resources/flashrom/patch/* tobuild/resources/flashrom/patch/
  39. cp builddeps-flashrom tobuild/
  40. # bucts
  41. cp -r bucts tobuild/
  42. cd tobuild/bucts/
  43. make clean
  44. cd ../../
  45. mkdir tobuild/resources/bucts
  46. mkdir tobuild/resources/bucts/patch
  47. cp -r resources/bucts/patch/* tobuild/resources/bucts/patch
  48. cp -r builddeps-bucts tobuild/
  49. # that is all. now tar it up
  50. tar cfJ tobuild.tar.xz tobuild
  51. # and delete the directory
  52. rm -rf tobuild/