actions.py 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. # Licensed under the GNU General Public License, version 3.
  4. # See the file http://www.gnu.org/copyleft/gpl.txt
  5. from pisi.actionsapi import cmaketools
  6. from pisi.actionsapi import pisitools
  7. from pisi.actionsapi import shelltools
  8. from pisi.actionsapi import get
  9. def setup():
  10. shelltools.system("sed -i 's/-fPIE/-fPIC/g' src/{gui,cmd}/CMakeLists.txt")
  11. shelltools.makedirs("build")
  12. shelltools.cd("build")
  13. cmaketools.configure("-DCMAKE_BUILD_TYPE=None \
  14. -DCMAKE_INSTALL_PREFIX=/usr \
  15. -DCMAKE_INSTALL_LIBDIR=lib \
  16. -DCMAKE_SHARED_LINKER_FLAGS='-Wl,--as-needed' \
  17. -DNO_SHIBBOLETH=1 \
  18. -DWITH_CRASHREPORTER=OFF \
  19. -DUNIT_TESTING=ON", sourceDir="..")
  20. def build():
  21. shelltools.cd("build")
  22. cmaketools.make()
  23. def install():
  24. shelltools.cd("build")
  25. cmaketools.rawInstall("DESTDIR=%s" % get.installDIR())
  26. shelltools.cd("..")
  27. pisitools.dodoc("COPYING", "README.md")
  28. # Pisi Linux does not have Cinnamon Desktop yet.
  29. # pisitools.removeDir("/usr/share/nemo-python")