actions.py 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/usr/bin/env python
  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 pisi.actionsapi import autotools
  7. from pisi.actionsapi import pisitools
  8. from pisi.actionsapi import shelltools
  9. from pisi.actionsapi import get
  10. def build():
  11. shelltools.system("cargo build \
  12. --release \
  13. --manifest-path Cargo.toml")
  14. shelltools.system("cargo cbuild \
  15. --release \
  16. --frozen \
  17. --prefix=/usr \
  18. --manifest-path Cargo.toml")
  19. def install():
  20. shelltools.system("cargo install --path . \
  21. --root='%s'/usr" % get.installDIR())
  22. shelltools.system("cargo cinstall \
  23. --release \
  24. --frozen \
  25. --prefix /usr \
  26. --destdir %s" % get.installDIR())
  27. pisitools.remove("/usr/lib/librav1e.a")
  28. pisitools.remove("/usr/.crates.toml")
  29. pisitools.remove("/usr/.crates2.json")
  30. pisitools.dodoc("LICENSE", "README*")