actions.py 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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 autotools
  8. from pisi.actionsapi import pisitools
  9. from pisi.actionsapi import cmaketools
  10. from pisi.actionsapi import get
  11. def setup():
  12. shelltools.export("LDFLAGS", get.LDFLAGS())
  13. shelltools.makedirs("build")
  14. shelltools.cd("build")
  15. cmaketools.configure("-DCMAKE_INSTALL_PREFIX=/usr \
  16. -DMOD_OPENCV=ON \
  17. -DMOD_GTK2=OFF \
  18. -DMOD_RTAUDIO=OFF \
  19. -DSWIG_PYTHON=ON", sourceDir="..")
  20. #autotools.configure("--enable-gpl \
  21. #--enable-gpl3 \
  22. #--disable-gtk2 \
  23. #--qt-libdir=/usr/lib/ \
  24. #--qt-includedir=/usr/include/qt5 \
  25. #--avformat-vdpau \
  26. #--avformat-swscale")
  27. # Enable bindings
  28. #shelltools.echo("%s/src/swig/config.mak" % get.curDIR(), "SUBDIRS = perl python")
  29. def build():
  30. shelltools.cd("build")
  31. cmaketools.make()
  32. #cmaketools.make("-C src/swig")
  33. #autotools.make()
  34. #autotools.make("-C src/swig")
  35. def install():
  36. shelltools.cd("build")
  37. cmaketools.rawInstall("DESTDIR=%s" % get.installDIR())
  38. pisitools.rename("/usr/bin/melt", "melt6")
  39. #autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  40. # We should manually install the bindings :(
  41. #pisitools.insinto("/usr/lib/%s/site-packages/" % get.curPYTHON(), "src/swig/python/mlt.py")
  42. #pisitools.dolib("src/swig/python/_mlt.so", "/usr/lib/%s/site-packages/" % get.curPYTHON())
  43. #pisitools.insinto("/usr/lib/perl5/vendor_perl/%s/" % get.curPERL(), "src/swig/perl/blib/lib/mlt.pm")
  44. #pisitools.dolib("src/swig/perl/blib/arch/auto/mlt/mlt.so", "/usr/lib/perl5/vendor_perl/%s/i686-linux-thread-multi/auto/mlt/" % get.curPERL())
  45. shelltools.cd("..")
  46. pisitools.dodoc("COPYING", "GPL*", "README*")