Ticket #40414: Portfile

File Portfile, 3.1 KB (added by josephsacco, 11 years ago)

Portfile for phpmyadmin-4.06

Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 108947 2013-08-05 01:14:24Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                phpmyadmin
7set my_name         phpMyAdmin
8version             4.0.6
9categories          www php databases
10maintainers         ryandesign openmaintainer
11license             GPL-2
12supported_archs     noarch
13
14description         A tool written in PHP intended to handle the \
15                    administration of MySQL over the Web.
16long_description    phpMyAdmin is a tool written in PHP intended to handle \
17                    the administration of MySQL over the Web. phpMyAdmin \
18                    supports a wide range of operations with MySQL. The most \
19                    frequently used operations are supported by the user \
20                    interface (managing databases, tables, fields, relations, \
21                    indexes, users, permissions, etc), while you still have \
22                    the ability to directly execute any SQL statement.
23homepage            http://www.phpmyadmin.net/
24master_sites        sourceforge:project/phpmyadmin/phpMyAdmin/${version}
25distname            ${my_name}-${version}-all-languages
26use_xz              yes
27
28checksums           rmd160  c127a52ef63827b40c0be6c327831e7b2e7c6040 \
29                    sha256  0ced3883edc540ea525419727b4a5cc54c73ef67f48c0d721ade5cda5e820ba7
30
31platforms           darwin freebsd
32
33# The php variants deliberately do not conflict
34
35foreach php {php5 php53 php54 php55} {
36    eval [subst {
37        variant ${php} description "Use ${php}" {
38            depends_run-append  port:${php}-gd \
39                                port:${php}-mbstring \
40                                port:${php}-mcrypt \
41                                port:${php}-mysql \
42                                port:${php}-zip
43        }
44    }]
45}
46
47if {![variant_isset php5] && ![variant_isset php53] && ![variant_isset php54] && ![variant_isset php55]} {
48    default_variants +php5
49}
50
51set docroot         ${destroot}${prefix}/www/${name}
52set configfile      ${prefix}/www/${name}/config.inc.php
53set configsample    ${prefix}/www/${name}/config.sample.inc.php
54
55use_configure       no
56build               {}
57
58destroot {
59    xinstall -d -m 0755 ${docroot}
60    eval copy [glob ${worksrcpath}/*] ${docroot}
61}
62
63notes "
64phpMyAdmin must be configured before it can be used.\
65Consult the documentation at file://${prefix}/www/phpmyadmin/Documentation.html#config
66
67A sample configuration file is installed at ${configsample}, but you mustn’t edit this file.\
68The file to edit is the real configuration file at ${configfile}.
69"
70
71pre-activate {
72    if {[file exists ${configfile}]} {
73        notes-append "\n\nYour existing config file has not been modified. You should manually compare the new sample config file with your existing config file."
74    }
75}
76
77post-activate {
78    if {![file exists ${configfile}]} {
79        xinstall -m 644 ${configsample} ${configfile}
80    }
81}
82
83livecheck.type      regex
84livecheck.url       ${homepage}home_page/version.php
85livecheck.regex     {^([0-9.]+)$}