actions.py 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. def setup():
  11. # /var/run => /run
  12. #for f in ["configure.ac", "src/Makefile.am", "src/Makefile.in"]:
  13. #pisitools.dosed(f, "\$\(?localstatedir\)?(\/run\/(\$PACKAGE|NetworkManager))", "\\1")
  14. #pisitools.dosed("configure.ac", "\/var(\/run\/ConsoleKit)", "\\1")
  15. #pisitools.dosed("configure.ac", "^initscript", deleteLine=True)
  16. autotools.autoreconf("-fiv")
  17. shelltools.system("intltoolize --force --copy --automake")
  18. autotools.configure("--disable-static \
  19. --disable-silent-rules \
  20. --disable-wimax \
  21. --disable-lto \
  22. --disable-config-plugin-ibft \
  23. --disable-ifnet \
  24. --disable-more-warnings \
  25. --enable-modify-system \
  26. --enable-ppp=yes \
  27. --enable-bluez5-dun \
  28. --enable-concheck \
  29. --without-netconfig \
  30. --with-modem-manager-1 \
  31. --with-libsoup=yes \
  32. --with-session-tracking=consolekit \
  33. --with-suspend-resume=upower \
  34. --with-system-ca-path=/etc/ssl/certs \
  35. --with-crypto=nss \
  36. --with-dhcpcd=/usr/bin/dhcpcd \
  37. --with-pppd=/usr/sbin/pppd \
  38. --with-pppd-plugin-dir=/usr/lib/pppd/2.4.7 \
  39. --with-dbus-sys-dir=/etc/dbus-1/system.d \
  40. --with-dhclient=/usr/sbin/dhclient \
  41. --with-kernel-firmware-dir=/lib/firmware \
  42. --with-udev-dir=/lib/udev \
  43. --with-resolvconf=/etc/resolv.default.conf \
  44. --with-iptables=/sbin/iptables \
  45. --with-dnsmasq=/usr/sbin/dnsmasq \
  46. --with-systemdsystemunitdir=no \
  47. --with-nmtui \
  48. --localstatedir=/var \
  49. --sysconfdir=/etc \
  50. --libexecdir=/usr/lib/NetworkManager \
  51. ")
  52. pisitools.dosed("libtool", " -shared ", " -Wl,--as-needed -shared ")
  53. def build():
  54. autotools.make()
  55. #def check():
  56. #autotools.make("-k check")
  57. def install():
  58. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  59. pisitools.dodir("/etc/NetworkManager/VPN")
  60. pisitools.dodoc("AUTHORS", "ChangeLog", "CONTRIBUTING", "COPYING", "NEWS", "README")