Ticket #18896: Portfile

File Portfile, 3.1 KB (added by chepra@…, 15 years ago)

postgreql83

Line 
1# $Id: Portfile 47044 2009-02-20 20:37:33Z mcalhoun@macports.org $
2
3PortSystem 1.0
4
5name                    postgresql83
6version                 8.3.7
7categories              databases
8platforms               darwin
9maintainers             mww jwa
10description             The most advanced open-source database available anywhere.
11long_description PostgreSQL is Object-Relational Database Management System. \
12                                It supports almost all SQL constructs, including transactions, \
13                                subselects, and user-defined types and functions. Write-ahead \
14                                logging means increased performance while retaining data \
15                                integrity.
16
17homepage                http://www.postgresql.org/
18master_sites            http://ftp3.de.postgresql.org/pub/Mirrors/ftp.postgresql.org/source/v${version}/ \
19                        postgresql:source/v${version}/
20distname                postgresql-${version}
21
22checksums           md5     7b7e91a2221e55fe1b167e663217a96d \
23                    sha1    96facdf7229a7f18f016d86ff6cb350ca5d50bd5 \
24                    rmd160  93b9360d83546fff2d5dadfb9ec32ca3ad7984db
25
26use_bzip2               yes
27
28depends_lib             port:readline port:openssl port:zlib port:libxml2 port:libxslt port:ossp-uuid
29depends_build           port:bison
30
31worksrcdir              postgresql-${version}
32
33set libdir              ${prefix}/lib/${name}
34configure.args  --sysconfdir=${prefix}/etc/${name} \
35                                --bindir=${libdir}/bin \
36                                --libdir=${libdir} \
37                                --includedir=${prefix}/include/${name} \
38                                --datadir=${prefix}/share/${name} \
39                                --mandir=${prefix}/share/man \
40                                --without-docdir \
41                                --with-includes=${prefix}/include \
42                                --with-libraries=${prefix}/lib \
43                                --with-openssl \
44                                --with-bonjour \
45                                --with-readline \
46                                --with-zlib \
47                                --with-libxml \
48                                --with-libxslt \
49                                --enable-thread-safety \
50                                --enable-integer-datetimes \
51                                --with-ossp-uuid
52configure.cppflags-append       -I${prefix}/include/ossp
53
54build.type              gnu
55build.target
56
57test.run                yes
58test.target             check
59
60livecheck.check regex
61livecheck.url   ${homepage}
62livecheck.regex (8.3.\[0-9\]+)
63
64set contribs    "adminpack dblink fuzzystrmatch lo uuid-ossp pg_buffercache pg_trgm pgcrypto tsearch2 vacuumlo xml2"
65
66post-build {
67        foreach contrib ${contribs} {
68                system "cd ${worksrcpath}/contrib/${contrib}/ && ${build.cmd}"
69        }
70}
71
72post-destroot {
73        foreach contrib ${contribs} {
74                system "echo contrib: \"${contrib}\""
75                system "cd ${worksrcpath}/contrib/${contrib}/ && \
76                        ${destroot.cmd} install ${destroot.destdir} && touch DONE"
77        }
78        system "cd ${destroot}${prefix}/bin && ln -sf ${libdir}/bin/psql psql83"
79        file delete -force ${destroot}${prefix}/share/doc/${name} \
80                ${destroot}${prefix}/share/man
81}
82
83variant python description {add support for python} {
84        depends_lib-append              port:python25
85        configure.args-append   --with-python
86        configure.env-append    PYTHON=${prefix}/bin/python2.5
87}
88
89variant krb5 description {add support for Kerberos 5 authentication} {
90        configure.args-append   --with-krb5
91}
92
93variant perl description {add Perl support} {
94        depends_lib-append                      bin:perl:perl5
95        configure.args-append           --with-perl
96}
97
98variant tcl description {add Tcl support} {
99        depends_lib-append                      port:tcl
100        configure.args-append           --with-tcl --with-tclconfig=${prefix}/lib
101        configure.env-append            TCLSH=${prefix}/bin/tclsh
102}
103
104post-install {
105        ui_msg "\nTo use the postgresql server, install the postgresql83-server port"
106}
107