12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- #!/usr/bin/python
- # -*- coding: utf-8 -*-
- #
- # Licensed under the GNU General Public License, version 3.
- # See the file http://www.gnu.org/licenses/gpl.txt
- from pisi.actionsapi import autotools
- from pisi.actionsapi import pisitools
- from pisi.actionsapi import shelltools
- from pisi.actionsapi import get
- def setup():
- autotools.configure("--with-python \
- --with-perl \
- --include=/usr/include/postgresql \
- --with-includes=/usr/include/libxml2/ \
- --with-tcl \
- --with-gssapi \
- --with-openssl \
- --enable-nls \
- --with-pam \
- --with-libxml \
- --with-libxslt \
- --with-ldap \
- --with-readline \
- --with-lz4 \
- --with-libxslt \
- --enable-integer-datetimes \
- --enable-thread-safety \
- --enable-depend \
- --host=%s \
- --libdir=/usr/lib \
- --disable-rpath \
- --with-system-tzdata=/usr/share/zoneinfo \
- --with-docdir=/usr/share/doc/postgresql" % get.CHOST())
- def build():
- if get.LDFLAGS():
- ld = "-j1 LD=%s %s" % (get.LD(), get.LDFLAGS())
- else:
- ld = "-j1 LD=%s" % get.LD()
- autotools.make(ld)
- shelltools.cd("contrib")
- autotools.make(ld)
- shelltools.cd("..")
- shelltools.cd("contrib/xml2")
- autotools.make(ld)
- shelltools.cd("../..")
- shelltools.cd("src/interfaces/libpq")
- autotools.make(ld)
- shelltools.cd("../../..")
- shelltools.cd("doc")
- autotools.make(ld)
- shelltools.cd("..")
- def install():
- autotools.rawInstall("DESTDIR=%s LIBDIR=%s/usr/lib" % (get.installDIR(), get.installDIR()))
- shelltools.cd("contrib")
- autotools.rawInstall("DESTDIR=%s LIBDIR=%s/usr/lib" % (get.installDIR(), get.installDIR()))
- shelltools.cd("..")
- shelltools.cd("contrib/xml2")
- autotools.rawInstall("DESTDIR=%s LIBDIR=%s/usr/lib" % (get.installDIR(), get.installDIR()))
- shelltools.cd("../..")
- shelltools.cd("src/interfaces/libpq")
- autotools.rawInstall("DESTDIR=%s LIBDIR=%s/usr/lib" % (get.installDIR(), get.installDIR()))
- shelltools.cd("../../..")
- shelltools.cd("doc")
- autotools.rawInstall("DESTDIR=%s LIBDIR=%s/usr/lib" % (get.installDIR(), get.installDIR()))
- shelltools.cd("..")
- # No static libs
- pisitools.remove("/usr/lib/*.a")
- pisitools.dodoc("README", "HISTORY", "COPYRIGHT")
- pisitools.dodoc("doc/MISSING_FEATURES", "doc/KNOWN_BUGS", "doc/TODO")
- pisitools.dodir("/var/lib/postgresql")
- pisitools.dodir("/var/lib/postgresql/data")
- pisitools.dodir("/var/lib/postgresql/backups")
|