Sisyphus repositório
Última atualização: 25 agosto 2019 | SRPMs: 17347 | Visitas: 14704235
en ru br
ALT Linux repositórios
S:2.4.41-alt1
D:2.2.9-alt11
5.0: 2.2.24-alt2.M50.1
4.1: 2.2.8-alt1
4.0: 2.2.6-alt4
+updates:2.2.6-alt2
3.0: 2.0.55-alt1
+backports:2.0.59-alt0.M30.1

Outros repositórios
Upstream:2.2.8

Group :: Sistema/Servidores
RPM: apache2

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

%define apache_version 2.2.9

# for set release

%define release_pre alt
%define release_base_num 11
%define release_base_num2 %nil
%define release_suff %nil

# for set distr

%define release_distr_num 1

%define n_aprver 1.2.8
%define n_apr_release_devel -alt1.1
%define n_aprutil_release_devel -alt1.1
%define n_apr_devel_ver %n_aprver%n_apr_release_devel
%define n_aprutil_devel_ver %n_aprver%n_aprutil_release_devel

%define mmn 20051115

%if "%apache2_distr_switch" == ""
%if "%release_base_num2" == ""
%define release_num %release_base_num
%else
%define release_num %release_base_num.%release_base_num2
%endif
%define release_distr %nil
%else
%if "%release_base_num2" == ""
%define release_num %(expr %release_base_num - 1)
%else
%define release_num %release_base_num.%(expr %release_base_num2 - 1)
%endif
%define release_distr .%apache2_distr_switch.%release_distr_num
%endif

# release_base set

%define release_base %release_pre%release_num%release_distr

# set libdb

%if "%apache2_libdb_switch" != ""
%define release_libdb .%apache2_libdb_switch
%else
%define release_libdb %nil
%endif

# set apache_release

%define apache_release %release_base%release_suff%release_libdb

# do we use native apr/apu ?

%def_disable static

# handle initscript style change

%define dist_tag Sisyphus
%if "%apache2_distr_switch" == "M24"
%define dist_tag Master
%endif

# name pkg-config pakage

%define n_pkgconfig pkg-config
%if "%apache2_distr_switch" == "M24"
%define n_pkgconfig pkgconfig
%endif

%define apache_configs_branch 2
%define apache_configs_dirs_name %apache2_name-configs-dirs%apache_configs_branch
%define apache_configs_dirs_version %apache_configs_branch.2.0
%define apache_configs_name %apache2_name-configs%apache_configs_branch
%define apache_configs_version %apache_configs_branch.3.2
%define apache_config_tool_branch 0
%define apache_config_tool_name %apache2_name-config-tools
%define apache_config_tool_version %apache_config_tool_branch.1.2

Name:    %apache2_name
Version: %apache_version
Release: %apache_release
License: Apache Software License
Group: System/Servers
Url: http://httpd.apache.org/
Packager: Aleksey Avdeev <solo at altlinux.ru>

Summary: The most widely used Web server on the Internet
Summary(ru_RU.KOI8-R): - Internet
Summary(uk_UA.KOI8-U): ¦ - Internet

# SVN URL: http://svn.apache.org/repos/asf/httpd/httpd/tags/2.2.4

Source0: httpd-%version.tar

#Source10: apache2.favour

Source11: apache2-alt-configs-1.3.tar
Source12: README.ALT.ru_RU.KOI8-R
Source13: apache2-alt-alternatives-0.2.tar

# initscripts for ALM2.2 and friends and current Sisyphus

Source33: httpd2.init.Master
Source35: httpd2.init.Sisyphus

# scripts for control

Source40: cgi-bin_test-cgi.sh
Source41: cgi-bin_printenv.sh

Patch1: apache2-%version-alt-debian.conf-0.3.patch
Patch2: apache2-%version-alt-default_https.conf.in-0.1.patch
Patch3: apache2-%version-alt-configs-0.2.patch
Patch4: apache2-%version-alt-cgi-0.1.patch

BuildRequires(pre): rpm-macros-apache2 >= 1.1
BuildRequires(pre): libssl-devel
BuildPreReq: %_datadir/rpm-build-rpm-eval/rpm-eval.sh
BuildPreReq: rpm-macros-webserver-cgi-bin-control

Requires: %name-base = %version-%release
Requires: webserver-cgi-bin
Requires: webserver-html
Requires: webserver-icons

BuildPreReq: webserver-common
BuildPreReq: libapr1-devel >= %n_apr_devel_ver
BuildPreReq: libaprutil1-devel >= %n_aprutil_devel_ver

# Fix autoconf version

BuildPreReq: autoconf_2.50

# Automatically added by buildreq on Fri Mar 31 2006

BuildRequires: zlib-devel

BuildPreReq: alternatives
BuildPreReq: %n_pkgconfig
%if_enabled static
BuildPreReq: %apache2_libdb-devel-static
BuildPreReq: %apache2_libssl_name-devel-static
BuildPreReq: libsasl2-devel-static
%endif
BuildPreReq: %apache2_libdb-devel
BuildPreReq: libgdbm-devel
BuildPreReq: libexpat-devel
BuildPreReq: libpcre-devel
BuildPreReq: openldap libldap-devel
BuildPreReq: libsasl2-devel libsasl2-plugin-gssapi
BuildPreReq: openssl
#following is required by dbmmanage
BuildPreReq: perl-DBM perl-Digest-SHA1 zlib-devel

%description
Apache is a powerful, full-featured, efficient and freely-available
Web server.

%description -l ru_RU.KOI8-R
Apache - , ,
-.

%package base
Summary: The most widely used Web server on the Internet (base)
Summary(ru_RU.KOI8-R): - Internet ()
Summary(uk_UA.KOI8-U): ¦ - Internet ()
Group: System/Servers

Provides: webserver
Provides: httpd
Provides: %apache_configs_name = %apache_configs_version

Provides: %apache2_addonconfdir/
Provides: %apache2_serverdatadir/
Provides: %apache2_errordir/
Provides: %apache2_errordir/include/
Provides: %apache2_localstatedir/lib/dav

%if "%apache2_branch" == ""
Conflicts: apache-common apache apache-mod_perl
Conflicts: apache-base apache-mod_perl-base
%else
Conflicts: apache-common < 1.3.41rusPL30.23-alt4.2
Conflicts: apache < 1.3.41rusPL30.23-alt4.2
Conflicts: apache-mod_perl < 1.3.41rusPL30.23-alt4.2
%endif

Obsoletes: %name-init
Requires: %apache_configs_dirs_name >= %apache_configs_branch
Requires: %apache_config_tool_name >= %apache_config_tool_branch
Requires: %name-mmn = %mmn
Requires: %name-%apache2_libdb_name = %apache2_libdb_soname
Requires: %name-%apache2_libssl_name = %apache2_libssl_soname
Requires: %name-httpd

%description base
Apache is a powerful, full-featured, efficient and freely-available
Web server.

This package does not require a webserver-cgi-bin, webserver-html and
webserver-icons.

%description -l ru_RU.KOI8-R base
Apache - , ,
-.

webserver-cgi-bin, webserver-html
webserver-icons.

