actions.py 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. from pisi.actionsapi import shelltools
  10. def setup():
  11. pisitools.dosed("libsasl2.pc.in", "libdir = @libdir@", "prefix=/usr\nexec_prefix=${prefix}\nlibdir = @libdir@")
  12. def cleanup():
  13. for p in ("config.*", "ltconfig", "ltmain.sh", "libtool.m4"):
  14. shelltools.unlink("config/%s" % p)
  15. cleanup()
  16. autotools.autoreconf("-vfi --no-recursive -I config -I cmulocal")
  17. shelltools.cd("saslauthd")
  18. cleanup()
  19. autotools.autoreconf("-vi --no-recursive -I config -I ../cmulocal -I ../config")
  20. shelltools.cd("..")
  21. pisitools.cflags.add("-fPIC")
  22. # Don't disable ldap support to break circular dep. with openldap
  23. # As workaround, we remove openldap-client runtime dep. in pspec
  24. autotools.configure("--with-saslauthd=/run/saslauthd \
  25. --with-pwcheck=/var/lib/sasl2 \
  26. --with-configdir=/etc/sasl2 \
  27. --with-plugindir=/usr/lib/sasl2 \
  28. --with-dbpath=/etc/sasl2/sasldb2 \
  29. --with-pam \
  30. --without-ldap \
  31. --with-openssl \
  32. --with-dblib=gdbm \
  33. --with-gss_impl=mit \
  34. --with-devrandom=/dev/urandom \
  35. --without-pgsql \
  36. --without-mysql \
  37. --enable-anon \
  38. --enable-cram \
  39. --enable-digest \
  40. --enable-gssapi \
  41. --enable-login \
  42. --enable-ntlm \
  43. --enable-plain \
  44. --disable-ldapdb \
  45. --enable-checkapop \
  46. --enable-alwaystrue \
  47. --disable-java \
  48. --disable-krb4 \
  49. --disable-otp \
  50. --disable-srp \
  51. --disable-sql \
  52. --disable-passdss \
  53. --disable-macos-framework \
  54. --disable-static")
  55. # for remove unused
  56. pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
  57. def build():
  58. autotools.make("-j1")
  59. autotools.make("-C saslauthd testsaslauthd")
  60. def install():
  61. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  62. autotools.rawInstall("DESTDIR=%s -C plugins" % get.installDIR())
  63. pisitools.dodir("/etc/sasl2")
  64. pisitools.dodir("/run/saslauthd")
  65. for doc in ["AUTHORS", "COPYING", "ChangeLog", "LDAP_SASLAUTHD", "NEWS", "README"]:
  66. pisitools.newdoc("saslauthd/%s" % doc, "saslauthd/%s" % doc)
  67. pisitools.dohtml("doc/*.html")
  68. pisitools.dodoc("AUTHORS", "COPYING", "ChangeLog", "NEWS", "README", "doc/TODO", "doc/*.txt")