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

Last change on this file since 144579 was 144579, checked in by ryandesign@…, 4 years ago

mysql-zrm: use "extract.mkdir yes" instead of doing it manually

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