%package full
Summary: The most widely used Web server on the Internet (full)
Summary(ru_RU.KOI8-R): - Internet (full)
Summary(uk_UA.KOI8-U): ¦ - Internet (full)
Group: System/Servers

Requires: %name = %version-%release
Requires: %name-cgi-bin
Requires: %name-html
Requires: %name-icons

%description full
Apache is a powerful, full-featured, efficient and freely-available
Web server.

This package requires a %name-cgi-bin, %name-html and %name-icons.

%description -l ru_RU.KOI8-R full
Apache - , ,
-.

%name-cgi-bin, %name-html %name-icons.

%package common
Summary: Files common for %name installations
Summary(ru_RU.KOI8-R): %name
Summary(uk_UA.KOI8-U): ЦΦ æ %name
Group: System/Servers
Conflicts: %name < 2.2.4-alt17
PreReq: webserver-common
Requires: libapr1 >= %n_aprver
Requires: libaprutil1 >= %n_aprver
Requires: perl-DBM perl-Digest-SHA1 zlib
Provides: %name-mmn = %mmn
Provides: %name-%apache2_libdb_name = %apache2_libdb_soname
Provides: %name-%apache2_libssl_name = %apache2_libssl_soname
Provides: %apache_configs_dirs_name = %apache_configs_dirs_version
Provides: %apache_config_tool_name = %apache_config_tool_version

Provides: %apache2_proxycachedir/
Provides: %apache2_spooldir/
Provides: %apache2_spooldir/tmp/
Provides: %apache2_spooldir/sessions/
Provides: %apache2_spooldir/uploads/
Provides: %apache2_basedir/
Provides: %apache2_confdir/
Provides: %apache2_extra_available/
Provides: %apache2_extra_enabled/
Provides: %apache2_extra_start/
Provides: %apache2_mods_available/
Provides: %apache2_mods_enabled/
Provides: %apache2_mods_start/
Provides: %apache2_ports_available/
Provides: %apache2_ports_enabled/
Provides: %apache2_ports_start/
Provides: %apache2_sites_available/
Provides: %apache2_sites_enabled/
Provides: %apache2_sites_start/
Provides: %apache2_libdir/
Provides: %apache2_moduledir/
Provides: %apache2_logfiledir/
Provides: %apache2_runtimedir/

%description common
This package contains files required for both %name package
installations. Install this if you want to install Apache.

%description -l ru_RU.KOI8-R common
, %name.
, Apache.

%description -l uk_UA.KOI8-U common
ͦ , ˦ ȦΦ %name.
צ , Apache.

%package configs-A1PROXIED
Summary: This is a hack to run proxified Apache2 in case Apache1 is running
Summary(ru_RU.KOI8-R): Apache2 Apache1,
Group: System/Servers
BuildArch: noarch
Requires: %apache_configs_dirs_name >= %apache_configs_branch
Requires: %apache_config_tool_name >= %apache_config_tool_branch

%description configs-A1PROXIED
This is a hack to run proxified Apache2 in case Apache1 is running.

%description -l ru_RU.KOI8-R configs-A1PROXIED
Apache2 Apache1, .

%package httpd-worker
Summary: High speed threaded model for Apache HTTPD 2.1
Summary(ru_RU.KOI8-R): Apache HTTPD 2.1
Group: System/Servers
PreReq: %name-common
Requires: %name-mmn = %mmn
Requires: %name-%apache2_libdb_name = %apache2_libdb_soname
Requires: %name-%apache2_libssl_name = %apache2_libssl_soname
Provides: %apache2_sbindir/%apache2_dname
Provides: %name-httpd = %version-%release

%description httpd-worker
The worker MPM provides a threaded implementation for Apache HTTPD 2.1. It is
considerably faster than the traditional model, and is the recommended MPM.

Worker generally is a good choice for high-traffic servers because it
has a smaller memory footprint than the prefork MPM.

%package httpd-prefork
Summary: Traditional model for Apache HTTPD 2.1
Summary(ru_RU.KOI8-R): Apache HTTPD 2.1
Group: System/Servers
PreReq: %name-common
Requires: %name-mmn = %mmn
Requires: %name-%apache2_libdb_name = %apache2_libdb_soname
Requires: %name-%apache2_libssl_name = %apache2_libssl_soname
Provides: %apache2_sbindir/%apache2_dname
Provides: %name-httpd = %version-%release
Provides: %name-httpd-prefork-like

%description httpd-prefork
This Multi-Processing Module (MPM) implements a non-threaded,
pre-forking web server that handles requests in a manner similar to
Apache 1.3. It is appropriate for sites that need to avoid threading for
compatibility with non-thread-safe libraries. It is also the best MPM
for isolating each request, so that a problem with a single request will
not affect any other.

It is not as fast, but is considered to be more stable.

%package httpd-event
Summary: Event driven model for Apache HTTPD 2.1
Summary(ru_RU.KOI8-R): Apache HTTPD 2.1
Group: System/Servers
PreReq: %name-common
Requires: %name-mmn = %mmn
Requires: %name-%apache2_libdb_name = %apache2_libdb_soname
Requires: %name-%apache2_libssl_name = %apache2_libssl_soname
Provides: %apache2_sbindir/%apache2_dname
Provides: %name-httpd = %version-%release

%description httpd-event
The event Multi-Processing Module (MPM) is designed to allow more
requests to be served simultaneously by passing off some processing
work to supporting threads, freeing up the main threads to work on
new requests.

This MPM is especially suitable for sites that see extensive KeepAlive traffic

%package -n rpm-build-%name
Summary: RPM helper to rebuild Web servers and apps packages
Summary(ru_RU.KOI8-R): Web
Group: Development/Other

Requires: rpm-macros-apache2 >= 1.1

%description -n rpm-build-%name
These helper provide possibility to rebuild Web servers and applications
packages by some ALT Linux Web Packaging Policy.

%description -n rpm-build-%name -l ru_RU.KOI8-R

ALT Linux Web Packaging Policy.

%package devel
Summary: Module development tools for the Apache web server
Summary(ru_RU.KOI8-R): - Apache
Group: Development/C
Obsoletes: secureweb-devel
PreReq: %name-base = %version-%release

Provides: %apache2_includedir/
Provides: %apache2_installbuilddir/

Obsoletes: %apache2_name-libapr %apache2_name-libapr-devel %apache2_name-libapr-devel %apache2_name-libaprutil %apache2_name-libaprutil-devel %apache2_name-libaprutil-devel
Requires: rpm-macros-apache2-%apache2_libdb_name = %apache2_libdb_soname
Requires: libapr1-devel >= %n_apr_devel_ver
Requires: libaprutil1-devel >= %n_aprutil_devel_ver
Requires: rpm-build-%name = %version-%release

%description devel
The apache-devel package contains the source code for the Apache
Web server you'll need to build Dynamic
Shared Objects (DSOs) for Apache.

If you are installing the Apache Web server and
you want to be able to compile or develop additional modules
for Apache, you'll need to install this package.

%description -l ru_RU.KOI8-R devel
- Apache,
(DSO).

- Apache
, .

%package docs
Summary: Apache Manual
Summary(ru_RU.KOI8-R): Apache
Group: Books/Other
AutoReq: no
BuildArch: noarch

