actions.py 987 B

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 autotools
  8. from pisi.actionsapi import pisitools
  9. from pisi.actionsapi import get
  10. WorkDir = "espeak-%s-source" % get.srcVERSION()
  11. def setup():
  12. # Build against portaudio v19
  13. shelltools.copy("src/portaudio19.h", "src/portaudio.h")
  14. # Remove binary voice dictionaries, we'll build them
  15. shelltools.system("rm -rf espeak-data/*_dict")
  16. def build():
  17. autotools.make("-C src CXXFLAGS='%s' CFLAGS='%s' LDFLAGS='%s'" % (get.CXXFLAGS(), get.CFLAGS(), get.LDFLAGS()))
  18. shelltools.system("./compile-voices")
  19. def install():
  20. shelltools.cd("src")
  21. autotools.rawInstall("DESTDIR=%s BINDIR=/usr/bin INCDIR=/usr/include/espeak LIBDIR=/usr/lib" % get.installDIR())
  22. shelltools.cd("..")
  23. pisitools.dodoc("ReadMe", "ChangeLog.txt", "License.txt")