summaryrefslogtreecommitdiff
blob: 7a0e31e4cfc031420dcd1357b363445a9d1fb00e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit apache-module autotools

DESCRIPTION="MaxMind DB Apache Module"
HOMEPAGE="https://maxmind.github.io/mod_maxminddb/"
SRC_URI="https://github.com/maxmind/mod_maxminddb/releases/download/${PV}/${P}.tar.gz"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64 x86"

DEPEND="dev-libs/libmaxminddb:="
RDEPEND="${DEPEND}"

need_apache2_4

src_prepare() {
	default
	eautoreconf
}

src_compile() {
	# skipping this results in:
	# Cannot load modules/mod_maxminddb.so into server:
	# /usr/lib64/apache2/modules/mod_maxminddb.so: undefined symbol: MMDB_aget_value
	# because mod_maxminddb.so is not linked with libmaxminddb
	emake
}

src_install() {
	APACHE2_MOD_CONF="70_${PN}"
	APACHE2_MOD_DEFINE="MAXMINDDB"
	APACHE_MODULESDIR="/usr/$(get_libdir)/apache2/modules"

	apache-module_src_install
}