actions.py 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Licensed under the GNU General Public License, version 2.
  5. # See the file http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
  6. from pisi.actionsapi import get
  7. from pisi.actionsapi import autotools
  8. from pisi.actionsapi import pisitools
  9. from pisi.actionsapi import shelltools
  10. from pisi.actionsapi import mesontools
  11. def setup():
  12. # /var/run => /run
  13. #for f in ["configure.ac", "src/Makefile.am", "src/Makefile.in"]:
  14. #pisitools.dosed(f, "\$\(?localstatedir\)?(\/run\/(\$PACKAGE|NetworkManager))", "\\1")
  15. #pisitools.dosed("configure.ac", "\/var(\/run\/ConsoleKit)", "\\1")
  16. #pisitools.dosed("configure.ac", "^initscript", deleteLine=True)
  17. #shelltools.system("grep -rl '^#!.*python$' | xargs sed -i '1s/python/&3/'")
  18. #pisitools.dosed("src/core/nm-hostname-manager.c", "/etc/hostname", "/etc/env.d/01hostname")
  19. pisitools.cxxflags.add("-O2 -fPIC")
  20. mesontools.configure("-Dmodify_system=true \
  21. -Difupdown=false \
  22. -Dconfig_plugins_default=keyfile \
  23. -Dhostname_persist=default \
  24. -Dqt=false \
  25. -Dselinux=false \
  26. -Debpf=true \
  27. -Ddocs=true \
  28. -Diwd=true \
  29. -Difcfg_rh=true \
  30. -Dconfig_migrate_ifcfg_rh_default=true \
  31. --buildtype=release \
  32. -Dbluez5_dun=true \
  33. -Dnetconfig=no \
  34. -Dsession_tracking=elogind \
  35. -Dsession_tracking_consolekit=false \
  36. -Dsuspend_resume=elogind \
  37. -Dcrypto=nss \
  38. -Ddhcpcd=enabled \
  39. -Dpppd=/usr/sbin/pppd \
  40. -Dpppd_plugin_dir=/usr/lib/pppd/2.5.0 \
  41. -Ddbus_conf_dir=/usr/share/dbus-1/system.d \
  42. -Ddhclient=enabled \
  43. -D config_dns_rc_manager_default=symlink \
  44. -Dudev_dir=/lib/udev \
  45. -Diptables=/sbin/iptables \
  46. -Ddnsmasq=/usr/sbin/dnsmasq \
  47. -Dsystemdsystemunitdir=no \
  48. -Dsystemd_journal=false \
  49. --localstatedir=/var \
  50. --sysconfdir=/etc \
  51. --libexecdir=/usr/lib/NetworkManager")
  52. def build():
  53. mesontools.build()
  54. #def check():
  55. #mesontools.build("test")
  56. def install():
  57. mesontools.install()
  58. pisitools.dodir("/etc/NetworkManager/VPN")
  59. #pisitools.dosym("/etc/env.d/01hostname", "/etc/hostname")
  60. pisitools.dodoc("AUTHORS", "ChangeLog", "CONTRIBUTING*", "COPYING", "NEWS", "README*")