# here goes apache2 specific macroses
# (although not all of them are required
# for building modules)
%apache2_branch			2
%apache2_name			apache%apache2_branch
%apache2_dname			httpd%apache2_branch

%apache2_version		%get_version %apache2_name-devel
%apache2_release		%get_release %apache2_name-devel

# Users and groups
%apache2_user			%apache2_name
%apache2_group			%apache2_name
%apache2_webmaster		%webserver_webmaster

# Use webserver-common macros
%apache2_datadir		%webserver_datadir
%apache2_htdocsdir		%webserver_htdocsdir
%apache2_htdocsaddondir		%webserver_htdocsaddondir
%apache2_cgibindir		%webserver_cgibindir
%apache2_iconsdir		%webserver_iconsdir
%apache2_iconssmalldir		%webserver_iconssmalldir
%apache2_vhostdir		%webserver_vhostdir
%apache2_webappsdir		%webserver_webappsdir

# Server specific datadirs
%apache2_serverdatadir		%webserver_datadir/%apache2_name
%apache2_manualdir		%apache2_serverdatadir/manual
%apache2_errordir		%apache2_serverdatadir/error

# Macros for support the old configurations
%apache2_compat_datadir		%apache2_serverdatadir
%apache2_compat_htdocsdir	%apache2_compat_datadir/html
%apache2_compat_htdocsaddondir	%apache2_compat_datadir/manual-addons
%apache2_compat_cgibindir	%apache2_compat_datadir/cgi-bin
%apache2_compat_iconsdir	%apache2_compat_datadir/icons
%apache2_compat_iconssmalldir	%apache2_compat_iconsdir/small
%apache2_compat_vhostdir	%apache2_vhostdir
%apache2_compat_webappsdir	%apache2_webappsdir
%apache2_compat_manualdir	%apache2_manualdir
%apache2_compat_errordir	%apache2_errordir

%apache2_bindir			%_bindir
%apache2_sbindir		%_sbindir
%apache2_mandir			%_mandir
%apache2_localstatedir		%_var
%apache2_logfiledir		%_logdir/%apache2_dname
%apache2_includedir		%_includedir/%apache2_name
%apache2_runtimedir		%_var/run/%apache2_dname
%apache2_proxycachedir		%_cachedir/%apache2_dname
%apache2_spooldir		%_spooldir/%apache2_name
%apache2_infodir		%_infodir
%apache2_libdir			%_libdir/%apache2_name
%apache2_installbuilddir	%apache2_libdir/build
%apache2_moduledir		%apache2_libdir/modules
%apache2_libexecdir		%apache2_moduledir
%apache2_logdir			%_logdir/%apache2_dname
%apache2_tmpdir			%_spooldir/%apache2_name

# Basedir
%apache2_basedir		%_sysconfdir/%apache2_dname

# Links in basedir
%apache2_modulelink		%apache2_basedir/modules
%apache2_loglink		%apache2_basedir/logs
%apache2_runtimelink		%apache2_basedir/run

# Configs
%apache2_confdir_name		conf
%apache2_confdir		%apache2_basedir/%apache2_confdir_name
%apache2_conf			%apache2_confdir/%apache2_dname.conf

# Debian`like conf
%apache2_mods_available		%apache2_confdir/mods-available
%apache2_mods_enabled		%apache2_confdir/mods-enabled
%apache2_mods_start		%apache2_confdir/mods-start.d
%apache2_ports_available	%apache2_confdir/ports-available
%apache2_ports_enabled		%apache2_confdir/ports-enabled
%apache2_ports_start		%apache2_confdir/ports-start.d
%apache2_sites_available	%apache2_confdir/sites-available
%apache2_sites_enabled		%apache2_confdir/sites-enabled
%apache2_sites_start		%apache2_confdir/sites-start.d
%apache2_extra_available	%apache2_confdir/extra-available
%apache2_extra_enabled		%apache2_confdir/extra-enabled
%apache2_extra_start		%apache2_confdir/extra-start.d

# Old macros
%apache2_addonconfdir		%apache2_confdir/addon.d

# This tells apache-based packages what
# APR to require and use
%apache2_apr_buildreq		"libapr1-devel libaprutil1-devel"
%apache2_apr_config		%_bindir/apr-1-config
%apache2_apu_config		%_bindir/apu-1-config

%apache2_exec_prefix		%prefix

%apache2_apxs			%_sbindir/apxs%apache2_branch

%apache2_suexec_docroot		/home

# Standard %%post/%%postun scripts for packages extending apache configuration
# see also https://bugzilla.altlinux.org/show_bug.cgi?id=1735
%post_apache2conf	/sbin/service %apache2_dname condreload
%postun_apache2conf	/sbin/service %apache2_dname condreload
