actions.py 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Licensed under the GNU General Public License, version 3.
  5. # See the file https://www.gnu.org/licenses/gpl-3.0.txt
  6. from pisi.actionsapi import mesontools, shelltools, pisitools, get
  7. i = ''.join([
  8. '-Dalsadatadir=/usr/share/alsa-card-profile/mixer ',
  9. '-Dmodlibexecdir=/usr/lib/pulse/modules ',
  10. '-Dsystemd=disabled ',
  11. '-Dsystem_user=pulse ',
  12. '-Dsystem_group=pulse ',
  13. '-Dudevrulesdir=/lib/udev/rules.d ',
  14. ])
  15. j = ''.join([
  16. '--libdir=/usr/lib32 ',
  17. '--libexecdir=/usr/lib32 ',
  18. '-Dasyncns=disabled ',
  19. '-Davahi=disabled ',
  20. '-Dsoxr=disabled ',
  21. '-Djack=disabled ',
  22. '-Dlirc=disabled ',
  23. '-Dfftw=disabled ',
  24. '-Dgtk=disabled ',
  25. '-Dx11=disabled ',
  26. '-Delogind=disabled ',
  27. '-Dbluez5=disabled ',
  28. '-Dtests=false ',
  29. ])
  30. def setup():
  31. shelltools.cd("%s" % get.workDIR())
  32. shelltools.move("pulseaudio-*", "pulseaudio-%s" % get.srcVERSION())
  33. shelltools.cd("pulseaudio-%s" % get.srcVERSION())
  34. shelltools.echo(".tarball-version", get.srcVERSION())
  35. options = "%s" % i
  36. if get.buildTYPE() == "emul32":
  37. options += "%s %s" % (i, j)
  38. shelltools.export("LDFLAGS", "%s -m32" % get.LDFLAGS())
  39. mesontools.configure(options)
  40. def build():
  41. mesontools.build()
  42. mesontools.build("doxygen")
  43. def install():
  44. if get.buildTYPE() != "emul32":
  45. shelltools.system("DESTDIR=%s ninja -C build install" % get.installDIR())
  46. if get.buildTYPE() == "emul32":
  47. shelltools.cd("build/src")
  48. pisitools.insinto("/usr/lib32/cmake", "../*.cmake")
  49. pisitools.insinto("/usr/lib32/pkgconfig", "../*.pc")
  50. pisitools.dolib_so("libpulsecommon-17.0.so", "/usr/lib32/pulseaudio")
  51. pisitools.dolib_so("libpulsecommon-17.0.so", "/usr/lib32")
  52. pisitools.dolib_so("utils/libpulsedsp.so", "/usr/lib32/pulseaudio")
  53. shelltools.cd("pulse")
  54. for t in [
  55. "libpulse.so",
  56. "libpulse.so.0",
  57. "libpulse.so.0.24.3",
  58. "libpulse-simple.so",
  59. "libpulse-simple.so.0",
  60. "libpulse-simple.so.0.1.1",
  61. "libpulse-mainloop-glib.so",
  62. "libpulse-mainloop-glib.so.0",
  63. "libpulse-mainloop-glib.so.0.0.6",
  64. ]:
  65. pisitools.insinto("/usr/lib32", t)
  66. shelltools.cd("%s/%s" % (get.workDIR(), get.srcDIR()))
  67. # Disable autospawn by default
  68. shelltools.system("sed -e '/autospawn/iautospawn= yes' -i '%s/etc/pulse/client.conf'" % get.installDIR())
  69. # Needed for service.py
  70. pisitools.dodir("/run/pulse")
  71. pisitools.dodir("/var/lib/pulse")
  72. pisitools.dodir("/etc/pulse/default.pa.d")
  73. pisitools.dodoc("NEWS", "README")
  74. pisitools.dohtml("build/doxygen/html/*")