actions.py 878 B

12345678910111213141516171819202122232425262728
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Licensed under the GNU General Public License, version 3.
  5. # See the file http://www.gnu.org/licenses/gpl.txt
  6. from inary.actionsapi import inarytools
  7. from inary.actionsapi import autotools
  8. from inary.actionsapi import get
  9. from inary.actionsapi import variables
  10. import os
  11. def build():
  12. autotools.make("-C lib PREFIX=/usr")
  13. autotools.make("-C programs lz4 lz4c PREFIX=/usr")
  14. def install():
  15. # TODO: we must use autotools
  16. backup_environ=os.environ.copy()
  17. pkgdir=get.installDIR()
  18. os.environ.clear()
  19. os.environ["PATH"]="/bin:/usr/bin:/sbin:/usr/sbin"
  20. os.system('make install Q=" " -C lib PREFIX=/usr PREFIX=/usr DESTDIR='+pkgdir)
  21. os.system('make install Q=" " -C programs PREFIX=/usr DESTDIR='+pkgdir)
  22. os.environ.update(backup_environ)
  23. inarytools.dodoc("LICENSE", "NEWS", "README.md")