actions.py 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #!/usr/bin/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
  7. from pisi.actionsapi import autotools
  8. from pisi.actionsapi import shelltools
  9. from pisi.actionsapi import pisitools
  10. from pisi.actionsapi import get
  11. pisitools.cxxflags.add("-std=gnu++11")
  12. ver = get.srcVERSION()
  13. indir = "%s/VulkanTools-%s" % (get.workDIR(), ver)
  14. def setup():
  15. shelltools.system("./update_external_sources.sh")
  16. shelltools.system("mkdir -p build")
  17. shelltools.cd("build")
  18. shelltools.system("../scripts/update_deps.py")
  19. shelltools.system("cmake .. -C helper.cmake \
  20. -DCMAKE_INSTALL_PREFIX=/usr \
  21. -DCMAKE_INSTALL_SYSCONFDIR=/etc \
  22. -DCMAKE_INSTALL_DATADIR=/usr/share \
  23. -DCMAKE_INSTALL_LIBDIR=lib \
  24. -DCMAKE_SKIP_RPATH=True \
  25. -DBUILD_WSI_XCB_SUPPORT=On \
  26. -DBUILD_WSI_XLIB_SUPPORT=On \
  27. -DBUILD_WSI_WAYLAND_SUPPORT=On \
  28. -DBUILD_TESTS=OFF \
  29. -DBUILD_VIA=OFF \
  30. -DCMAKE_BUILD_TYPE=Release \
  31. -DVULKAN_HEADERS_INSTALL_DIR=%s/build/Vulkan-Headers/build/install \
  32. -DVULKAN_LOADER_INSTALL_DIR=%s/build/Vulkan-Loader/build/install \
  33. -DVULKAN_VALIDATIONLAYERS_INSTALL_DIR=%s/build/Vulkan-ValidationLayers/build/install \
  34. " % (indir, indir, indir ) )
  35. def build():
  36. shelltools.cd("build")
  37. cmaketools.make()
  38. def install():
  39. shelltools.cd("build")
  40. autotools.rawInstall("DESTDIR=%s" %get.installDIR())
  41. shelltools.cd("..")
  42. pisitools.insinto("/usr/share/doc/vulkan-trace", "vktrace/LICENSE")
  43. pisitools.insinto("/usr/share/doc/vulkan-extra-layers", "CONTRIBUTING.md")
  44. pisitools.insinto("/usr/share/doc/vulkan-extra-layers", "GOVERNANCE.md")
  45. pisitools.insinto("/usr/share/doc/vulkan-extra-layers", "LICENSE.txt")
  46. pisitools.insinto("/usr/share/doc/vulkan-extra-layers", "README.md")
  47. pisitools.insinto("/usr/share/doc/vulkan-extra-layers", "layersvt/README.md", "README.layersvt")
  48. #pisitools.dodoc("README.md", "CONTRIBUTING.md", "LICENSE.txt", "CODE_OF_CONDUCT.md", "GOVERNANCE.md")