Ticket #553: Portfile.3

File Portfile.3, 2.7 KB (added by bchesneau@…, 21 years ago)

Portfile

Line 
1PortSystem 1.0
2name            phpmyadmin
3version         2.5.4
4categories      www
5maintainers     bchesneau@mac.com
6description     web-based utility to manage MySQL databases
7platforms       darwin freebsd
8
9distfiles               phpMyAdmin-${version}-php.tar.gz
10distname                phpMyAdmin-${version}-php
11master_sites    sourceforge http://distfiles.opendarwin.org/
12master_sites.mirror_subdir  ${name}
13extract.only    ${distname}${extract.sufx}
14checksums               phpMyAdmin-2.5.4-php.tar.gz md5 76fc7216aa2f132888c7173a6668af46
15worksrcdir              phpMyAdmin-${version}
16
17       
18       
19variant apache_layout {
20        depends_lib-append      path:${prefix}/apache/bin/apxs:apache
21        path:${apache_path}/apache/libexec/libphp4.so:php4
22}
23
24variant apache {
25        if { ! [variant_isset apache_layout] } {
26                depends_lib-append      path:${prefix}/sbin/apxs:apache
27                path:${apache_path}/libexec/apache/libphp4.so:php4
28        }
29}
30
31variant apache {
32        depends_lib     path:${apache_path}/sbin/apxs:apache \
33                                        path:${apache_path}/libexec/apache/libphp4.so:php4
34}
35
36variant apache2 {
37        depends_lib     path:${prefix}/apache2/bin/apxs:apache2 \
38                                path:${prefix}/apache2/modules/libphp4.so:php4
39       
40}
41
42variant mysql {
43        depends_lib-append      lib:libmysqlclient:mysql
44}
45
46variant mysql4 {
47        depends_lib-append      lib:libmysqlclient:mysql4
48}
49
50use_configure   no
51
52configure { }
53
54build { }
55
56destroot {
57        if { [variant_isset apache] } {
58                if { [variant_isset apache_layout] } {
59                        file mkdir ${destroot}${prefix}/apache/htdocs
60                        system "mv ${workpath}/${worksrcdir} ${destroot}${prefix}/apache/htdocs/phpmyadmin"
61                        system "chown -R root:admin ${destroot}${prefix}/apache/htdocs/phpmyadmin"
62               
63                        if { [file exists ${prefix}/apache/htdocs/phpmyadmin/config.inc.php] } {
64                                system "mv ${destroot}${prefix}/apache/htdocs/phpmyadmin/config.inc.php ${destroot}${prefix}/apache/htdocs/phpmyadmin/config.inc.php.sample"
65                        }
66                } else {
67                        file mkdir ${destroot}${prefix}/www/data
68                        system "mv ${workpath}/${worksrcdir} ${destroot}${prefix}/www/data/phpmyadmin"
69                        system "chown -R root:admin ${destroot}${prefix}/www/data/phpmyadmin"
70               
71                        if { [file exists ${prefix}/www/data/phpmyadmin/config.inc.php] } {
72                                system "mv ${destroot}${prefix}/www/data/phpmyadmin/config.inc.php ${destroot}${prefix}/www/data/phpmyadmin/config.inc.php.sample"
73                        }
74               
75               
76                }
77        }
78       
79        if { [variant_isset apache2] } {
80                file mkdir ${destroot}${prefix}/apache2/htdocs
81                system "mv ${workpath}/${worksrcdir} ${destroot}${prefix}/apache2/htdocs/phpmyadmin"
82                system "chown -R root:admin ${destroot}${prefix}/apache2/htdocs/phpmyadmin"
83               
84                if { [file exists ${prefix}/apache2/htdocs/phpmyadmin/config.inc.php] } {
85                        system "mv ${destroot}${prefix}/apache2/htdocs/phpmyadmin/config.inc.php ${destroot}${prefix}/apache2/htdocs/phpmyadmin/config.inc.php.sample"
86                }
87        }
88
89}