Hi again, At 09.02.2007 21:48, Niko Tyni wrote:
On Mon, Feb 05, 2007 at 05:42:18PM +0100, Peter Bieringer wrote:
At 02.02.2007 09:40, Niko Tyni wrote:
I still plan to hack the build system so that it could use an external copy of the ip2location and geoip source trees, I just haven't gotten around to doing it yet. With it there would be no need of shipping those in the ipv6calc tarball, which would be a good thing IMO. For sure, would be great if you find time to do the work.
OK, here we go. This patch adds the following configure options:
--with-ip2location-headers=DIR --with-ip2location-lib=DIR --with-ip2location-static
--with-geoip-headers=DIR --with-geoip-lib=DIR --with-geoip-static
Furthermore, it renames (for consistency, YMMV)
--enable-geoip-default-file => --with-geoip-default-file
and removes the now unnecessary
--enable-geoip-system
I had to make also changes to ipv6calc/Makefile.in according to your changes, working now. Also I fixed the spec file, where the with-* options didn't work at all.
There's also some documentation, including instructions on building IP2Location (README.BUILDING-IP2LOCATION), as I run into some problems with it.
The removal of the libraries is not in the patch, you'll have to remove databases/IP2Location and databases/GeoIP yourself. I did modify the LICENSE file to anticipate this, though :)
You might want to consider distributing a modified and bootstrapped version of the IP2Location library tarball separately on your site to make it easier for users.
After short work, I have created a spec file (attached) with all your changes. @others: please do some build/run tests to check, whether the new introduced or changed options are proper working. Thank you, Peter -- Dr. Peter Bieringer http://www.bieringer.de/pb/ GPG/PGP Key 0x958F422D mailto:pb@bieringer.de Deep Space 6 Co-Founder and Core Member http://www.deepspace6.net/ Xing/OpenBC http://www.xing.com/hp/Peter_Bieringer/ %define IP2Location_ver 2.1.1 Summary: IP2Location C API Name: IP2Location Version: %{IP2Location_ver} Release: 1 Source: http://www.ip2location.com/download/C-IP2Location-%{IP2Location_ver}.tar.gz Buildroot: %{_tmppath}/%{name}-%{version}-root License: GPL Group: Development/Libraries Packager: Peter Bieringer <pb@bieringer.de> Vendor: IP2Location <http://www.ip2location.com> BuildPreReq: automake autoconf libtool %description IP2Location is a C library that enables the user to find the country that any IP address or hostname originates from. %package -n IP2Location-devel Version: %{IP2Location_ver} Summary: Development headers and libraries for GeoIP Group: Development/Libraries %description -n IP2Location-devel Development headers and static libraries for building IP2Location-based applications %prep %setup -n C-%{name}-%{IP2Location_ver} ## BUGFIXES BEGIN # Fix DOS-style endings in configure.ac perl -pi.bak -e 's/\r//' configure.ac ## Patch libIP2Location/Makefile.am for proper storage perl -pi.bak -e 's/pkglib_LTLIBRARIES = libIP2Location.la/lib_LTLIBRARIES = libIP2Location.la\ninclude_HEADERS = IP2Location.h bigd.h/' libIP2Location/Makefile.am ## BUGFIXES END autoreconf -i -v --force ./configure --prefix=%{_prefix} --libdir=%{_libdir} %build make %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install # Install demo databases mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name} cp data/* $RPM_BUILD_ROOT%{_datadir}/%{name} %files -n IP2Location %doc COPYING NEWS README AUTHORS INSTALL %{_libdir}/libIP2Location.so %{_datadir}/* %files -n IP2Location-devel %{_libdir}/libIP2Location.a %{_libdir}/libIP2Location.la %{_includedir}/* %changelog * Wed Feb 14 2006 Peter Bieringer <pb@bieringer.de> 2.1.1-1 - Initial creation (some hints from Niko Tyni)