source: trunk/dports/databases/mysql-zrm/Portfile

Last change on this file was 154101, checked in by mojca@…, 9 months ago

mysql-zrm: switch to perl5.24 (#52081)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.6 KB
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 154101 2016-10-20 03:19:36Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           perl5 1.0
6
7name                mysql-zrm
8version             3.0
9revision            1
10categories          databases sysutils
11maintainers         bitwrangler.com:kmayer
12description         Zmanda Recovery Manager for MySQL
13long_description    Zmanda Recovery Manager (ZRM) \
14                    for MySQL simplifies the life of a Database Administrator \
15                    who needs an easy-to-use yet flexible and robust backup and \
16                    recovery solution for MySQL server. You can find a \
17                    quick start guide at: http://www.zmanda.com/quick-mysql-backup.html
18homepage            http://www.zmanda.com/backup-mysql.html
19platforms           darwin
20master_sites        http://www.zmanda.com/downloads/community/ZRM-MySQL/${version}/Source/
21distname            MySQL-zrm-${version}-release
22
23checksums           rmd160  0573cfbeee98626e17411fb17bda6d76c9ad041d \
24                    sha256  05e0342b190b6475f220014a126ed213442e24af7b6e3295fa914fcb47b1b931
25
26perl5.branches      5.24
27# these are probably just runtime dependencies?
28depends_lib         port:p${perl5.major}-dbi \
29                    port:p${perl5.major}-xml-parser
30use_configure       no
31patchfiles          patch-mysql-zrm-backup-0 \
32                    patch-mysql-zrm-verify-backup-1 \
33                    patch-zrm-pre-scheduler-2 \
34                    patch-mysql-zrm-scheduler-3 \
35                    patch-mysql-zrm-4
36destroot.keepdirs   ${destroot}${prefix}/var/lib/mysql-zrm \
37                    ${destroot}${prefix}/var/log/mysql-zrm
38
39extract.mkdir       yes
40
41post-patch {
42    # Not the most efficient way to do this, but much more readable
43    foreach f [exec find ${worksrcpath} -type f -print] {
44        reinplace "s|/opt/csw/bin|${prefix}/bin|" ${f}
45        reinplace "s|/usr/bin/perl|${perl5.bin}|" ${f}
46        reinplace "s|/usr/bin/mysql-zrm|${prefix}/bin/mysql-zrm|" ${f}
47        reinplace "s|/usr/lib/mysql-zrm|${prefix}/lib/mysql-zrm|" ${f}
48        reinplace "s|/usr/share/mysql-zrm|${prefix}/share/mysql-zrm|" ${f}
49        reinplace "s|/etc/mysql-zrm|${prefix}/etc/mysql-zrm|" ${f}
50        reinplace "s|/var/lib|${prefix}/var/lib|" ${f}
51        reinplace "s|/var/log|${prefix}/var/log|" ${f}
52    }
53    reinplace "s|@BINPATH@|${prefix}/bin|" \
54        ${worksrcpath}/usr/bin/zrm-pre-scheduler \
55        ${worksrcpath}/usr/bin/mysql-zrm-scheduler \
56        ${worksrcpath}/usr/bin/mysql-zrm
57}
58
59build {}
60
61destroot {
62    xinstall -m 755 -d ${destroot}${prefix}/bin
63    xinstall -m 755 {*}[glob ${worksrcpath}/usr/bin/*] \
64        ${destroot}${prefix}/bin
65
66    xinstall -m 755 -d ${destroot}${prefix}/lib/mysql-zrm/Data/Report/Plugin
67    xinstall -m 444 ${worksrcpath}/usr/lib/mysql-zrm/Data/Report.pm \
68        ${destroot}${prefix}/lib/mysql-zrm/Data
69    xinstall -m 444 ${worksrcpath}/usr/lib/mysql-zrm/Data/Report/Base.pm \
70        ${destroot}${prefix}/lib/mysql-zrm/Data/Report
71    xinstall -m 444 {*}[glob ${worksrcpath}/usr/lib/mysql-zrm/Data/Report/Plugin/*] \
72         ${destroot}${prefix}/lib/mysql-zrm/Data/Report/Plugin
73
74    xinstall -m 755 -d ${destroot}${prefix}/lib/mysql-zrm/XML
75    xinstall -m 444 {*}[glob ${worksrcpath}/usr/lib/mysql-zrm/XML/*] \
76        ${destroot}${prefix}/lib/mysql-zrm/XML
77
78    xinstall -m 755 -d ${destroot}${prefix}/lib/mysql-zrm/ZRM
79    xinstall -m 444 {*}[glob ${worksrcpath}/usr/lib/mysql-zrm/ZRM/*] \
80        ${destroot}${prefix}/lib/mysql-zrm/ZRM
81
82    xinstall -m 755 -d ${destroot}${prefix}/share/doc/MySQL-zrm-${version}
83    xinstall -m 444 {*}[glob ${worksrcpath}/usr/share/doc/MySQL-zrm-${version}/*] \
84        ${destroot}${prefix}/share/doc/MySQL-zrm-${version}
85
86    xinstall -m 755 -d ${destroot}${prefix}/share/man/man1
87    xinstall -m 444 {*}[glob ${worksrcpath}/usr/share/man/man1/*] \
88        ${destroot}${prefix}/share/man/man1
89
90    xinstall -m 755 -d ${destroot}${prefix}/share/man/man5
91    xinstall -m 444 {*}[glob ${worksrcpath}/usr/share/man/man5/*] \
92        ${destroot}${prefix}/share/man/man5
93
94    xinstall -m 755 -d ${destroot}${prefix}/share/mysql-zrm/plugins
95    xinstall -m 444 {*}[glob ${worksrcpath}/usr/share/mysql-zrm/plugins/*] \
96        ${destroot}${prefix}/share/mysql-zrm/plugins
97
98    xinstall -m 755 -d ${destroot}${prefix}/etc/mysql-zrm
99    xinstall -m 644 {*}[glob ${worksrcpath}/etc/mysql-zrm/*] \
100        ${destroot}${prefix}/etc/mysql-zrm
101
102    xinstall -m 755 -d ${destroot}${prefix}/var/lib/mysql-zrm
103    xinstall -m 755 -d ${destroot}${prefix}/var/log/mysql-zrm
104}
105
106livecheck.url       http://www.zmanda.com/download-zrm.php
107livecheck.regex     {Release ([\d.]+)}
Note: See TracBrowser for help on using the repository browser.