# -*- coding: ascii; tab-width: 4 -*-
Info2: <<
Package: libmaxminddb
Version: 1.3.2
Revision: 1
Description: C library for the MaxMind DB file format 
License: BSD
Maintainer: Wolfgang Fischer <wodev@users.sourceforge.net>

Depends: %N-shlibs (= %v-%r)
BuildDepends: <<
	fink-package-precedence (>= 0.7-1),
	pkgconfig (>= 0.22-3)
<<

GCC: 4.0

Source: https://github.com/maxmind/libmaxminddb/releases/download/%v/%N-%v.tar.gz
Source-Checksum: SHA256(e6f881aa6bd8cfa154a44d965450620df1f714c6dc9dd9971ad98f6e04f6c0f0)
PatchFile: %n.patch
PatchFile-MD5: 00553dbf5652e684c8e155daf71129f0
PatchScript: <<
	%{default_script}

	# Passing -no-undefined when compiling shared libraries helps diagnose 
	# a class of possible runtime errors that are actually caused by library 
	# errors by triggering an error when the library itself is compiled. 
	perl -pi -e 's/-verison-info/-no-undefined -version-info/' src/Makefile.in

	# It appears the author accidentally didn't clean out some local buildtime 
	# files when rolling the tarball for distribution. Deleting t/.deps 
	# clears the warnings, and the files get regenerated at buildtime.
	[ -d "t/.deps" ] && rm -rf t/.deps
<<

SetLDFLAGS: -Wl,-dead_strip_dylibs
ConfigureParams: <<
	--enable-static=no
<<
CompileScript: <<
	%{default_script}
	fink-package-precedence --prohibit-bdep=%N-dev .
<<
InfoTest: <<
	TestScript: <<
		make check || exit 2
		fink-package-precedence --prohibit-bdep=%N-dev .
	<<
<<
InstallScript: make install DESTDIR=%d

DocFiles: AUTHORS CHANGES.md LICENSE NOTICE README.md
SplitOff: <<
	Package: %N-shlibs
	DocFiles: AUTHORS CHANGES.md LICENSE NOTICE README.md
	Files: <<
		lib/%N.0.dylib
	<<
	Shlibs: <<
		%p/lib/%N.0.dylib 1.0.0 %n (>= 1.3.2-1)
	<<
<<
SplitOff2: <<
	Package: %N-dev
	Depends: %N-shlibs (= %v-%r)
	BuildDependsOnly: true
	
	DocFiles: AUTHORS CHANGES.md LICENSE NOTICE README.md
	Files: <<
		include
		lib
		share/man/man3
	<<
<<

Homepage: http://maxmind.github.io/libmaxminddb/
DescDetail: <<
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 addresses while allowing for great flexibility in the type of data 
associated with an address.

The MaxMind DB format is an open format.
The spec is available at http://maxmind.github.io/MaxMind-DB/. 
This spec is licensed under the Creative Commons Attribution-ShareAlike 3.0 
Unported License.

See http://dev.maxmind.com/ for more details about MaxMind's GeoIP2 products.
<<
<<