Re: [NEW] net/libmaxminddb

2016-06-27 Thread Giovanni Bechis
On 06/26/16 21:53, Frederic Cambus wrote:
> On Wed, Jun 22, 2016 at 08:11:39PM +0100, Stuart Henderson wrote:
>>>
>>> Issue fixed, thanks. New tarball attached if anyone wants to import.
>>
>> OK sthen@.
> 
> Ping. Could anyone import this? Thanks!
> 
I will take care of it soon.
 Giovanni



Re: [NEW] net/libmaxminddb

2016-06-26 Thread Frederic Cambus
On Wed, Jun 22, 2016 at 08:11:39PM +0100, Stuart Henderson wrote:
> > 
> > Issue fixed, thanks. New tarball attached if anyone wants to import.
> 
> OK sthen@.

Ping. Could anyone import this? Thanks!



Re: [NEW] net/libmaxminddb

2016-06-22 Thread Stuart Henderson
On 2016/06/22 20:30, Frederic Cambus wrote:
> On Tue, Jun 21, 2016 at 11:55:05PM +0200, Giovanni Bechis wrote:
> 
> > there is a missing TEST_DEPENDS on devel/p5-IPC-Run3,
> > other than that ok giovanni@
> 
> Issue fixed, thanks. New tarball attached if anyone wants to import.
> 
> > > Sure, I have a script to generate the tarballs, which also checksums DB
> > > files before packing them. I'll clean it up so it can be added after
> > > import.
> > > 
> > I think it should be a new target in our Makefile, but we could work on that
> > in-tree.
> 
> Yes that's the plan, in order to have something similar to what
> net/GeoIP is doing.
> 

OK sthen@.




Re: [NEW] net/libmaxminddb

2016-06-22 Thread Frederic Cambus
On Tue, Jun 21, 2016 at 11:55:05PM +0200, Giovanni Bechis wrote:

> there is a missing TEST_DEPENDS on devel/p5-IPC-Run3,
> other than that ok giovanni@

Issue fixed, thanks. New tarball attached if anyone wants to import.

> > Sure, I have a script to generate the tarballs, which also checksums DB
> > files before packing them. I'll clean it up so it can be added after
> > import.
> > 
> I think it should be a new target in our Makefile, but we could work on that
> in-tree.

Yes that's the plan, in order to have something similar to what
net/GeoIP is doing.



libmaxminddb.tar.gz
Description: application/tar-gz


Re: [NEW] net/libmaxminddb

2016-06-21 Thread Giovanni Bechis
On Tue, Jun 21, 2016 at 07:55:02PM +0200, Frederic Cambus wrote:
> On Tue, Jun 21, 2016 at 10:37:44AM +0100, Stuart Henderson wrote:
> > 
> > There are mixed "VARNAME=" and "VARNAME =" in the Makefile, could
> > you pick one please. Then it will be OK with me to import..
> 
> New tarball attached, addressing those issues.
> 
there is a missing TEST_DEPENDS on devel/p5-IPC-Run3,
other than that ok giovanni@

> > I would also like to have a helper target to generate the db files
> > so that if it's necessary for someone else to update them they
> > can do so, though that can be done after importing.
> 
> Sure, I have a script to generate the tarballs, which also checksums DB
> files before packing them. I'll clean it up so it can be added after
> import.
> 
I think it should be a new target in our Makefile, but we could work on that
in-tree.
 Cheers
  Giovanni



Re: [NEW] net/libmaxminddb

2016-06-21 Thread Frederic Cambus
On Tue, Jun 21, 2016 at 10:37:44AM +0100, Stuart Henderson wrote:
> 
> There are mixed "VARNAME=" and "VARNAME =" in the Makefile, could
> you pick one please. Then it will be OK with me to import..

New tarball attached, addressing those issues.

> I would also like to have a helper target to generate the db files
> so that if it's necessary for someone else to update them they
> can do so, though that can be done after importing.

Sure, I have a script to generate the tarballs, which also checksums DB
files before packing them. I'll clean it up so it can be added after
import.



libmaxminddb.tar.gz
Description: application/tar-gz


Re: [NEW] net/libmaxminddb

