source: trunk/dports/net/maradns/Portfile

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

remove use of [suffix] proc in nomaintainer ports because it is thought to be confusing

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.2 KB
Line 
1# $Id: Portfile 111353 2013-09-19 07:21:56Z ryandesign@macports.org $
2
3PortSystem 1.0
4
5name                    maradns
6version                 1.2.12.09
7
8set branch              [strsed ${version} {s/\.[0-9]*\.[0-9]*$//}]
9
10categories              net
11license                 BSD
12platforms               darwin
13maintainers             nomaintainer
14description             DNS server supporting authoritative, recursive and caching DNS
15long_description        MaraDNS is a fully functional DNS server supporting \
16                        authoritative DNS, recursive DNS, and caching DNS.
17
18homepage                http://www.maradns.org/
19master_sites            http://www.maradns.org/download/${branch}/${version} \
20                        sourceforge
21                       
22checksums               md5     ee82cb6d4989cee2b9937257dc48c025 \
23                        sha1    091964ee898d1ee79e35b9e8bb42ae1df5b076e0 \
24                        rmd160  47b4816d125883d0a7d676677102fc906546f2f8
25
26use_bzip2               yes
27
28patchfiles              patch-configure.diff patch-install.darwin.diff \
29                        patch-build__Makefile.darwin.diff
30
31post-extract {
32# Delete unneeded stress-testing code (not built by default).  It may be worth
33# adding this as a variant in a future revision.
34        file delete -force ${worksrcpath}/sqa
35# Delete Portuguese documentation sources (documentation not built by default;
36# will need to add a section to build these docs if localisation desired)
37        file delete -force ${worksrcpath}/doc/pt_br
38# Delete unneeded English documentation sources (documentation already built)
39# and support files that will otherwise be installed in the doc directories
40        file delete -force ${worksrcpath}/doc/en/source
41        file delete ${worksrcpath}/doc/en/man/read.manpage
42        file delete ${worksrcpath}/doc/en/pdf/tmac.an.patch
43        eval file delete \
44                [glob ${worksrcpath}/doc/en/*/{Makefile,*.embed,make.*}]
45# Fix installation script (called by "make install") so that configuration
46# files and directories are placed in destroot
47        reinplace "s|\$RPM_BUILD_ROOT|${destroot}${prefix}|g" \
48                ${worksrcpath}/build/install.sh
49# Fix hardcoding of default paths to chroot, log and zone file dirs, and
50# configuration file, in source and docs. copy.devs.c is only used if maradns
51# is built for Solaris, and maraconf.sh is neither installed by default nor yet
52# by this Portfile, but hey.
53        set marabindocpages     "duende maradns mararc zoneserver"
54        set marasetupdocpages   "authoritative compile convert dangling \
55                dnsmaster dnsslave dnstcp quick_start recursive update"
56        set marareinplace       "s|/etc/mara|${prefix}/etc/mara|g"
57        foreach docpage ${marabindocpages} {
58                eval reinplace "${marareinplace}" \
59                ${worksrcpath}/doc/en/text/man.${docpage}.txt \
60                ${worksrcpath}/doc/en/tutorial/man.${docpage}.html
61        }
62        foreach docpage ${marasetupdocpages} {
63                eval reinplace "${marareinplace}" \
64                ${worksrcpath}/doc/en/text/${docpage}.txt \
65                ${worksrcpath}/doc/en/tutorial/${docpage}.html
66        }
67        eval reinplace "${marareinplace}" \
68                ${worksrcpath}/MaraDns.h \
69                ${worksrcpath}/build/copy.devs.c \
70                ${worksrcpath}/parse/ParseMaraRc.c \
71                ${worksrcpath}/tools/maraconf.sh \
72                ${worksrcpath}/doc/en/QuickStart \
73                ${worksrcpath}/doc/en/examples/example_authoritative_mararc.txt \
74                ${worksrcpath}/doc/en/examples/example_full_mararc \
75                ${worksrcpath}/doc/en/examples/example_mararc \
76                ${worksrcpath}/doc/en/examples/example_recursive_mararc.txt \
77                ${worksrcpath}/doc/en/man/duende.8 \
78                ${worksrcpath}/doc/en/man/maradns.8 \
79                ${worksrcpath}/doc/en/man/zoneserver.8 \
80                ${worksrcpath}/doc/en/man/mararc.5
81}
82
83
84configure.pre_args
85
86build.args      CPPFLAGS=${configure.cppflags} \
87                CFLAGS=${configure.cflags} \
88                LDFLAGS=${configure.ldflags}
89
90destroot.env    PREFIX=${destroot}${prefix}
91destroot.destdir
92
93# Keep chroot directory for duende (monitors and logs maradns instances)
94#
95# (This places a .turd file in the logger directory, but the duende man page
96# states that it requires a _blank_ logger directory to run (emphasis added).
97# Testing has not revealed any interference from the .turd file so far, but
98# the testing done may not have been exhaustive (I don't know enough about
99# chroot jails).)
100destroot.keepdirs       ${destroot}${prefix}/etc/maradns/logger
101
102post-destroot {
103# Delete remaining unneeded build files; this also deletes the man page for
104# the mqhash tool, which is not installed by default, but it appears to be only
105# for development testing.
106        file delete -force \
107                ${destroot}${prefix}/share/doc/maradns-${version}/Makefile \
108                ${destroot}${prefix}/share/doc/maradns-${version}/man
109        file rename ${destroot}${prefix}/etc/mararc \
110                ${destroot}${prefix}/etc/example-mararc
111}
112
113startupitem.create      yes
114startupitem.init        \
115        "PID=${prefix}/var/run/${name}.pid\nBIN=${prefix}/sbin/maradns"
116startupitem.start       "\[ -x \${BIN} \] && \${BIN} &; echo \$! > \${PID}"
117startupitem.stop        "\[ -r \${PID} \] && /bin/kill \$(cat \${PID})"
118
119post-install {
120        ui_msg "***************************************************************"
121        ui_msg "* To make MaraDNS functional, you will need to create"
122        ui_msg "* ${prefix}/etc/mararc.  Please read the mararc man page"
123        ui_msg "* for details.  Example mararc files are in"
124        ui_msg "* ${prefix}/share/doc/maradns-${version}/examples ."
125        ui_msg "***************************************************************"
126}
127
128variant authonly description {Build only the authoritative DNS server, omitting the recursive one} {
129        configure.args-append   --authonly
130        startupitem.init        \
131                "PID=${prefix}/var/run/${name}.pid\nBIN=${prefix}/sbin/maradns.authonly"
132}
133
134livecheck.type  regex
135livecheck.url   http://www.maradns.org/download/${branch}/${version}/
136livecheck.regex ${name}-(\\d+\\.\\d+\\.\\d+\\.\\d+)${extract.suffix}
Note: See TracBrowser for help on using the repository browser.