actions.py 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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 get
  7. from pisi.actionsapi import autotools
  8. from pisi.actionsapi import pisitools
  9. def setup():
  10. pisitools.dosed("avahi-daemon/avahi-daemon.conf", "^#(disallow-other-stacks=)no", "\\1yes")
  11. # fix avahi socket path
  12. pisitools.dosed('configure.ac', '^(avahi_runtime_dir=")\$\{localstatedir\}(\/run")', r'\1\2')
  13. autotools.autoreconf("-fi")
  14. # --with-systemdsystemunitdir=/lib/systemd/system
  15. autotools.configure("\
  16. --with-distro=none \
  17. --disable-monodoc \
  18. --disable-static \
  19. --disable-xmltoman \
  20. --disable-qt3 \
  21. --disable-qt4 \
  22. --disable-doxygen-doc \
  23. --enable-glib \
  24. --enable-gobject \
  25. --enable-introspection \
  26. --disable-mono \
  27. --disable-python \
  28. --enable-gtk3 \
  29. --enable-compat-howl \
  30. --enable-compat-libdns_sd \
  31. --with-avahi-user=avahi \
  32. --with-avahi-group=avahi \
  33. --with-autoipd-user=avahi-autoipd \
  34. --with-autoipd-group=avahi-autoipd \
  35. --with-avahi-priv-access-group=avahi \
  36. --with-dbus-system-address=unix:path=/run/dbus/system_bus_socket \
  37. ")
  38. pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
  39. def build():
  40. autotools.make()
  41. def install():
  42. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  43. # Add missing symlinks for avahi-compat-howl and avahi-compat-dns-sd
  44. pisitools.dosym("/usr/lib/pkgconfig/avahi-compat-howl.pc", "/usr/lib/pkgconfig/howl.pc")
  45. pisitools.dosym("/usr/lib/pkgconfig/avahi-compat-libdns_sd.pc", "/usr/lib/pkgconfig/libdns_sd.pc")
  46. pisitools.dosym("/usr/include/avahi-compat-libdns_sd/dns_sd.h", "/usr/include/dns_sd.h")
  47. # Remove example
  48. pisitools.remove("/etc/avahi/services/sftp-ssh.service")
  49. pisitools.dodir("/run/avahi-daemon")
  50. pisitools.dodir("/var/lib/avahi-autoipd")
  51. pisitools.dodoc("docs/AUTHORS", "docs/README", "docs/TODO")
  52. #pisitools.removeDir("var/run")
  53. pisitools.removeDir("/usr/lib/avahi")