actions.py 1.3 KB

1234567891011121314151617181920212223242526272829303132
  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 shelltools
  7. from pisi.actionsapi import cmaketools
  8. from pisi.actionsapi import pisitools
  9. from pisi.actionsapi import get
  10. def setup():
  11. shelltools.system("sed -i 's|lastfm5/ws.h|lastfm/ws.h|g' CMakeLists.txt")
  12. shelltools.system("sed -i 's|lastfm5/Track.h|lastfm/Track.h|g' CMakeLists.txt")
  13. shelltools.system("sed -i 's|<lastfm5/|<lastfm/|g' src/internet/lastfm/lastfmcompat.h")
  14. shelltools.system("sed -i 's|<lastfm5/|<lastfm/|g' src/internet/lastfm/lastfmservice.cpp")
  15. shelltools.system("sed -i 's|<lastfm5/|<lastfm/|g' src/internet/lastfm/lastfmsettingspage.cpp")
  16. shelltools.system("sed -i 's|<lastfm5/Track.h>|<lastfm/Track.h>|g' src/core/song.cpp")
  17. shelltools.system("sed -i 's|Exec=clementine %U|Exec=clementine|g' dist/clementine.desktop")
  18. cmaketools.configure(" \
  19. -DCMAKE_INSTALL_PREFIX=/usr \
  20. -DCMAKE_BUILD_TYPE=Release \
  21. -DENABLE_VK=ON")
  22. def build():
  23. cmaketools.make()
  24. def install():
  25. cmaketools.rawInstall("DESTDIR=%s" % get.installDIR())
  26. pisitools.dodoc("Changelog", "COPYING")