# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: apache-paths.eclass # @MAINTAINER: # Apache team # @AUTHOR: # Author: Michael Orlitzky # @SUPPORTED_EAPIS: 7 8 # @BLURB: Provides important paths for the apache web server. # @DESCRIPTION: # Several packages need to know apache's paths: contributed modules, # anything that runs a vhost, and of course www-servers/apache # itself. This eclass serves as a central location where those paths # are defined so that everyone can retrieve them from a single # authoritative location. # # These days, we could let www-servers/apache define those paths, and # then retrieve them with $(apxs -q ). However, that seems a # bit too complicated; given that, ultimately, we have to write down # the paths at least once, it might as well be here. # # Unlike the depend.apache eclass that it replaces, this eclass does not # declare any dependencies or USE flags. Consumers must depend on apache # themselves if desired. # case "${EAPI:-0}" in [78]) ;; *) die "Unsupported EAPI=${EAPI} for ${ECLASS}" ;; esac # @FUNCTION: apache-path-sysconfdir # @DESCRIPTION: # Return the --sysconfdir location from apache's ./configure, including # the leading EPREFIX. The module and vhost configuration directories # are static subdirectories of this, and (for example) httpd.conf is # stored here. apache-path-sysconfdir() { echo "${EPREFIX}/etc/apache2" } # @FUNCTION: apache-path-modules.d # @DESCRIPTION: # Return the location where apache's module configuration files are # stored. The leading EPREFIX is included. apache-path-modules.d() { echo "$(apache-path-sysconfdir)/modules.d" } # @FUNCTION: apache-path-vhosts.d # @DESCRIPTION: # Return the location where apache's vhost configuration files are # stored. The leading EPREFIX is included. apache-path-vhosts.d() { echo "$(apache-path-sysconfdir)/vhosts.d" } # @FUNCTION: apache-path-libexecdir # @DESCRIPTION: # Return the --libexecdir location from apache's ./configure, including # the leading EPREFIX. This is where its binary module files are stored. apache-path-libexecdir() { echo "${EPREFIX}/usr/$(get_libdir)/apache2/modules" }