Ticket #14418: Portfile

File Portfile, 3.0 KB (added by giorgio_v@…, 16 years ago)
Line 
1# $Id: Portfile 33748 2008-02-04 16:57:33Z mww@macports.org $
2
3PortSystem 1.0
4
5name                    postgresql83
6version                 8.3.0
7revision                1
8categories              databases
9platforms               darwin
10maintainers             mww jwa
11description             The most advanced open-source database available anywhere.
12long_description PostgreSQL is Object-Relational Database Management System. \
13                                It supports almost all SQL constructs, including transactions, \
14                                subselects, and user-defined types and functions. Write-ahead \
15                                logging means increased performance while retaining data \
16                                integrity.
17
18homepage                http://www.postgresql.org/
19master_sites            postgresql:source/v${version}/
20distname                postgresql-${version}
21
22checksums               md5 53d6816eac7442f9bc8103439ebee22e \
23                        sha1 b221e9a82fdb10af1a2b527551a4e30b7ccb958d \
24                        rmd160 99f48d26d9b0fb0cfda0de7156ad6a9554017d9e
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.cflags-append -I${prefix}/include
53
54build.type              gnu
55build.target
56
57test.run                yes
58test.target             check
59
60livecheck.check regex
61livecheck.url   ${homepage}
62livecheck.regex v(8.3.\[0-9\]+)
63
64set contribs    "adminpack dblink fuzzystrmatch lo uuid-ossp pg_buffercache pg_trgm 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.8
95        configure.args-append           --with-perl
96}
97variant tcl description {add Tcl support} {
98        depends_lib-append              port:tcl
99        configure.args-append           --with-tcl \
100                                        --with-tclconfig=${prefix}/lib
101        configure.env-append    TCLSH=${prefix}/bin/tclsh
102}
103post-install {
104        ui_msg "\nTo use the postgresql server, install the postgresql83-server port"
105}
106