Ticket #14417: Portfile

File Portfile, 2.7 KB (added by giorgio_v@…, 16 years ago)
Line 
1# $Id: Portfile 33260 2008-01-22 11:02:07Z jwa@macports.org $
2
3PortSystem 1.0
4
5name                    postgresql82
6version                 8.2.6
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            postgresql:source/v${version}
19distname                postgresql-${version}
20
21checksums               md5 17b9049b4fcad42ee95410833c1db228 \
22                        sha1 8934dfbd4c1d8c4f2945cb80f02072611681f967
23use_bzip2               yes
24
25depends_lib             port:readline port:openssl port:zlib port:libxml2 port:libxslt
26depends_build           port:bison
27
28set libdir              ${prefix}/lib/${name}
29configure.args  --sysconfdir=${prefix}/etc/${name} \
30                                --bindir=${libdir}/bin \
31                                --libdir=${libdir} \
32                                --includedir=${prefix}/include/${name} \
33                                --datadir=${prefix}/share/${name} \
34                                --mandir=${prefix}/share/man \
35                                --without-docdir \
36                                --with-includes=${prefix}/include \
37                                --with-libraries=${prefix}/lib \
38                                --with-openssl \
39                                --with-bonjour \
40                                --with-readline \
41                                --with-zlib \
42                                --enable-thread-safety \
43                                --enable-integer-datetimes
44
45build.type              gnu
46build.target
47
48test.run                yes
49test.target             check
50
51livecheck.check regex
52livecheck.url   ${homepage}
53livecheck.regex v(8.2.\[0-9\]+)
54
55set contribs    "adminpack dblink fuzzystrmatch lo pg_buffercache pg_trgm tsearch2 vacuumlo xml2"
56
57post-build {
58        foreach contrib ${contribs} {
59                system "cd ${worksrcpath}/contrib/${contrib}/ && ${build.cmd}"
60        }
61}
62
63post-destroot {
64        foreach contrib ${contribs} {
65                system "echo contrib: \"${contrib}\""
66                system "cd ${worksrcpath}/contrib/${contrib}/ && \
67                        ${build.cmd} install ${destroot.destdir} && touch DONE"
68        }
69        system "cd ${destroot}${prefix}/bin && ln -sf ${libdir}/bin/psql psql82"
70        file delete -force ${destroot}${prefix}/share/doc/${name} \
71                ${destroot}${prefix}/share/man
72}
73
74variant python description {add support for python} {
75        depends_lib-append              port:python25
76        configure.args-append   --with-python
77        configure.env-append    PYTHON=${prefix}/bin/python2.5
78}
79
80variant krb5 description {add support for Kerberos 5 authentication} {
81        configure.args-append   --with-krb5
82}
83
84variant perl description {add Perl support} {
85        depends_lib-append                      bin:perl:perl5.8
86        configure.args-append           --with-perl
87}
88variant tcl description {add Tcl support} {
89        depends_lib-append              port:tcl
90        configure.args-append           --with-tcl \
91                                        --with-tclconfig=${prefix}/lib
92        configure.env-append    TCLSH=${prefix}/bin/tclsh
93}
94post-install {
95        ui_msg "\nTo use the postgresql server, install the postgresql82-server port"
96}
97