%description docs
This package contains the Apache server documentation in HTML format.

%description -l ru_RU.KOI8-R docs
- Apache HTML.

%package manual
Summary: Apache Manual for www
Summary(ru_RU.KOI8-R): Apache www
Group: Books/Other
Requires: %name-docs
Requires: %name-base
Requires: %apache_configs_dirs_name >= %apache_configs_branch
Requires: %apache_config_tool_name >= %apache_config_tool_branch
PreReq: %name-common
AutoReq: no
BuildArch: noarch

%description manual
This package contains the Apache server documentation in HTML format,
for www server using.

%description -l ru_RU.KOI8-R manual
- Apache HTML,
www .

%package manual-addons
Summary: manual-addons dir
Summary(ru_RU.KOI8-R): manual-addons
Group: Books/Other
BuildArch: noarch
PreReq: webserver-common

%description manual-addons
This package contains the manual-addons dir for Apache server.

%description -l ru_RU.KOI8-R manual-addons
manual-addons - Apache.

%package datadirs
Summary: data dirs for Apache
Summary(ru_RU.KOI8-R): Apache
Group: System/Servers
BuildArch: noarch

Provides: %_datadir/%name/
Provides: %_datadir/%name/cgi-bin/

%description datadirs
This package contains the Apache server data dirs.

%description -l ru_RU.KOI8-R datadirs
- Apache.

%package cgi-bin-test-cgi
Summary: cgi-bin/test-cgi for Apache
Summary(ru_RU.KOI8-R): cgi-bin/test-cgi Apache
Group: System/Servers
BuildArch: noarch
PreReq: webserver-common
PreReq: %_sysconfdir/control.d/webserver-cgi-bin-functions
Provides: webserver-cgi-bin-test-cgi
Conflicts: apache-cgi-bin-test-cgi
Conflicts: apache2-cgi-bin < 2.2.9-alt10
Conflicts: apache-common < 1.3.37rusPL30.23-alt1.1

Requires: %_datadir/%name/cgi-bin/

%description cgi-bin-test-cgi
This package contains the Apache server test-cgi scripts.

%description -l ru_RU.KOI8-R cgi-bin-test-cgi
test-cgi - Apache.

%package cgi-bin-printenv
Summary: cgi-bin/printenv for Apache
Summary(ru_RU.KOI8-R): cgi-bin/printenv Apache
Group: System/Servers
BuildArch: noarch
PreReq: webserver-common
PreReq: %_sysconfdir/control.d/webserver-cgi-bin-functions
Provides: webserver-cgi-bin-printenv
Conflicts: apache-cgi-bin-printenv
Conflicts: apache2-cgi-bin < 2.2.9-alt10
Conflicts: apache-common < 1.3.37rusPL30.23-alt1.1

Requires: %_datadir/%name/cgi-bin/

%description cgi-bin-printenv
This package contains the Apache server printenv scripts.

%description -l ru_RU.KOI8-R cgi-bin-printenv
printenv - Apache.

%package cgi-bin
Summary: cgi-bin for Apache
Summary(ru_RU.KOI8-R): cgi-bin Apache
Group: System/Servers
BuildArch: noarch
Provides: webserver-cgi-bin
Requires: %name-cgi-bin-test-cgi
Requires: %name-cgi-bin-printenv
Conflicts: apache-common < 1.3.41rusPL30.23-alt4.2
Conflicts: apache-cgi-bin

%description cgi-bin
This package contains the Apache server cgi-bin dir and cgi scripts.

%description -l ru_RU.KOI8-R cgi-bin
cgi-bin - Apache.

%package html
Summary: html for Apache
Summary(ru_RU.KOI8-R): html Apache
Group: System/Servers
BuildArch: noarch
PreReq: webserver-common
Provides: webserver-html
Conflicts: apache-common < 1.3.41rusPL30.23-alt4.2
Conflicts: apache-html

%description html
This package contains the Apache server html dir.

%description -l ru_RU.KOI8-R html
html - Apache.

%package icons
Summary: icons for Apache
Summary(ru_RU.KOI8-R): icons Apache
Group: System/Servers
BuildArch: noarch
PreReq: webserver-common
Provides: webserver-icons
Conflicts: apache-common < 1.3.41rusPL30.23-alt4.2
Conflicts: apache-icons

%description icons
This package contains the Apache server icons dir.

%description -l ru_RU.KOI8-R icons
icons - Apache.

%package mod_ssl
Group: System/Servers
Summary: SSL/TLS module for the Apache HTTP server
Serial: 1
BuildPreReq: %apache2_libssl_name-devel
PreReq: openssl
PreReq: %name-common
Requires: %name-mmn = %mmn
Requires: %name-%apache2_libdb_name = %apache2_libdb_soname
Requires: %name-%apache2_libssl_name = %apache2_libssl_soname
Requires: %apache_configs_dirs_name >= %apache_configs_branch
Requires: %apache_config_tool_name >= %apache_config_tool_branch

Provides: %apache2_confdir/ssl.crl/
Provides: %apache2_confdir/ssl.crt/
Provides: %apache2_confdir/ssl.key/
Provides: %apache2_proxycachedir/mod_ssl/

%description mod_ssl
The mod_ssl module provides strong cryptography for the Apache Web
server via the Secure Sockets Layer (SSL) and Transport Layer
Security (TLS) protocols.

%package suexec
Summary: Suexec binary for Apache
Summary(ru_RU.KOI8-R): suexec Apache
Summary(uk_UA.KOI8-U): suexec Apache
Group: System/Servers
PreReq: %name-common
Requires: %name-mmn = %mmn
Requires: %name-%apache2_libdb_name = %apache2_libdb_soname
Requires: %name-%apache2_libssl_name = %apache2_libssl_soname
Requires: %apache_configs_dirs_name >= %apache_configs_branch
Requires: %apache_config_tool_name >= %apache_config_tool_branch

%description suexec
This package adds suexec to Apache. Suexec provides Apache users the ability
to run CGI and SSI programs under user IDs different from the user ID of the
calling web-server. Normally, when a CGI or SSI program executes, it runs as
the same user who is running the web server.

%description -l ru_RU.KOI8-R suexec
Apache suexec. CGI-
SSI- , UID
-.

%description -l uk_UA.KOI8-U suexec
Apache suexec. Ѥ CGI-
SSI- Ц Ʀ , צҦ צ
UID -.

%package compat
Summary: Set DocumentRoot in %apache2_serverdatadir
Summary(ru_RU.KOI8-R): DocumentRoot %apache2_serverdatadir
Group: System/Servers
BuildArch: noarch
Requires: %name
Requires: %apache_configs_dirs_name >= %apache_configs_branch
Requires: %apache_config_tool_name >= 0.1.2

Provides: %apache2_compat_htdocsdir/
Provides: %apache2_compat_cgibindir/
Provides: %apache2_compat_iconsdir/
Provides: %apache2_compat_iconssmalldir/

%description compat
Set DocumentRoot in %apache2_serverdatadir to support the old configurations.

%description -l ru_RU.KOI8-R compat
DocumentRoot %apache2_serverdatadir .

