actions.py 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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 pisitools
  8. from pisi.actionsapi import autotools
  9. from pisi.actionsapi import libtools
  10. WorkDir = "MediaInfo"
  11. def setup():
  12. for it in ["Project/GNU/CLI", "../GUI"]:
  13. configure_args = " --with-wxwidgets --with-wx-gui" if it.endswith('GUI') else ""
  14. shelltools.cd(it)
  15. libtools.libtoolize("--automake")
  16. autotools.aclocal()
  17. autotools.automake("-afc")
  18. autotools.autoconf()
  19. autotools.configure("--disable-static%s" % configure_args)
  20. def build():
  21. for it in ["Project/GNU/CLI", "../GUI"]:
  22. shelltools.cd(it)
  23. autotools.make("-j1")
  24. def install():
  25. pisitools.dodoc("*.txt")
  26. pisitools.dohtml("*.html")
  27. pisitools.insinto("/usr/share/pixmaps", "Source/Resource/Image/MediaInfo.png", "mediainfo.png")
  28. pisitools.insinto("/usr/share/icons/hicolor/128x128/apps/", "Source/Resource/Image/MediaInfo.png", "mediainfo.png")
  29. for it in ["Project/GNU/CLI", "../GUI"]:
  30. shelltools.cd(it)
  31. autotools.install()
  32. if it.endswith('GUI'): pisitools.insinto("/usr/share/applications", "mediainfo-gui.kde4.desktop")