actions.py 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. shelltools.system("""sed -i -e '/LIB_SQLITE.*-R/s/ -R[^"]*//' \
  22. configure.ac || die""")
  23. shelltools.system("sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:g' \
  24. -e 's:AC_CONFIG_MACRO_DIR:AC_CONFIG_MACRO_DIRS:g' \
  25. configure.ac || die")
  26. shelltools.system("libtoolize -c")
  27. shelltools.system("aclocal -I config")
  28. shelltools.system("automake -a -c")
  29. shelltools.system("autoheader")
  30. autotools.autoconf()
  31. pisitools.cflags.add("-fno-strict-aliasing")
  32. # Don't disable ldap support to break circular dep. with openldap
  33. # As workaround, we remove openldap-client runtime dep. in pspec
  34. autotools.configure("--with-saslauthd=/run/saslauthd \
  35. --with-pwcheck=/var/lib/sasl2 \
  36. --with-configdir=/etc/sasl2 \
  37. --with-plugindir=/usr/lib/sasl2 \
  38. --with-dbpath=/etc/sasl2/sasldb2 \
  39. --with-pam \
  40. --with-ldap \
  41. --with-openssl \
  42. --with-dblib=gdbm \
  43. --with-gss_impl=mit \
  44. --with-devrandom=/dev/urandom \
  45. --without-pgsql \
  46. --without-mysql \
  47. --enable-anon \
  48. --enable-cram \
  49. --enable-digest \
  50. --enable-gssapi \
  51. --enable-login \
  52. --enable-ntlm \
  53. --enable-plain \
  54. --enable-ldapdb \
  55. --enable-checkapop \
  56. --enable-alwaystrue \
  57. --disable-java \
  58. --disable-krb4 \
  59. --disable-otp \
  60. --disable-srp \
  61. --disable-sql \
  62. --disable-passdss \
  63. --disable-macos-framework \
  64. --disable-static")
  65. # for remove unused
  66. pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
  67. def build():
  68. autotools.make("-j1")
  69. autotools.make("-C saslauthd testsaslauthd")
  70. def install():
  71. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  72. autotools.rawInstall("DESTDIR=%s -C plugins" % get.installDIR())
  73. pisitools.dodir("/etc/sasl2")
  74. pisitools.dodir("/run/saslauthd")
  75. #for doc in ["AUTHORS", "COPYING", "ChangeLog", "LDAP_SASLAUTHD", "NEWS", "README"]:
  76. #pisitools.newdoc("saslauthd/%s" % doc, "saslauthd/%s" % doc)
  77. pisitools.dohtml("doc/html/*.html")
  78. pisitools.dodoc("AUTHORS", "COPYING", "ChangeLog", "README")