actions.py 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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 autotools
  7. from pisi.actionsapi import pisitools
  8. from pisi.actionsapi import shelltools
  9. from pisi.actionsapi import get
  10. def setup():
  11. autotools.configure("--with-python \
  12. --with-perl \
  13. --include=/usr/include/postgresql \
  14. --with-includes=/usr/include/libxml2/ \
  15. --with-tcl \
  16. --with-gssapi \
  17. --with-openssl \
  18. --enable-nls \
  19. --with-pam \
  20. --with-libxml \
  21. --with-libxslt \
  22. --with-ldap \
  23. --with-readline \
  24. --with-lz4 \
  25. --with-libxslt \
  26. --enable-integer-datetimes \
  27. --enable-thread-safety \
  28. --enable-depend \
  29. --host=%s \
  30. --libdir=/usr/lib \
  31. --disable-rpath \
  32. --with-system-tzdata=/usr/share/zoneinfo \
  33. --with-docdir=/usr/share/doc/postgresql" % get.CHOST())
  34. def build():
  35. if get.LDFLAGS():
  36. ld = "-j1 LD=%s %s" % (get.LD(), get.LDFLAGS())
  37. else:
  38. ld = "-j1 LD=%s" % get.LD()
  39. autotools.make(ld)
  40. shelltools.cd("contrib")
  41. autotools.make(ld)
  42. shelltools.cd("..")
  43. shelltools.cd("contrib/xml2")
  44. autotools.make(ld)
  45. shelltools.cd("../..")
  46. shelltools.cd("src/interfaces/libpq")
  47. autotools.make(ld)
  48. shelltools.cd("../../..")
  49. shelltools.cd("doc")
  50. autotools.make(ld)
  51. shelltools.cd("..")
  52. def install():
  53. autotools.rawInstall("DESTDIR=%s LIBDIR=%s/usr/lib" % (get.installDIR(), get.installDIR()))
  54. shelltools.cd("contrib")
  55. autotools.rawInstall("DESTDIR=%s LIBDIR=%s/usr/lib" % (get.installDIR(), get.installDIR()))
  56. shelltools.cd("..")
  57. shelltools.cd("contrib/xml2")
  58. autotools.rawInstall("DESTDIR=%s LIBDIR=%s/usr/lib" % (get.installDIR(), get.installDIR()))
  59. shelltools.cd("../..")
  60. shelltools.cd("src/interfaces/libpq")
  61. autotools.rawInstall("DESTDIR=%s LIBDIR=%s/usr/lib" % (get.installDIR(), get.installDIR()))
  62. shelltools.cd("../../..")
  63. shelltools.cd("doc")
  64. autotools.rawInstall("DESTDIR=%s LIBDIR=%s/usr/lib" % (get.installDIR(), get.installDIR()))
  65. shelltools.cd("..")
  66. # No static libs
  67. pisitools.remove("/usr/lib/*.a")
  68. pisitools.dodoc("README", "HISTORY", "COPYRIGHT")
  69. pisitools.dodoc("doc/MISSING_FEATURES", "doc/KNOWN_BUGS", "doc/TODO")
  70. pisitools.dodir("/var/lib/postgresql")
  71. pisitools.dodir("/var/lib/postgresql/data")
  72. pisitools.dodir("/var/lib/postgresql/backups")