%package mod_ssl-compat
Summary: Set DocumentRoot in %apache2_serverdatadir (for https)
Summary(ru_RU.KOI8-R): DocumentRoot %apache2_serverdatadir ( https)
Group: System/Servers
BuildArch: noarch
Requires: %name-compat
Requires: %name-mod_ssl
Requires: %apache_configs_dirs_name >= %apache_configs_branch
Requires: %apache_config_tool_name >= %apache_config_tool_branch

%description mod_ssl-compat
Set DocumentRoot in %apache2_serverdatadir (for https) to support the old configurations.

%description -l ru_RU.KOI8-R mod_ssl-compat
DocumentRoot %apache2_serverdatadir (https).


%add_findprov_lib_path %apache2_libdir
%define docdir %_docdir/%name-base-%version

%prep
# Fix autoconf version
%set_autoconf_version 2.5

# We dont need to expand builddir yet


%setup -q -n httpd-%version
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1

# generate ALTLinux Apache layout

echo "
# ALTLinux layout
<Layout ALTLinux>
   prefix: %apache2_basedir
   exec_prefix: %apache2_exec_prefix
   bindir: %apache2_bindir
   sbindir: %apache2_sbindir
   libdir: %apache2_libdir
   libexecdir: %apache2_moduledir
   mandir: %apache2_mandir
   sysconfdir: %apache2_confdir
   datadir: %apache2_datadir
   iconsdir: %apache2_iconsdir
   htdocsdir: %apache2_htdocsdir
   manualdir: %apache2_manualdir
   cgidir: %apache2_cgibindir
   includedir: %apache2_includedir
   localstatedir: %apache2_localstatedir
   runtimedir: %apache2_runtimedir
   logfiledir: %apache2_logfiledir
   proxycachedir: %apache2_proxycachedir
   infodir: %apache2_infodir
   installbuilddir: %apache2_installbuilddir
   errordir: %apache2_errordir
</Layout>
" >> config.layout

# Safety check: prevent build if defined MMN does not equal upstream MMN.

vmmn=`echo MODULE_MAGIC_NUMBER_MAJOR | cpp -include $PWD/include/ap_mmn.h | grep -e '^[0-9]'`
if [ "$vmmn" != "%mmn" ]; then
  : Error: Upstream MMN is now ${vmmn}, packaged MMN is %mmn.
  : Update the mmn macro and rebuild.
  exit 1
fi

%build
function mpmbuild()
{
mpm=$1; shift
mkdir $mpm; pushd $mpm
cat > config.cache <<EOF
ac_cv_func_pthread_mutexattr_setpshared=no
ac_cv_func_sem_open=no
EOF
../configure -C \
--enable-layout=ALTLinux \
--with-pcre=%_usr/bin/pcre-config \
--with-perl=%__perl \
--with-apr=%apache2_apr_config \
--with-apr-util=%apache2_apu_config \
--enable-suexec --with-suexec \
--with-suexec-caller=%apache2_user \
--with-suexec-docroot=%apache2_suexec_docroot \
--with-suexec-logfile=%apache2_logfiledir/suexec.log \
--with-suexec-bin=%apache2_sbindir/suexec%apache2_branch \
--with-suexec-uidmin=500 --with-suexec-gidmin=500 \
--with-suexec-userdir=public_html \
--enable-so \
--with-mpm=$mpm \
       --with-devrandom \
       --with-ldap --enable-ldap --enable-auth-ldap --enable-authnz-ldap \
       --enable-cache --enable-disk-cache --enable-mem-cache \
--enable-ssl --with-ssl \
--enable-deflate --enable-cgid \
--enable-proxy --enable-proxy-connect \
--enable-proxy-http --enable-proxy-ftp \
--enable-charset_lite=shared \
$*

%make_build
popd
}

ln -snf %_datadir/apr-1/build/PrintPath build/PrintPath
libtoolize --ltdl
autoheader
autoconf -I %_datadir/apr-1

# Only bother enabling optional modules for main build.

mpmbuild prefork --enable-mods-shared=all --with-program-name=%apache2_dname

# To prevent most modules being built statically into httpd.worker,

# easiest way seems to be enable them shared.
mpmbuild worker --enable-mods-shared=all  --with-program-name=%apache2_dname

mpmbuild event --enable-mods-shared=all  --with-program-name=%apache2_dname

# Verify that the same modules were built into the two httpd binaries

./prefork/%apache2_dname -l | grep -v prefork > prefork.mods
./worker/%apache2_dname -l | grep -v worker > worker.mods
./event/%apache2_dname -l | grep -v event > event.mods
if ( ! diff -u prefork.mods worker.mods ) || ( ! diff -u prefork.mods event.mods ) ; then
 : Different modules built into httpd binaries, will not proceed
 exit 1
fi

%install
# Install README.ALT
install -m 644 %SOURCE12 ./

# Generate sed script for substitute the real paths in configs

echo '
s| at  at Port at  at |80|g
s| at  at SSLPort at  at |443|g
s| at vhosts_dir at |%apache2_vhostdir|g' >> SetMacros.sed

# Classify ab and logresolve as section 1 commands, as they are in /usr/bin

pushd docs/man

mv ab.8 ab%apache2_branch.1

%if "%apache2_branch" != ""
MANS="apachectl.8 apxs.8 dbmmanage.1 htdigest.1 htpasswd.1 httpd.8 rotatelogs.8 logresolve.8 suexec.8"
for manpage in $MANS; do
   mv ${manpage} `echo ${manpage}|sed -e "s/\./%apache2_branch./"`
done
%endif

mv logresolve%apache2_branch.8 logresolve%apache2_branch.1
popd

pushd prefork
make DESTDIR=%buildroot install
popd
mv %buildroot%apache2_sbindir/%apache2_dname %buildroot%apache2_sbindir/%apache2_dname.prefork

# install worker binary

WDIR=worker
install -m 755 $WDIR/%apache2_dname %buildroot%apache2_sbindir/%apache2_dname.worker

# install event binary

WDIR=event
install -m 755 $WDIR/%apache2_dname %buildroot%apache2_sbindir/%apache2_dname.event

#-----------------------------------------------------------------------------------

# Tune up executibles to co-exist with apache-ru
#
pushd %buildroot%apache2_sbindir
%if "%apache2_branch" != ""
#rename suexec binary to be named that apache is expect it to be
mv suexec suexec%apache2_branch
#
# rename tools
# Maybe it's better to push ru-apache-devel before installing devel package
rm envvars-std
for tool in apxs checkgid dbmmanage envvars rotatelogs httxt2dbm; do
   mv ${tool} ${tool}%apache2_branch
done
#fix apxs
sed -i -e 's|\(\/envvars\)"|\1%apache2_branch"|
s|\(apachectl\)|\1%apache2_branch|
' apxs%apache2_branch
%endif
# move&rename utilities to /usr/bin
TOOLS="ab htdbm logresolve htpasswd htdigest"
for tool in $TOOLS; do
   mv ${tool} %buildroot%apache2_bindir/${tool}%apache2_branch
done
popd
#
#-----------------------------------------------------------------------------------

pushd %buildroot%apache2_confdir
tar xvSf %SOURCE11
popd

