* [Buildroot] [PATCHv2 1/2] geoip: new package
@ 2014-06-17 14:39 Gustavo Zacarias
2014-06-17 14:39 ` [Buildroot] [PATCHv2 2/2] php-geoip: " Gustavo Zacarias
2014-06-22 19:54 ` [Buildroot] [PATCHv2 1/2] geoip: " Thomas Petazzoni
0 siblings, 2 replies; 9+ messages in thread
From: Gustavo Zacarias @ 2014-06-17 14:39 UTC (permalink / raw)
To: buildroot
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
package/Config.in | 1 +
package/geoip/Config.in | 11 +++++++++++
package/geoip/geoip.mk | 15 +++++++++++++++
3 files changed, 27 insertions(+)
create mode 100644 package/geoip/Config.in
create mode 100644 package/geoip/geoip.mk
diff --git a/package/Config.in b/package/Config.in
index 9231c45..d9bd23d 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -719,6 +719,7 @@ menu "Networking"
source "package/czmq/Config.in"
source "package/filemq/Config.in"
source "package/fmlib/Config.in"
+ source "package/geoip/Config.in"
source "package/glib-networking/Config.in"
source "package/libcgi/Config.in"
source "package/libcgicc/Config.in"
diff --git a/package/geoip/Config.in b/package/geoip/Config.in
new file mode 100644
index 0000000..a198a31
--- /dev/null
+++ b/package/geoip/Config.in
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_GEOIP
+ bool "geoip"
+ help
+ GeoIP is a C library that enables the user to find geographical
+ and network information of an IP address.
+ To use this library, you need to download MaxMind's free GeoLite or
+ commercial GeoIP binary databases into the target's /usr/share/GeoIP
+ directory in uncompressed form.
+ Note that GeoIP2 / GeoLite2 are not supported by this library.
+
+ https://github.com/maxmind/geoip-api-c
diff --git a/package/geoip/geoip.mk b/package/geoip/geoip.mk
new file mode 100644
index 0000000..fde07cb
--- /dev/null
+++ b/package/geoip/geoip.mk
@@ -0,0 +1,15 @@
+################################################################################
+#
+# geoip
+#
+################################################################################
+
+GEOIP_VERSION = 1.6.0
+GEOIP_SOURCE = GeoIP-$(GEOIP_VERSION).tar.gz
+GEOIP_SITE = $(call github,maxmind,geoip-api-c,v$(GEOIP_VERSION))
+GEOIP_AUTORECONF = YES
+GEOIP_INSTALL_STAGING = YES
+GEOIP_LICENSE = LGPLv2.1+
+GEOIP_LICENSE_FILES = COPYING
+
+$(eval $(autotools-package))
--
1.8.5.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Buildroot] [PATCHv2 2/2] php-geoip: new package
2014-06-17 14:39 [Buildroot] [PATCHv2 1/2] geoip: new package Gustavo Zacarias
@ 2014-06-17 14:39 ` Gustavo Zacarias
2014-06-22 19:55 ` Thomas Petazzoni
2014-06-22 19:54 ` [Buildroot] [PATCHv2 1/2] geoip: " Thomas Petazzoni
1 sibling, 1 reply; 9+ messages in thread
From: Gustavo Zacarias @ 2014-06-17 14:39 UTC (permalink / raw)
To: buildroot
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
package/Config.in | 1 +
package/php-geoip/Config.in | 8 ++++++++
package/php-geoip/php-geoip.mk | 26 ++++++++++++++++++++++++++
3 files changed, 35 insertions(+)
create mode 100644 package/php-geoip/Config.in
create mode 100644 package/php-geoip/php-geoip.mk
diff --git a/package/Config.in b/package/Config.in
index d9bd23d..8bdbe4c 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -429,6 +429,7 @@ endif
if BR2_PACKAGE_PHP
if !BR2_PREFER_STATIC_LIB
menu "External php extensions"
+ source "package/php-geoip/Config.in"
source "package/php-gnupg/Config.in"
source "package/php-imagick/Config.in"
source "package/php-ssh2/Config.in"
diff --git a/package/php-geoip/Config.in b/package/php-geoip/Config.in
new file mode 100644
index 0000000..adb2046
--- /dev/null
+++ b/package/php-geoip/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_PHP_GEOIP
+ bool "php-geoip"
+ depends on BR2_PACKAGE_PHP
+ select BR2_PACKAGE_GEOIP
+ help
+ PHP GeoIP-based IP address mapper to geographical places.
+
+ http://pecl.php.net/package/geoip
diff --git a/package/php-geoip/php-geoip.mk b/package/php-geoip/php-geoip.mk
new file mode 100644
index 0000000..99f74e0
--- /dev/null
+++ b/package/php-geoip/php-geoip.mk
@@ -0,0 +1,26 @@
+################################################################################
+#
+# php-geoip
+#
+################################################################################
+
+PHP_GEOIP_VERSION = 1.1.0
+PHP_GEOIP_SOURCE = geoip-$(PHP_GEOIP_VERSION).tgz
+PHP_GEOIP_SITE = http://pecl.php.net/get
+PHP_GEOIP_CONF_OPT = --with-php-config=$(STAGING_DIR)/usr/bin/php-config \
+ --with-geoip=$(STAGING_DIR)/usr
+# phpize does the autoconf magic
+PHP_GEOIP_DEPENDENCIES = geoip php host-autoconf
+PHP_GEOIP_LICENSE = PHP
+PHP_GEOIP_LICENSE_FILES = LICENSE
+
+define PHP_GEOIP_PHPIZE
+ (cd $(@D); \
+ PHP_AUTOCONF=$(HOST_DIR)/usr/bin/autoconf \
+ PHP_AUTOHEADER=$(HOST_DIR)/usr/bin/autoheader \
+ $(STAGING_DIR)/usr/bin/phpize)
+endef
+
+PHP_GEOIP_PRE_CONFIGURE_HOOKS += PHP_GEOIP_PHPIZE
+
+$(eval $(autotools-package))
--
1.8.5.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Buildroot] [PATCHv2 2/2] php-geoip: new package
2014-06-17 14:39 ` [Buildroot] [PATCHv2 2/2] php-geoip: " Gustavo Zacarias
@ 2014-06-22 19:55 ` Thomas Petazzoni
0 siblings, 0 replies; 9+ messages in thread
From: Thomas Petazzoni @ 2014-06-22 19:55 UTC (permalink / raw)
To: buildroot
Dear Gustavo Zacarias,
On Tue, 17 Jun 2014 11:39:23 -0300, Gustavo Zacarias wrote:
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
> ---
> package/Config.in | 1 +
> package/php-geoip/Config.in | 8 ++++++++
> package/php-geoip/php-geoip.mk | 26 ++++++++++++++++++++++++++
> 3 files changed, 35 insertions(+)
> create mode 100644 package/php-geoip/Config.in
> create mode 100644 package/php-geoip/php-geoip.mk
Applied, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCHv2 1/2] geoip: new package
2014-06-17 14:39 [Buildroot] [PATCHv2 1/2] geoip: new package Gustavo Zacarias
2014-06-17 14:39 ` [Buildroot] [PATCHv2 2/2] php-geoip: " Gustavo Zacarias
@ 2014-06-22 19:54 ` Thomas Petazzoni
2014-06-22 22:34 ` Gustavo Zacarias
1 sibling, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2014-06-22 19:54 UTC (permalink / raw)
To: buildroot
Dear Gustavo Zacarias,
On Tue, 17 Jun 2014 11:39:22 -0300, Gustavo Zacarias wrote:
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
> ---
> package/Config.in | 1 +
> package/geoip/Config.in | 11 +++++++++++
> package/geoip/geoip.mk | 15 +++++++++++++++
> 3 files changed, 27 insertions(+)
> create mode 100644 package/geoip/Config.in
> create mode 100644 package/geoip/geoip.mk
Thanks, applied. One comment below.
> + GeoIP is a C library that enables the user to find geographical
> + and network information of an IP address.
> + To use this library, you need to download MaxMind's free GeoLite or
> + commercial GeoIP binary databases into the target's /usr/share/GeoIP
> + directory in uncompressed form.
Wouldn't it make sense to create a package for the free database, so
that GeoIP can be useful out of the box?
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCHv2 1/2] geoip: new package
2014-06-22 19:54 ` [Buildroot] [PATCHv2 1/2] geoip: " Thomas Petazzoni
@ 2014-06-22 22:34 ` Gustavo Zacarias
2014-06-22 22:40 ` Yann E. MORIN
0 siblings, 1 reply; 9+ messages in thread
From: Gustavo Zacarias @ 2014-06-22 22:34 UTC (permalink / raw)
To: buildroot
On 06/22/2014 04:54 PM, Thomas Petazzoni wrote:
>> + GeoIP is a C library that enables the user to find geographical
>> + and network information of an IP address.
>> + To use this library, you need to download MaxMind's free GeoLite or
>> + commercial GeoIP binary databases into the target's /usr/share/GeoIP
>> + directory in uncompressed form.
>
> Wouldn't it make sense to create a package for the free database, so
> that GeoIP can be useful out of the box?
As the current infra is right now, not really, even with fixes i
wouldn't go for it.
That's because the tarball naming is fixed (no hash, timestamp or
anything) and they change at least daily, so an old
sources.buildroot.net copy/mirror could be really old.
Even if we can say "don't mirror it" the same can happen to people with
their local copy.
Regards.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCHv2 1/2] geoip: new package
2014-06-22 22:34 ` Gustavo Zacarias
@ 2014-06-22 22:40 ` Yann E. MORIN
2014-06-22 22:47 ` Gustavo Zacarias
0 siblings, 1 reply; 9+ messages in thread
From: Yann E. MORIN @ 2014-06-22 22:40 UTC (permalink / raw)
To: buildroot
Gustavo, All,
On 2014-06-22 19:34 -0300, Gustavo Zacarias spake thusly:
> On 06/22/2014 04:54 PM, Thomas Petazzoni wrote:
>
> >> + GeoIP is a C library that enables the user to find geographical
> >> + and network information of an IP address.
> >> + To use this library, you need to download MaxMind's free GeoLite or
> >> + commercial GeoIP binary databases into the target's /usr/share/GeoIP
> >> + directory in uncompressed form.
> >
> > Wouldn't it make sense to create a package for the free database, so
> > that GeoIP can be useful out of the box?
>
> As the current infra is right now, not really, even with fixes i
> wouldn't go for it.
> That's because the tarball naming is fixed (no hash, timestamp or
> anything) and they change at least daily, so an old
> sources.buildroot.net copy/mirror could be really old.
> Even if we can say "don't mirror it" the same can happen to people with
> their local copy.
Then would it make sense to package geoipudate instead, either or both
as a target and/or a host package:
https://github.com/maxmind/geoipupdate
The GeoIP Update program performs automatic updates of GeoIP2 and
GeoIP Legacy binary databases.
That way, the user can get it with a post-build script, and/or a
cron-like job on the target, to be up-to-date.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 9+ messages in thread* [Buildroot] [PATCHv2 1/2] geoip: new package
2014-06-22 22:40 ` Yann E. MORIN
@ 2014-06-22 22:47 ` Gustavo Zacarias
2014-06-23 16:38 ` Yann E. MORIN
0 siblings, 1 reply; 9+ messages in thread
From: Gustavo Zacarias @ 2014-06-22 22:47 UTC (permalink / raw)
To: buildroot
On 06/22/2014 07:40 PM, Yann E. MORIN wrote:
> Then would it make sense to package geoipudate instead, either or both
> as a target and/or a host package:
> https://github.com/maxmind/geoipupdate
>
> The GeoIP Update program performs automatic updates of GeoIP2 and
> GeoIP Legacy binary databases.
>
> That way, the user can get it with a post-build script, and/or a
> cron-like job on the target, to be up-to-date.
Geoipupdate is for commercial users AFAIK, i have no such access/account
to test the package. You need to configure a maxmind user/password to
make it work, it's not an out-of-the-box experience.
Someone who has might be interested to make it though.
Regards.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCHv2 1/2] geoip: new package
2014-06-22 22:47 ` Gustavo Zacarias
@ 2014-06-23 16:38 ` Yann E. MORIN
2014-06-23 16:59 ` Gustavo Zacarias
0 siblings, 1 reply; 9+ messages in thread
From: Yann E. MORIN @ 2014-06-23 16:38 UTC (permalink / raw)
To: buildroot
Gustavo, All,
On 2014-06-22 19:47 -0300, Gustavo Zacarias spake thusly:
> On 06/22/2014 07:40 PM, Yann E. MORIN wrote:
> > Then would it make sense to package geoipudate instead, either or both
> > as a target and/or a host package:
> > https://github.com/maxmind/geoipupdate
> >
> > The GeoIP Update program performs automatic updates of GeoIP2 and
> > GeoIP Legacy binary databases.
> >
> > That way, the user can get it with a post-build script, and/or a
> > cron-like job on the target, to be up-to-date.
>
> Geoipupdate is for commercial users AFAIK, i have no such access/account
> to test the package. You need to configure a maxmind user/password to
> make it work, it's not an out-of-the-box experience.
Well, I don't see where the problem lies. There's nothing that prevents
us from packaging geoipupdate, even if it requires a runtime
configuration with a login+password.
That's basically the same as for a webserver: we do package more than
one webserver, but the user is still responsible for providing the
content of the server-root.
> Someone who has might be interested to make it though.
I agree with you on that. ;-)
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCHv2 1/2] geoip: new package
2014-06-23 16:38 ` Yann E. MORIN
@ 2014-06-23 16:59 ` Gustavo Zacarias
0 siblings, 0 replies; 9+ messages in thread
From: Gustavo Zacarias @ 2014-06-23 16:59 UTC (permalink / raw)
To: buildroot
On 06/23/2014 01:38 PM, Yann E. MORIN wrote:
>> Geoipupdate is for commercial users AFAIK, i have no such access/account
>> to test the package. You need to configure a maxmind user/password to
>> make it work, it's not an out-of-the-box experience.
>
> Well, I don't see where the problem lies. There's nothing that prevents
> us from packaging geoipupdate, even if it requires a runtime
> configuration with a login+password.
>
> That's basically the same as for a webserver: we do package more than
> one webserver, but the user is still responsible for providing the
> content of the server-root.
I disagree a bit there, but then people are free to do what they like,
like shipping a probably toughly-licensed user/pass combination in
plaintext in a firmware which someone else can pick up and use let's say
in shady terms :)
It's mostly intended for servers where access is restricted and that
wouldn't happen normally.
>> Someone who has might be interested to make it though.
>
> I agree with you on that. ;-)
I like to test new packages a bit, and getting the help just doesn't
feel like a proper test, hence my reluctance ;)
Regards.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-06-23 16:59 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-17 14:39 [Buildroot] [PATCHv2 1/2] geoip: new package Gustavo Zacarias
2014-06-17 14:39 ` [Buildroot] [PATCHv2 2/2] php-geoip: " Gustavo Zacarias
2014-06-22 19:55 ` Thomas Petazzoni
2014-06-22 19:54 ` [Buildroot] [PATCHv2 1/2] geoip: " Thomas Petazzoni
2014-06-22 22:34 ` Gustavo Zacarias
2014-06-22 22:40 ` Yann E. MORIN
2014-06-22 22:47 ` Gustavo Zacarias
2014-06-23 16:38 ` Yann E. MORIN
2014-06-23 16:59 ` Gustavo Zacarias
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox