actions.py 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Licensed under the GNU General Public License, version 3.
  5. # See the file http://www.gnu.org/copyleft/gpl.txt.
  6. from inary.actionsapi import get
  7. from inary.actionsapi import autotools
  8. from inary.actionsapi import inarytools
  9. from inary.actionsapi import shelltools
  10. def setup():
  11. shelltools.system("sed -i 's/cicero //g' configure.ac")
  12. shelltools.system("sed -i 's/sd_cicero//g' src/modules/Makefile.am")
  13. autotools.autoreconf("-i")
  14. autotools.configure("--disable-static \
  15. --enable-shared \
  16. --without-flite \
  17. --with-alsa \
  18. --with-espeak \
  19. --with-libao \
  20. --with-pulse \
  21. --with-default-audio-method=alsa")
  22. inarytools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
  23. def build():
  24. autotools.make()
  25. def install():
  26. autotools.install()
  27. # Conflicts with openTTS
  28. inarytools.remove("/usr/share/info/ssip.info")
  29. # Set executable bit
  30. #shelltools.chmod("%s/usr/lib/python3.6/site-packages/speechd/_test.py" % get.installDIR(), 0o755)
  31. # Create log directory, it should be world unreadable
  32. inarytools.dodir("/var/log/speech-dispatcher")
  33. shelltools.chmod("%s/var/log/speech-dispatcher" % get.installDIR(), 0o700)
  34. inarytools.dodoc("AUTHORS", "COPYING", "README")