2016-06-21 Thread Stuart Henderson
On 2016/06/18 16:27, Frederic Cambus wrote:
> On Sun, May 29, 2016 at 10:25:59PM +0200, Frederic Cambus wrote:
> 
> > > Do you fancy adding GeoLite2 dbs as subpackages, something like
> > > net/GeoIP does? (They could go in a separate port but I think it
> > > makes it easier for people to find them if it's in the main one).
> > 
> > Sure, here is a new tarball implementing the suggestion, I tried to
> > stay as close as possible to what net/GeoIP is doing.
> > 
> > The DB files are installed in ${LOCALSTATEDIR}/db/GeoIP/, same path
> > as net/GeoIP. I'm not sure if it's a good idea or not, but in case
> > geoipupdate gets imported, it would allow to update both GeoLite and 
> > GeoLite2 databases with only one configuration file.
> 
> New tarball attached, with an updated GeoLite2 databases distribution
> file containing the latest version released in June.
> 
> Comments? OK?
> 

There are mixed "VARNAME=" and "VARNAME =" in the Makefile, could
you pick one please. Then it will be OK with me to import..

I would also like to have a helper target to generate the db files
so that if it's necessary for someone else to update them they
can do so, though that can be done after importing.



Re: [NEW] net/libmaxminddb

2016-06-18 Thread Frederic Cambus
On Sun, May 29, 2016 at 10:25:59PM +0200, Frederic Cambus wrote:

> > Do you fancy adding GeoLite2 dbs as subpackages, something like
> > net/GeoIP does? (They could go in a separate port but I think it
> > makes it easier for people to find them if it's in the main one).
> 
> Sure, here is a new tarball implementing the suggestion, I tried to
> stay as close as possible to what net/GeoIP is doing.
> 
> The DB files are installed in ${LOCALSTATEDIR}/db/GeoIP/, same path
> as net/GeoIP. I'm not sure if it's a good idea or not, but in case
> geoipupdate gets imported, it would allow to update both GeoLite and 
> GeoLite2 databases with only one configuration file.

New tarball attached, with an updated GeoLite2 databases distribution
file containing the latest version released in June.

Comments? OK?



libmaxminddb.tar.gz
Description: application/tar-gz


Re: [NEW] net/libmaxminddb

2016-05-29 Thread Frederic Cambus
On Thu, May 26, 2016 at 10:12:02AM +0100, Stuart Henderson wrote:
> > 
> > The libmaxminddb library provides a C library for reading MaxMind DB files,
> > including the GeoIP2 databases from MaxMind. This is a custom binary format
> > designed to facilitate fast lookups of IP adresses while allowing for great
> > flexibility in the type of data associated with an address.
> > 
> 
> We could fit a bit more information into COMMENT, how about this?

> library for MaxMind GeoIP2/GeoLite2 IP geolocation databases

Sounds better indeed, used this as COMMENT-main.

> Do you fancy adding GeoLite2 dbs as subpackages, something like
> net/GeoIP does? (They could go in a separate port but I think it
> makes it easier for people to find them if it's in the main one).

Sure, here is a new tarball implementing the suggestion, I tried to
stay as close as possible to what net/GeoIP is doing.

The DB files are installed in ${LOCALSTATEDIR}/db/GeoIP/, same path
as net/GeoIP. I'm not sure if it's a good idea or not, but in case
geoipupdate gets imported, it would allow to update both GeoLite and 
GeoLite2 databases with only one configuration file.



libmaxminddb.tar.gz
Description: application/tar-gz


Re: [NEW] net/libmaxminddb

2016-05-26 Thread Stuart Henderson
On 2016/05/25 17:02, Frederic Cambus wrote:
> Hi ports@,
> 
> Here is a new port for net/libmaxminddb.
> 
> There is an example program [1] provided in the Git repository in order
> to test the library, which can be compiled as follow:
> 
> gcc example.c -I/usr/local/include -L/usr/local/lib -lmaxminddb -oexample
> 
> After downloading a GeoLite2 database [2], it can be tested as follow:
> 
> example GeoLite2-Country.mmdb 129.128.5.194
> example GeoLite2-City.mmdb 129.128.5.194
> 
> [1] 
> https://github.com/maxmind/libmaxminddb/blob/master/doc/libmaxminddb.md#example
> [2] https://dev.maxmind.com/geoip/geoip2/geolite2/
> 
> From DESCR:
> 
> The libmaxminddb library provides a C library for reading MaxMind DB files,
> including the GeoIP2 databases from MaxMind. This is a custom binary format
> designed to facilitate fast lookups of IP adresses while allowing for great
> flexibility in the type of data associated with an address.
> 

We could fit a bit more information into COMMENT, how about this?

library for MaxMind GeoIP2/GeoLite2 IP geolocation databases

Do you fancy adding GeoLite2 dbs as subpackages, something like
net/GeoIP does? (They could go in a separate port but I think it
makes it easier for people to find them if it's in the main one).

Otherwise looking good.



[NEW] net/libmaxminddb

2016-05-25 Thread Frederic Cambus
Hi ports@,

Here is a new port for net/libmaxminddb.

There is an example program [1] provided in the Git repository in order
to test the library, which can be compiled as follow:

gcc example.c -I/usr/local/include -L/usr/local/lib -lmaxminddb -oexample

After downloading a GeoLite2 database [2], it can be tested as follow:

example GeoLite2-Country.mmdb 129.128.5.194
example GeoLite2-City.mmdb 129.128.5.194

[1] 
https://github.com/maxmind/libmaxminddb/blob/master/doc/libmaxminddb.md#example
[2] https://dev.maxmind.com/geoip/geoip2/geolite2/

>From DESCR:

The libmaxminddb library provides a C library for reading MaxMind DB files,
including the GeoIP2 databases from MaxMind. This is a custom binary format
designed to facilitate fast lookups of IP adresses while allowing for great
flexibility in the type of data associated with an address.



libmaxminddb.tar.gz
Description: application/tar-gz