mkdir -p %buildroot%_altdir
pushd %buildroot%_altdir
tar xvSf %SOURCE13
popd

# mod_ssl bits

for suffix in crl crt csr key prm; do
  mkdir %buildroot%apache2_confdir/ssl.${suffix}
done
# create a prototype server.{crt,key}
touch %buildroot%apache2_confdir/ssl.crt/server.crt
touch %buildroot%apache2_confdir/ssl.key/server.key

# Makefiles for certificate management

#for ext in crt crl; do
#  install -m 644 ./build/rpm/mod_ssl-Makefile.${ext} \
# $RPM_BUILD_ROOT%_sysconfdir/httpd/conf/ssl.${ext}/Makefile.${ext}
#done
#ln -s ../../../usr/share/ssl/certs/Makefile $RPM_BUILD_ROOT/etc/httpd/conf

# for holding mod_dav lock database

mkdir -p %buildroot%apache2_localstatedir/lib/dav

# create a prototype session cache

mkdir -p %buildroot%apache2_proxycachedir/mod_ssl
touch %buildroot%apache2_proxycachedir/mod_ssl/scache.{dir,pag,sem}

# create spools

install -d %buildroot%apache2_spooldir/{,tmp,sessions,uploads}

# Make the MMN accessible to module packages

echo %mmn > %buildroot%apache2_includedir/.mmn

# symlinks for /etc/httpd2

ln -snf $(relative %buildroot%apache2_logfiledir %buildroot%apache2_basedir/logs) %buildroot%apache2_basedir/logs
ln -snf $(relative %buildroot%apache2_runtimedir %buildroot%apache2_basedir/run) %buildroot%apache2_basedir/run
ln -snf $(relative %buildroot%apache2_moduledir %buildroot%apache2_basedir/modules) %buildroot%apache2_basedir/modules
ln -snf $(relative %buildroot%apache2_installbuilddir %buildroot%apache2_basedir/build) %buildroot%apache2_basedir/build

# create config dirs for additional modules and Virtual hosts

mkdir %buildroot%apache2_addonconfdir

#------------------------------------------------------------------------------------

# tune up configuration files

# Install conf/*-start.d/*.conf

for d in mods ports sites extra; do
find docs/conf/$d-start.d/ -maxdepth 1 -name '*.conf' -type f -print0 | \
xargs -r0 install -D -t %buildroot%apache2_confdir/$d-start.d/
done

pushd %buildroot%apache2_confdir

find -type f -print0 | \
xargs -r0 sed -i -e 's/^\([[:space:]]*User\)[[:space:]]\+.*/\1 %apache2_user/
s/^\([[:space:]]*Group\)[[:space:]]\+.*/\1 %apache2_group/
s/^\([[:space:]]*ServerAdmin\)[[:space:]]\+you/\1 %apache2_webmaster/
' httpd*.conf
popd

#------------------------------------------------------------------------------------


#install ALT misc documentation and logos


# Move .../conf/original to %%docdir/original

install -d %buildroot%docdir/
mv %buildroot%apache2_confdir/original original
touch %buildroot%docdir/original
ln -snf $(relative %buildroot%docdir/original %buildroot%apache2_confdir/original) %buildroot%apache2_confdir/original

# docroot

#rm -r %buildroot%apache2_manualdir/style
##rm %buildroot%apache2_manualdir/*/*.xml
# Move %%apache2_manualdir to %%docdir/manual
mv %buildroot%apache2_manualdir manual
install -d %buildroot%_docdir/%apache2_name-docs-%version/
touch %buildroot%_docdir/%apache2_name-docs-%version/manual
ln -snf $(relative %buildroot%_docdir/%apache2_name-docs-%version/manual %buildroot%apache2_manualdir) %buildroot%apache2_manualdir

# install the init script

mkdir -p %buildroot%_initdir
%if "%dist_tag" == "Master"
install -m755 %SOURCE33 \
       %buildroot%_initdir/%apache2_dname
%else
install -m755 %SOURCE35 \
       %buildroot%_initdir/%apache2_dname
%endif

# generate sysconfig settings file

mkdir -p %buildroot%_sysconfdir/sysconfig
echo "# Set HTTPD=%apache2_dname.worker to use a server
# with the thread-based "worker" MPM; BE WARNED that some modules may not
# work correctly with a thread-based MPM; notably PHP will refuse to start.
# Dont't forget to create httpd.worker.conf config file. copying existing
# httpd.conf could be a good starting point.
# (!) Warning: Stop httpd2 service BEFORE changing the following line
#HTTPD=%apache2_dname.worker
# Or use
#HTTPD=%apache2_dname.prefork
#
# If you want to force proxied (for example by Apache1) mode, which is
# autodetected by default you could add "-DA1PROXIED"
#OPTIONS="-DA1PROXIED"
" > %buildroot%_sysconfdir/sysconfig/%apache2_dname


# replace the "official" apachectl by a symlink to the init script

rm -f %buildroot%apache2_sbindir/apachectl*
ln -s -f $(relative %buildroot%_initdir/%apache2_dname \
       %buildroot%apache2_sbindir/apachectl%apache2_branch) \
%buildroot%apache2_sbindir/apachectl%apache2_branch

# Generate logrotate file

mkdir -p %buildroot%_sysconfdir/logrotate.d
echo '%apache2_logfiledir/*log {
missingok
notifempty
sharedscripts
create 0644 root %apache2_group
delaycompress
postrotate
/sbin/service %apache2_dname condreload >/dev/null
endscript
}
'>%buildroot%_sysconfdir/logrotate.d/%apache2_name

# install addon documentation old root

mkdir -p %buildroot%apache2_compat_manualaddonsdir/

###

## now remove installed files we ain't gonna use
#
rm -f %buildroot%apache2_installbuilddir/config.nice \
%buildroot%apache2_moduledir/httpd.exp \
%buildroot%apache2_installbuilddir/mkdir.sh \
%buildroot%apache2_mandir/man8/apachectl* \
%buildroot%apache2_errordir/README

# create old apache2 dirs

mkdir -p %buildroot%apache2_compat_htdocsdir/
mkdir -p %buildroot%apache2_compat_cgibindir/
mkdir -p %buildroot%apache2_compat_iconsdir/
mkdir -p %buildroot%apache2_compat_iconssmalldir/

# Install scripts for control

install -pD %SOURCE40 %buildroot%_controldir/cgi-bin_test-cgi
install -pD %SOURCE41 %buildroot%_controldir/cgi-bin_printenv

# Create datadirs

install -d %buildroot%_datadir/%name/cgi-bin/

# Move cgi scripts to data dirs

