source: trunk/dports/net/djbdns/Portfile

Last change on this file was 136685, checked in by ryandesign@…, 2 years ago

djbdns: use expand operator instead of eval

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 6.9 KB
Line 
1# $Id: Portfile 136685 2015-05-24 07:30:37Z ryandesign@macports.org $
2
3PortSystem          1.0
4name                djbdns
5version             1.05
6revision            2
7categories          net
8license             public-domain
9maintainers         nomaintainer
10description         D.J. Bernstein's DNS tools
11long_description \
12   DJBDNS is a collection of Domain Name System tools. It includes several \
13   components: \
14   - The dnscache program is a local DNS cache. It accepts recursive DNS \
15   queries from local clients such as web browsers. It collects responses \
16   from remote DNS servers. \
17   - The tinydns program is a fast, UDP-only DNS server. It makes local DNS \
18   information available to the Internet. \
19   - The pickdns program is a load-balancing DNS server. It points clients \
20   to a dynamic selection of IP addresses. \
21   - The walldns program is a reverse DNS wall. It provides matching reverse \
22   and forward records while hiding local host information. \
23   - The dns library handles outgoing and incoming DNS packets. It can be \
24   used by clients such as web browsers to look up host addresses, host \
25   names, MX records, etc. It supports asynchronous resolution. \
26   - The dnsfilter program is a parallel IP-address-to-host-name converter. \
27   - The dnsip, dnsipq, dnsname, dnstxt, and dnsmx programs are simple \
28   command-line interfaces to DNS. \
29   - The dnsq and dnstrace programs are DNS debugging tools.
30
31homepage            http://cr.yp.to/djbdns.html
32master_sites        ${homepage} \
33                    http://smarden.org/pape/djb/manpages/:man
34distfiles-append    ${distname}-man-20031023.tar.gz:man
35extract.only        ${distname}.tar.gz \
36                    ${distname}-man-20031023.tar.gz
37checksums           ${distname}${extract.suffix} \
38                       md5     3147c5cd56832aa3b41955c7a51cbeb2 \
39                       sha1    2efdb3a039d0c548f40936aa9cb30829e0ce8c3d \
40                       rmd160  a832cbfd93e4ccec6a565492a4ee0b3c1b4b68ed \
41                    ${distname}-man-20031023${extract.suffix} \
42                       md5     14d7329cff69f604fac607436eb8485e \
43                       sha1    3bac8a34a4bc681b9a0e603a77fa11492619e3ce \
44                       rmd160  42a5b3305513851dfe1da46df6f405bc81602fbe
45platforms           darwin
46
47universal_variant   no
48
49depends_run         port:daemontools port:ucspi-tcp
50
51patchfiles          patch-Makefile \
52                    patch-dnscache-conf.c \
53                    patch-hier.c \
54                    patch-dnsroots.global.diff \
55                    patch-response.c.diff
56pre-patch {
57   # The build process will create a tinydns executable, so this needs to
58   # be renamed on case-insensitive file systems
59   move ${worksrcpath}/TINYDNS ${worksrcpath}/TINYDNS.txt
60}
61
62configure {
63   reinplace "s%/usr/local%${prefix}%" ${worksrcpath}/conf-home
64   reinplace "s%__DESTROOT%${destroot}%" ${worksrcpath}/hier.c
65   reinplace "s%__PREFIX%${prefix}%" ${worksrcpath}/hier.c
66   reinplace "s%/etc/dnsrewrite%${prefix}&%" ${worksrcpath}/dns_rcrw.c
67}
68
69build.target        default
70
71destroot.target     setup check
72post-destroot {
73   xinstall -d -m 0755 ${destroot}${prefix}/share/man/man1
74   xinstall -m 0644 {*}[glob ${workpath}/${name}-man/*.1] \
75      ${destroot}${prefix}/share/man/man1
76   xinstall -d -m 0755 ${destroot}${prefix}/share/man/man8
77   xinstall -m 0644 {*}[glob ${workpath}/${name}-man/*.8] \
78      ${destroot}${prefix}/share/man/man8
79   xinstall -m 0755 -d ${destroot}${prefix}/share/doc/${name}
80   xinstall -m 0644 -W ${worksrcpath} CHANGES README TINYDNS.txt TODO \
81      ${destroot}${prefix}/share/doc/${name}
82   xinstall -m 0644 -W ${workpath}/${name}-man README \
83      ${destroot}${prefix}/share/doc/${name}/README_MAN
84}
85
86set ipv6_diff       ${distname}-test23.diff
87variant ipv6 conflicts dumpcache description {Patch in support for IPv6} {
88   master_sites-append   http://www.fefe.de/dns/:ipv6
89   distfiles-append      ${ipv6_diff}.bz2:ipv6
90   checksums-append      ${ipv6_diff}.bz2 \
91                            md5     dc35e88e20ffe2670cef5bb4d8a2c183 \
92                            sha1    34251597d211ff00791cb6546e8ef60d75ce5477 \
93                            rmd160  33037f2a41abb49c305f3efec4402c6965c8b8b8
94   post-patch {
95      ui_info "$UI_PREFIX Applying ${ipv6_diff}"
96      system "cd ${worksrcpath} && (bunzip2 -c ${distpath}/${ipv6_diff}.bz2 | patch -p1)"
97   }
98}
99
100set dumpcache_diff  patch-dnscache-dumpcache-v4.txt
101variant dumpcache conflicts ipv6 description {Enable cache dumping of running dnscache} {
102   master_sites-append   http://efge.free.fr/djbdns/:dumpcache
103   distfiles-append      ${dumpcache_diff}:dumpcache \
104                         prettycache.pl:dumpcache
105   checksums-append      ${dumpcache_diff} \
106                            md5     61441dec12dd627a7fea7c3059cc2542 \
107                            sha1    0bf1bf159336944468c49bf47687b8fdcbd35393 \
108                            rmd160  323ba626b3885b722c09ad6e3f6792053cc8ae11 \
109                         prettycache.pl \
110                            md5     6318e8e866c78adf9b411b58f5088fc2 \
111                            sha1    ea5790ed4678be89e0e82e9c59788f9f4db40dff \
112                            rmd160  2abc43a6a824e2d10919b6200048326b584e0d6b
113   post-patch {
114      ui_info "$UI_PREFIX Applying ${dumpcache_diff}"
115      system "cd ${worksrcpath} && patch -p1 < ${distpath}/${dumpcache_diff}"
116   }
117   post-destroot {
118      xinstall -m 0755 ${distpath}/prettycache.pl ${destroot}${prefix}/bin
119      reinplace "s%^#!.*/perl%#![binaryInPath perl]%" \
120         ${destroot}${prefix}/bin/prettycache.pl
121   }
122}
123
124set ignoreip_diff   ${distname}-ignoreip2.patch
125variant ignoreip description {Patch to allow ignoring a list of IP addresses} {
126   master_sites-append   http://tinydns.org/:ignoreip
127   distfiles-append      ${ignoreip_diff}:ignoreip
128   checksums-append      ${ignoreip_diff} \
129                            md5     c032250b209d055847a763c8d9c7e865 \
130                            sha1    ec4281a6864bd044a84fbfcaaf42baa6b003976d \
131                            rmd160  bf8a0d38ae7bfb09a8ab2a04600680613db10aaa
132   post-patch {
133      ui_info "$UI_PREFIX Applying ${ignoreip_diff}"
134      system "cd ${worksrcpath} && patch -p1 < ${distpath}/${ignoreip_diff}"
135   }
136}
137
138set persistmmap_diff tinydns-persistmmap-20040418.patch
139variant persistmmap description {Add persistmmap to improve some lookup tasks} {
140   master_sites-append   http://people.FreeBSD.org/~roam/ports/patches/dns/:persistmmap
141   distfiles-append      ${persistmmap_diff}:persistmmap
142   checksums-append      ${persistmmap_diff} \
143                            md5     c721977364502180f9563b85cecf133b \
144                            sha1    013690c863c4dbe60d6da4d5470d53afd0b1af11 \
145                            rmd160  4a5747033fea7b1a304b30e42c90c68a5c70bdcc
146   post-patch {
147      ui_info "$UI_PREFIX Applying ${persistmmap_diff}"
148      system "cd ${worksrcpath} && patch -p1 < ${distpath}/${persistmmap_diff}"
149   }
150}
151
152livecheck.type      regex
153livecheck.url       http://cr.yp.to/djbdns/install.html
154livecheck.regex     ${name}-(\[\\d.\]+)${extract.suffix}
155
Note: See TracBrowser for help on using the repository browser.