actions.py 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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/licenses/gpl.txt
  6. import os
  7. from inary.actionsapi import get
  8. from inary.actionsapi import autotools
  9. from inary.actionsapi import inarytools
  10. from inary.actionsapi import shelltools
  11. def setup():
  12. inarytools.dosed("configure.ac", '(AS_AC_EXPAND\(EXPANDED_LOCALSTATEDIR, )"\$localstatedir"\)', r'\1 "")')
  13. for f in ["bus/Makefile.am", "bus/Makefile.in"]:
  14. inarytools.dosed(f, "\$\(localstatedir\)(\/run\/dbus)", "\\1")
  15. options = "PYTHON=/usr/bin/python3 \
  16. --disable-selinux \
  17. --disable-static \
  18. --disable-tests \
  19. --disable-asserts \
  20. --disable-checks \
  21. --disable-embedded-tests \
  22. --disable-modular-tests \
  23. --disable-doxygen-docs \
  24. --disable-libaudit \
  25. --disable-silent-rules \
  26. --enable-inotify \
  27. --enable-user-session \
  28. --with-xml=expat \
  29. --with-system-pid-file=/run/dbus/pid \
  30. --with-system-socket=/run/dbus/system_bus_socket \
  31. --with-console-auth-dir=/run/console/ \
  32. --with-session-socket-dir=/tmp \
  33. --with-dbus-user=dbus \
  34. --enable-abstract-sockets=auto \
  35. --disable-xml-docs"
  36. if get.buildTYPE() == "emul32":
  37. options += "\
  38. --disable-xml-docs \
  39. --disable-doxygen-docs"
  40. # Build only libdbus
  41. inarytools.dosed("Makefile.am", "(.*SUBDIRS=dbus) .*", "\\1")
  42. autotools.autoreconf("-vif")
  43. autotools.configure(options)
  44. def build():
  45. autotools.make()
  46. def check():
  47. autotools.make("check")
  48. def install():
  49. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  50. if get.buildTYPE() == "emul32": return
  51. # needs to exist for the system socket
  52. inarytools.dodir("/run/dbus")
  53. inarytools.dodir("/var/lib/dbus")
  54. inarytools.dodir("/usr/share/dbus-1/services")
  55. os.system("/bin/chown root:dbus {}/usr/libexec/dbus-daemon-launch-helper".format(get.installDIR()))
  56. os.system("/bin/chmod -v 4750 {}/usr/libexec/dbus-daemon-launch-helper".format(get.installDIR()))
  57. inarytools.dodoc("AUTHORS", "ChangeLog", "NEWS*", "README*", "doc/TODO", "doc/*.txt")
  58. inarytools.dohtml("doc/")