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 | |
---|
3 | PortSystem 1.0 |
---|
4 | PortGroup github 1.0 |
---|
5 | |
---|
6 | github.setup maxmind mod_maxminddb 1.1.0 |
---|
7 | revision 0 |
---|
8 | checksums rmd160 bab39c27d8aba3e6a6cb8f010ebdab3ef23575da \ |
---|
9 | sha256 b31e63764ddcc1379229059a4726c733ee0538018727b1336d02afaaa8940782 \ |
---|
10 | size 99821 |
---|
11 | |
---|
12 | categories www |
---|
13 | platforms darwin |
---|
14 | maintainers nomaintainer |
---|
15 | license Apache-2 |
---|
16 | |
---|
17 | description This module allows you to query MaxMind DB files from Apache 2.2+ \ |
---|
18 | using the libmaxminddb library. |
---|
19 | |
---|
20 | long_description ${description} |
---|
21 | |
---|
22 | homepage https://maxmind.github.io/mod_maxminddb/ |
---|
23 | github.tarball_from releases |
---|
24 | |
---|
25 | depends_lib port:apache2 \ |
---|
26 | port:libmaxminddb |
---|
27 | |
---|
28 | set apxs ${prefix}/bin/apxs |
---|
29 | set ddir ${prefix}/share/doc/${name} |
---|
30 | set dbdir ${prefix}/share/GeoIP |
---|
31 | set mdir ${prefix}/lib/apache2/modules |
---|
32 | |
---|
33 | patchfiles Wl.patch \ |
---|
34 | add-readme-dbfiles.diff |
---|
35 | |
---|
36 | configure.args --with-apxs=${apxs} \ |
---|
37 | --disable-dependency-tracking |
---|
38 | |
---|
39 | test.run yes |
---|
40 | test.target check |
---|
41 | |
---|
42 | destroot { |
---|
43 | xinstall -d -m 0755 ${destroot}${mdir} ${destroot}${ddir} ${destroot}${dbdir} |
---|
44 | xinstall -m 0644 -W ${worksrcpath} Changes.md CONTRIBUTING.md \ |
---|
45 | LICENSE README.md TESTING.md ${destroot}${ddir} |
---|
46 | xinstall -m 0644 -W ${worksrcpath} ReadMe_DBFiles.md ${destroot}${dbdir} |
---|
47 | xinstall -m 0755 ${worksrcpath}/src/.libs/${name}.so ${destroot}${mdir} |
---|
48 | } |
---|
49 | |
---|
50 | notes " |
---|
51 | If this your first install, you might want to enable ${name} in Apache: |
---|
52 | |
---|
53 | cd ${mdir} |
---|
54 | sudo ${apxs} -a -e -n \"maxminddb\" mod_maxminddb.so |
---|
55 | |
---|
56 | And then relaunch Apache: |
---|
57 | |
---|
58 | $ sudo apachectl restart |
---|
59 | |
---|
60 | - - - |
---|
61 | |
---|
62 | Examples/setup: ${ddir}/README.md |
---|
63 | https://github.com/maxmind/mod_maxminddb#examples |
---|
64 | |
---|
65 | Database files: https://dev.maxmind.com/geoip/geoip2/geolite2/#Downloads |
---|
66 | Put them in: ${dbdir} |
---|
67 | |
---|
68 | MaxMindDBEnable On |
---|
69 | MaxMindDBFile COUNTRY_DB ${dbdir}/GeoLite2-Country.mmdb |
---|
70 | MaxMindDBFile CITY_DB ${dbdir}/GeoLite2-City.mmdb |
---|
71 | " |
---|