actions.py 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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_GLAXNIMATE=ON \
  18. -DSWIG_PERL=ON \
  19. -DMOD_GLAXNIMATE_QT6=ON \
  20. -DMOD_QT6=ON \
  21. -DCMAKE_INSTALL_MANDIR=/usr/share/man/man1 \
  22. -DSWIG_PYTHON=ON", sourceDir="..")
  23. #autotools.configure("--enable-gpl \
  24. #--enable-gpl3 \
  25. #--disable-gtk2 \
  26. #--qt-libdir=/usr/lib/ \
  27. #--qt-includedir=/usr/include/qt5 \
  28. #--avformat-vdpau \
  29. #--avformat-swscale")
  30. # Enable bindings
  31. #shelltools.echo("%s/src/swig/config.mak" % get.curDIR(), "SUBDIRS = perl python")
  32. def build():
  33. shelltools.cd("build")
  34. cmaketools.make()
  35. #cmaketools.make("-C src/swig")
  36. #autotools.make()
  37. #autotools.make("-C src/swig")
  38. def install():
  39. shelltools.cd("build")
  40. cmaketools.rawInstall("DESTDIR=%s" % get.installDIR())
  41. #autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  42. # We should manually install the bindings :(
  43. #pisitools.insinto("/usr/lib/%s/site-packages/" % get.curPYTHON(), "src/swig/python/mlt.py")
  44. #pisitools.dolib("src/swig/python/_mlt.so", "/usr/lib/%s/site-packages/" % get.curPYTHON())
  45. #pisitools.insinto("/usr/lib/perl5/vendor_perl/%s/" % get.curPERL(), "src/swig/perl/blib/lib/mlt.pm")
  46. #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())
  47. shelltools.cd("..")
  48. pisitools.dodoc("COPYING", "GPL*", "README*")