actions.py 835 B

123456789101112131415161718192021222324252627282930313233
  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 cmaketools, shelltools
  7. from pisi.actionsapi import get
  8. def setup():
  9. shelltools.makedirs('build')
  10. shelltools.cd('build')
  11. parameters = " ".join([
  12. "-DTOGGL_VERSION:STRING=\"{}\"".format(get.srcVERSION()),
  13. "-DTOGGL_PRODUCTION_BUILD=ON",
  14. "-DTOGGL_ALLOW_UPDATE_CHECK=ON",
  15. "-DUSE_BUNDLED_LIBRARIES=OFF",
  16. ])
  17. cmaketools.configure(parameters=parameters, sourceDir='..')
  18. def build():
  19. shelltools.makedirs('build')
  20. shelltools.cd('build')
  21. cmaketools.make()
  22. def install():
  23. shelltools.makedirs('build')
  24. shelltools.cd('build')
  25. cmaketools.rawInstall("DESTDIR=%s" % get.installDIR())