mv %buildroot%apache2_cgibindir/* %buildroot%_datadir/%name/cgi-bin/

# Substitute the real paths in configs

find %buildroot%_sysconfdir original -type f -print0 \
| xargs -r0i %_datadir/rpm-build-rpm-eval/rpm-eval.sh "{}"
find %buildroot%_sysconfdir original -type f -print0 \
| xargs -r0 sed -i -f SetMacros.sed

mkdir -p %buildroot%_rpmlibdir
cat <<\EOF >%buildroot%_rpmlibdir/%name-files.req.list
# %name dirlist for %_rpmlibdir/files.req
%apache2_addonconfdir/ %name-base
%apache2_serverdatadir/ %name-base
%apache2_errordir/ %name-base
%apache2_errordir/include/ %name-base
%apache2_localstatedir/lib/dav %name-base
%apache2_proxycachedir/ %name-common
%apache2_spooldir/ %name-common
%apache2_spooldir/tmp/ %name-common
%apache2_spooldir/sessions/ %name-common
%apache2_spooldir/uploads/ %name-common
%apache2_basedir/ %name-common
%apache2_confdir/ %name-common
%apache2_extra_available/ %name-common
%apache2_extra_enabled/ %name-common
%apache2_extra_start/ %name-common
%apache2_mods_available/ %name-common
%apache2_mods_enabled/ %name-common
%apache2_mods_start/ %name-common
%apache2_ports_available/ %name-common
%apache2_ports_enabled/ %name-common
%apache2_ports_start/ %name-common
%apache2_sites_available/ %name-common
%apache2_sites_enabled/ %name-common
%apache2_sites_start/ %name-common
%apache2_libdir/ %name-common
%apache2_moduledir/ %name-common
%apache2_logfiledir/ %name-common
%apache2_runtimedir/ %name-common
%_datadir/%name/ %name-datadirs
%_datadir/%name/cgi-bin/ %name-datadirs
%apache2_confdir/ssl.crl/ %name-mod_ssl
%apache2_confdir/ssl.crt/ %name-mod_ssl
%apache2_confdir/ssl.key/ %name-mod_ssl
%apache2_proxycachedir/mod_ssl/ %name-mod_ssl
%apache2_includedir/ %name-devel
%apache2_installbuilddir/ %name-devel
%apache2_compat_htdocsdir/ %name-compat
%apache2_compat_cgibindir/ %name-compat
%apache2_compat_iconsdir/ %name-compat
%apache2_compat_iconssmalldir/ %name-compat
EOF

#============ S C R I P T S ==================================================

#
#
%pre base
if [ $1 -eq 2 ]; then
if [ -e %apache2_conf ] && \
! (grep -qs -m1 '^[[:space:]]*[Ii][Nn][Cc][Ll][Uu][Dd][Ee][[:space:]]\+conf/ports-enabled' %apache2_conf && \
grep -qs -m1 '^[[:space:]]*[Ii][Nn][Cc][Ll][Uu][Dd][Ee][[:space:]]\+conf/mods-enabled' %apache2_conf && \
grep -qs -m1 '^[[:space:]]*[Ii][Nn][Cc][Ll][Uu][Dd][Ee][[:space:]]\+conf/sites-enabled' %apache2_conf && \
grep -qs -m1 '^[[:space:]]*[Ii][Nn][Cc][Ll][Uu][Dd][Ee][[:space:]]\+conf/extra-enabled' %apache2_conf) ; then
echo 'Warning: configuration files %apache2_conf is old!'
echo '    Renamed old file %apache2_conf'
echo '    to %apache2_conf.rpmsave'
mv %apache2_conf %apache2_conf.rpmsave
fi
if [ -e %apache2_confdir/%apache2_dname.worker.conf ] && \
[ ! -L %apache2_confdir/%apache2_dname.worker.conf ]; then
echo 'Warning: original configuration files %apache2_confdir/%apache2_dname.worker.conf'
echo '    saved as %apache2_confdir/%apache2_dname.worker.conf.rpmold'
mv %apache2_confdir/%apache2_dname.worker.conf %apache2_confdir/%apache2_dname.worker.conf.rpmold
fi
fi
exit 0

%preun base
if [ $1 = 0 ]; then
   %preun_service %apache2_dname
fi
exit 0

%post base
if [ ! -e %apache2_conf ] && \
[ -e %apache2_conf.rpmnew ]; then
mv %apache2_conf.rpmnew %apache2_conf
fi
%_sbindir/a2chkconfig >/dev/null
%post_service %apache2_dname

%triggerin -- %name-httpd-worker
if [ $1 -eq 2 ] || [ $1 -eq 1 ]; then
%post_service %apache2_dname
fi
exit 0

%triggerin -- %name-httpd-prefork
if [ $1 -eq 2 ] || [ $1 -eq 1 ]; then
%post_service %apache2_dname
fi
exit 0

%triggerin -- %name-httpd-event
if [ $1 -eq 2 ] || [ $1 -eq 1 ]; then
%post_service %apache2_dname
fi
exit 0

%triggerin -- configs-A1PROXIED
%_sbindir/a2chkconfig >/dev/null
%post_service %apache2_dname
exit 0

%triggerin -- %name-mod_ssl
%_sbindir/a2chkconfig >/dev/null
%post_service %apache2_dname
exit 0

%triggerin -- %name-suexec
%_sbindir/a2chkconfig >/dev/null
%post_service %apache2_dname
exit 0

%triggerin -- %name-compat
%_sbindir/a2chkconfig >/dev/null
%post_service %apache2_dname
exit 0

%triggerin -- %name-mod_ssl-compat
%_sbindir/a2chkconfig >/dev/null
%post_service %apache2_dname
exit 0

%triggerun -- %name-httpd-worker
if [ $1 -eq 0 ]; then
%preun_service %apache2_dname
fi
exit 0

%triggerun -- %name-httpd-prefork
if [ $1 -eq 0 ]; then
%preun_service %apache2_dname
fi
exit 0

%triggerun -- %name-httpd-event
if [ $1 -eq 0 ]; then
%preun_service %apache2_dname
fi
exit 0

%triggerun -- configs-A1PROXIED
%_sbindir/a2chkconfig >/dev/null
%post_service %apache2_dname
exit 0

%triggerun -- %name-mod_ssl
%_sbindir/a2chkconfig >/dev/null
%post_service %apache2_dname
exit 0

%triggerun -- %name-suexec
%_sbindir/a2chkconfig >/dev/null
%post_service %apache2_dname
exit 0

%triggerun -- %name-compat
%_sbindir/a2chkconfig >/dev/null
%post_service %apache2_dname
exit 0

%triggerun -- %name-mod_ssl-compat
%_sbindir/a2chkconfig >/dev/null
%post_service %apache2_dname
exit 0

%triggerpostun -- apache2-manual < 2.2.4-alt12
if [ -e %_docdir/apache2-manual-2.2.4/manual ] && \
[ -L %_docdir/apache2-manual-2.2.4/manual ]; then
echo "Delete old symlink %_docdir/apache2-manual-2.2.4/manual"
rm -f %_docdir/%apache2_name-%version/manual 2>/dev/null ||:
fi
exit 0

%pre common
# Create user and groups
%_sbindir/groupadd -r -f %apache2_group 2>/dev/null ||:
%_sbindir/groupadd -r -f %apache2_webmaster 2>/dev/null ||:
%_sbindir/useradd -g %apache2_group -c 'Apache2 WWW server' -d %apache2_datadir -s '/dev/null' \
-G %webserver_group -r %apache2_user 2>/dev/null || :
if LANG=C %_bindir/id %apache2_user 2>/dev/null | \
grep -qv "groups=[^[:space:]]*(%webserver_group)"; then
echo 'Warning: User %apache2_user is not included in the group %webserver_group!'
echo '     Add user %apache2_user to group %webserver_group.'
%_bindir/gpasswd -M %apache2_user %webserver_group
fi
exit 0

%post httpd-worker
%register_alternatives %name-httpd-worker

%triggerpostun httpd-worker -- apache2 < 2.2.4-alt18
%register_alternatives %name-httpd-worker

%postun httpd-worker
%unregister_alternatives %name-httpd-worker

%post httpd-prefork
%register_alternatives %name-httpd-prefork

%triggerpostun httpd-prefork -- apache2 < 2.2.4-alt18
%register_alternatives %name-httpd-prefork

%postun httpd-prefork
%unregister_alternatives %name-httpd-prefork

%post httpd-event
%register_alternatives %name-httpd-event

%triggerpostun httpd-event -- apache2 < 2.2.4-alt18
%register_alternatives %name-httpd-prefork

%postun httpd-event
%unregister_alternatives %name-httpd-event

%pre manual
if [ $1 -eq 2 ] && \
[ -e %apache2_manualdir ] && \
[ ! -L %apache2_manualdir ] ; then
echo 'Warning: original %apache2_manualdir not symlink!'
echo '    Saved as %apache2_manualdir.rpmold'
mv %apache2_manualdir %apache2_manualdir.rpmold
fi
exit 0

%post configs-A1PROXIED
%_sbindir/a2chkconfig >/dev/null
%post_service %apache2_dname

%post manual
%_sbindir/a2chkconfig >/dev/null
%post_service %apache2_dname

%postun manual
if [ $1 -eq 0 ] && [ -x %_sbindir/a2chkconfig ] ; then
%_sbindir/a2chkconfig >/dev/null
%post_service %apache2_dname
fi
exit 0

%post mod_ssl
#%_sbindir/ldconfig ### is this needed?
umask 077

if [ ! -f %apache2_confdir/ssl.key/server.key ] ; then
%_bindir/openssl genrsa -rand /proc/apm:/proc/cpuinfo:/proc/dma:/proc/filesystems:/proc/interrupts:/proc/ioports:/proc/pci:/proc/rtc:/proc/uptime 1024 > %apache2_confdir/ssl.key/server.key 2> /dev/null
fi

FQDN=`hostname`
if [ "x${FQDN}" = "x" ]; then
  FQDN=localhost.localdomain
fi

if [ ! -f %apache2_confdir/ssl.crt/server.crt ] ; then
cat << EOF | %_bindir/openssl req -new -key %apache2_confdir/ssl.key/server.key -x509 -days 365 -out %apache2_confdir/ssl.crt/server.crt 2>/dev/null
--
SomeState
SomeCity
SomeOrganization
SomeOrganizationalUnit
${FQDN}
root at ${FQDN}
EOF
fi

%post compat
%_sbindir/a2chkconfig >/dev/null
%post_service %apache2_dname
exit 0

%postun compat
%_sbindir/a2chkconfig >/dev/null
%post_service %apache2_dname
exit 0

%post mod_ssl-compat
%_sbindir/a2chkconfig >/dev/null
%post_service %apache2_dname
exit 0

%postun mod_ssl-compat
%_sbindir/a2chkconfig >/dev/null
%post_service %apache2_dname
exit 0

%pre cgi-bin-test-cgi
%pre_webserver_cgi_bin_control cgi-bin_test-cgi

%post cgi-bin-test-cgi
%post_webserver_cgi_bin_control -s symlink_root_noexec cgi-bin_test-cgi

%preun cgi-bin-test-cgi
%preun_webserver_cgi_bin_control cgi-bin_test-cgi

%postun cgi-bin-test-cgi
%postun_webserver_cgi_bin_control -s symlink_root_noexec cgi-bin_test-cgi

%triggerpostun cgi-bin-test-cgi -- apache-common < 1.3.37rusPL30.23-alt1.1, apache-cgi-bin < 1.3.41rusPL30.23-alt4.7.3, apache2-cgi-bin < 2.2.9-alt10, apache2-cgi-bin-test-cgi
%triggerpostun_webserver_cgi_bin_control -s symlink_root_noexec cgi-bin_test-cgi

%pre cgi-bin-printenv
%pre_webserver_cgi_bin_control cgi-bin_printenv

%post cgi-bin-printenv
%post_webserver_cgi_bin_control -s symlink_root_noexec cgi-bin_printenv

%preun cgi-bin-printenv
%preun_webserver_cgi_bin_control cgi-bin_printenv

%postun cgi-bin-printenv
%postun_webserver_cgi_bin_control -s symlink_root_noexec cgi-bin_printenv

%triggerpostun cgi-bin-printenv -- apache-common < 1.3.37rusPL30.23-alt1.1, apache-cgi-bin < 1.3.41rusPL30.23-alt4.7.3, apache2-cgi-bin < 2.2.9-alt10, apache2-cgi-bin-printenv
%triggerpostun_webserver_cgi_bin_control -s symlink_root_noexec cgi-bin_printenv

%files common
%attr(2770,root,%apache2_group) %dir %apache2_proxycachedir/
%attr(750,root,%apache2_group) %dir %apache2_spooldir/
%attr(2770,root,%apache2_group) %dir %apache2_spooldir/tmp/
%attr(2770,root,%apache2_group) %dir %apache2_spooldir/sessions/
%attr(2770,root,%apache2_group) %dir %apache2_spooldir/uploads/

%dir %apache2_basedir/
%apache2_basedir/logs
%apache2_basedir/run
%apache2_basedir/modules

%dir %apache2_confdir/
%dir %apache2_extra_available/
%dir %apache2_extra_enabled/
%dir %apache2_extra_start/
%dir %apache2_mods_available/
%dir %apache2_mods_enabled/
%dir %apache2_mods_start/
%dir %apache2_ports_available/
%dir %apache2_ports_enabled/
%dir %apache2_ports_start/
%dir %apache2_sites_available/
%dir %apache2_sites_enabled/
%dir %apache2_sites_start/

%dir %apache2_libdir/
%dir %apache2_moduledir/
%attr(0750,root,%apache2_group) %dir %apache2_logfiledir/
%dir %apache2_runtimedir/

%config(noreplace) %apache2_confdir/magic
%config(noreplace) %apache2_confdir/mime.types
%config(noreplace) %apache2_mods_available/*.load
%config(noreplace) %apache2_mods_available/*.conf
%exclude %apache2_mods_available/ssl.load
%exclude %apache2_mods_available/ssl.conf
%exclude %apache2_mods_available/suexec.load
%apache2_sbindir/a2*
%apache2_mandir/man8/a2*

# everything but mod_ssl.so:

%apache2_moduledir/mod_*.so
%exclude %apache2_moduledir/mod_ssl.so
%exclude %apache2_moduledir/mod_suexec.so

%files httpd-worker
%apache2_sbindir/%apache2_dname.worker
%_altdir/%name-httpd-worker

%files httpd-prefork
%apache2_sbindir/%apache2_dname.prefork
%_altdir/%name-httpd-prefork

%files httpd-event
%apache2_sbindir/%apache2_dname.event
%_altdir/%name-httpd-event

%files

%files base
%doc ABOUT_APACHE README CHANGES LICENSE README.ALT*
%doc original

%apache2_confdir/original

%config(noreplace) %apache2_conf
%config(noreplace) %apache2_mods_start/*.conf
%exclude %apache2_mods_start/*-manual*.conf
%config(noreplace) %apache2_ports_available/*.conf
%config(noreplace) %apache2_ports_start/*.conf
%exclude %apache2_ports_available/https.conf
%exclude %apache2_ports_available/http-A1PROXIED.conf
%exclude %apache2_ports_start/020-A1PROXIED.conf
%config(noreplace) %apache2_sites_available/*.conf
%config(noreplace) %apache2_sites_start/*.conf
%exclude %apache2_sites_available/default_https.conf
%exclude %apache2_sites_available/vhosts-A1PROXIED.conf
%exclude %apache2_sites_available/default-compat.conf
%exclude %apache2_sites_available/default_https-compat.conf
%exclude %apache2_sites_start/020-A1PROXIED.conf
%exclude %apache2_sites_start/*-default-compat.conf
%config(noreplace) %apache2_extra_available/*.conf
%exclude %apache2_extra_available/httpd-manual*.conf
%exclude %apache2_extra_available/httpd-*-compat.conf
%config(noreplace) %apache2_extra_start/*.conf
%exclude %apache2_extra_start/*-manual*.conf
%exclude %apache2_extra_start/*-default-compat.conf
%dir %apache2_addonconfdir/
%config %_initdir/%apache2_dname
%apache2_sbindir/apachectl*
%attr(0600,root,root) %config(noreplace) %_sysconfdir/sysconfig/%apache2_dname

%attr(0644,root,root) %config(noreplace) %_sysconfdir/logrotate.d/%apache2_name

%apache2_bindir/ab*
%apache2_bindir/ht*
%apache2_bindir/logresolve*
%apache2_sbindir/rotatelogs*
%apache2_sbindir/htcacheclean*

%apache2_sbindir/checkgid*
%apache2_sbindir/check_forensic*
%apache2_sbindir/dbmmanage*

%apache2_sbindir/httxt2dbm*

#%%dir %apache2_datadir/

%dir %apache2_serverdatadir/
%dir %apache2_errordir/
%dir %apache2_errordir/include/

%config(noreplace) %apache2_errordir/*.var
%config(noreplace) %apache2_errordir/include/*.html

%attr(0700,%apache2_user,%apache2_group) %dir %apache2_localstatedir/lib/dav

%apache2_mandir/man1/*

%apache2_mandir/man8/rotatelogs*
%apache2_mandir/man8/httpd*
%apache2_mandir/man8/htcacheclean*
%apache2_mandir/man8/checkgid*
%apache2_mandir/man8/check_forensic*

%files full

%files configs-A1PROXIED
%config(noreplace) %apache2_ports_available/http-A1PROXIED.conf
%config(noreplace) %apache2_ports_start/020-A1PROXIED.conf
%config(noreplace) %apache2_sites_available/vhosts-A1PROXIED.conf
%config(noreplace) %apache2_sites_start/020-A1PROXIED.conf

%files docs
%doc manual

%files manual
%apache2_manualdir
%config(noreplace) %apache2_mods_start/*-manual.conf
%config(noreplace) %apache2_extra_available/httpd-manual.conf
%config(noreplace) %apache2_extra_start/*-manual.conf

%files manual-addons
%config(noreplace) %apache2_mods_start/*-manual-addons.conf
%config(noreplace) %apache2_extra_available/httpd-manual-addons.conf
%config(noreplace) %apache2_extra_start/*-manual-addons.conf

%files datadirs
%dir %_datadir/%name/
%dir %_datadir/%name/cgi-bin/

%files cgi-bin-test-cgi
%_controldir/cgi-bin_test-cgi
%attr(644,root,root) %_datadir/%name/cgi-bin/test-cgi

%files cgi-bin-printenv
%_controldir/cgi-bin_printenv
%attr(644,root,root) %_datadir/%name/cgi-bin/printenv

%files cgi-bin

%files html
%apache2_htdocsdir/*.html
%apache2_htdocsdir/*.png
%apache2_htdocsdir/*.gif

%files icons
%defattr(644,root,%apache2_webmaster,2775)
%apache2_iconsdir/README
%apache2_iconsdir/README.html
%apache2_iconsdir/*.gif
%apache2_iconsdir/*.png
%apache2_iconsdir/small/*.gif
%apache2_iconsdir/small/*.png

%files mod_ssl
%apache2_moduledir/mod_ssl.so
%attr(0600,root,root) %config(noreplace) %apache2_mods_available/ssl.load
%attr(0600,root,root) %config(noreplace) %apache2_mods_available/ssl.conf
%attr(0600,root,root) %config(noreplace) %apache2_ports_available/https.conf
%attr(0600,root,root) %config(noreplace) %apache2_sites_available/default_https.conf
%attr(0700,root,root) %dir %apache2_confdir/ssl.crl/
%attr(0700,root,root) %dir %apache2_confdir/ssl.crt/
%attr(0700,root,root) %dir %apache2_confdir/ssl.key/
%ghost %apache2_confdir/ssl.crt/server.crt
%ghost %apache2_confdir/ssl.key/server.key
%attr(2770,root,%apache2_group) %dir %apache2_proxycachedir/mod_ssl/
%attr(0600,%apache2_user,%apache2_group) %ghost %apache2_proxycachedir/mod_ssl/scache.dir
%attr(0600,%apache2_user,%apache2_group) %ghost %apache2_proxycachedir/mod_ssl/scache.pag
%attr(0600,%apache2_user,%apache2_group) %ghost %apache2_proxycachedir/mod_ssl/scache.sem

%files -n rpm-build-%name
%_rpmlibdir/%name-files.req.list

%files devel
%apache2_basedir/build
%dir %apache2_includedir/
%apache2_includedir/.mmn
%apache2_includedir/ap_*
%apache2_includedir/[hmoprsu]*

#%apache2_moduledir/httpd.exp

#%apache2_installbuilddir/config.nice


%apache2_sbindir/apxs*
%apache2_mandir/man8/apxs*
%dir %apache2_installbuilddir/
%apache2_installbuilddir/[clprs]*.mk
%apache2_installbuilddir/instdso.sh

%apache2_sbindir/envvars*

%files suexec
%config(noreplace) %apache2_mods_available/suexec.load
%apache2_moduledir/mod_suexec.so
%attr(4510,root,%apache2_group) %apache2_sbindir/suexec*
%apache2_mandir/man8/suexec*

%files compat
%config(noreplace) %apache2_sites_available/default-compat.conf
%config(noreplace) %apache2_sites_start/*-default-compat.conf
%config(noreplace) %apache2_extra_available/httpd-*-compat.conf
%config(noreplace) %apache2_extra_start/*-default-compat.conf
%dir %apache2_compat_htdocsdir/
%dir %apache2_compat_cgibindir/
%dir %apache2_compat_iconssmalldir/
%dir %apache2_compat_manualaddonsdir/

%files mod_ssl-compat
%config(noreplace) %apache2_sites_available/default_https-compat.conf

%changelog

Todas as alterações você pod ver aqui

 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009