-
Notifications
You must be signed in to change notification settings - Fork 4
/
macros.apache2
54 lines (46 loc) · 1.38 KB
/
macros.apache2
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
41
42
43
44
45
46
47
48
49
50
51
52
53
# SPDX-License-Identifier: MIT
%apache2_apxs %{_bindir}/apxs2
%apache2_mmn %(%{apache2_apxs} -q HTTPD_MMN)
%apache2_modconfdir %{_sysconfdir}/apache2/mods-available
%apache2_confdir %{_sysconfdir}/apache2/conf-available
%apache2_contentdir %{_datadir}/apache2
%apache2_moddir %{_prefix}/lib/apache2/modules
# Fedora-ish names for compatibility
%_httpd_mmn %{apache2_mmn}
%_httpd_apxs %{apache2_apxs}
%_httpd_modconfdir %{apache2_modconfdir}
%_httpd_confdir %{apache2_confdir}
%_httpd_contentdir %{apache2_contentdir}
%_httpd_moddir %{apache2_moddir}
%apache2_module_post() \
if [ "$1" = "configure" ] ; then \
# Initial installation \
a2enmod %{1} >/dev/null 2>&1 || : \
fi \
%{nil}
%apache2_module_preun() \
if [ "$1" = "remove" ]; then \
# Package removal, not upgrade \
a2dismod %{1} > /dev/null 2>&1 || : \
fi \
if [ "$1" = "purge" ]; then \
# Package removal, not upgrade \
a2dismod -p %{1} > /dev/null 2>&1 || : \
fi \
%{nil}
%apache2_conf_post() \
if [ "$1" = "configure" ] ; then \
# Initial installation \
a2enconf %{1} >/dev/null 2>&1 || : \
fi \
%{nil}
%apache2_conf_preun() \
if [ "$1" = "remove" ]; then \
# Package removal, not upgrade \
a2disconf %{1} > /dev/null 2>&1 || : \
fi \
if [ "$1" = "purge" ]; then \
# Package removal, not upgrade \
a2disconf -p %{1} > /dev/null 2>&1 || : \
fi \
%{nil}