1 |
lat |
1.9 |
### RPM external apache2 2.2.14
|
2 |
egeland |
1.1 |
# See:
|
3 |
|
|
# http://httpd.apache.org/docs/2.2/install.html
|
4 |
|
|
# for instruction on how to configure.
|
5 |
|
|
|
6 |
egeland |
1.2 |
# Required for https and compression support
|
7 |
|
|
Requires: openssl zlib expat uuid
|
8 |
|
|
|
9 |
|
|
# Can't figure out how to get rpm to stop complaining about this...
|
10 |
|
|
# should be in e2fsprogs-libs-1.39-7.slc4 ...
|
11 |
|
|
# but Requires uuid doesn't cover it
|
12 |
|
|
Provides: libcom_err.so.2
|
13 |
eulisse |
1.3 |
Provides: libcom_err.so.2()(64bit)
|
14 |
egeland |
1.2 |
|
15 |
egeland |
1.4 |
# Note: it appears that Apache doesn't keep old versions of httpd lying around
|
16 |
|
|
# That's probably good for security.
|
17 |
egeland |
1.1 |
Source0: http://mirror.switch.ch/mirror/apache/dist/httpd/httpd-%realversion.tar.gz
|
18 |
egeland |
1.4 |
Source1: http://www.apache.org/dist/httpd/httpd-%realversion.tar.gz
|
19 |
egeland |
1.1 |
|
20 |
|
|
%prep
|
21 |
|
|
%setup -n httpd-%realversion
|
22 |
|
|
|
23 |
|
|
%build
|
24 |
|
|
# See here:
|
25 |
|
|
#
|
26 |
|
|
# http://httpd.apache.org/docs/2.2/programs/configure.html#installationdirectories
|
27 |
|
|
#
|
28 |
|
|
# for configure options.
|
29 |
|
|
|
30 |
|
|
./configure --prefix=%i --with-mpm=prefork \
|
31 |
|
|
--enable-mods-shared=all \
|
32 |
|
|
--enable-so \
|
33 |
|
|
--with-included-apr \
|
34 |
|
|
--enable-cache \
|
35 |
|
|
--enable-proxy \
|
36 |
|
|
--enable-deflate \
|
37 |
|
|
--enable-disk-cache \
|
38 |
|
|
--enable-file-cache \
|
39 |
|
|
--enable-expires \
|
40 |
|
|
--enable-headers \
|
41 |
|
|
--enable-rewrite \
|
42 |
|
|
--enable-ssl \
|
43 |
lat |
1.6 |
--with-ssl=$OPENSSL_ROOT \
|
44 |
egeland |
1.2 |
--with-z=$ZLIB_ROOT \
|
45 |
|
|
--with-expat=$EXPAT_ROOT \
|
46 |
|
|
--with-uuid=$UUID_ROOT
|
47 |
|
|
|
48 |
egeland |
1.1 |
|
49 |
|
|
|
50 |
|
|
# %makeprocesses is for multiple compile processes -j X
|
51 |
|
|
make %makeprocesses
|
52 |
|
|
|
53 |
|
|
# Generates the dependencies-setup.{sh,csh} files so that
|
54 |
|
|
# sourcing init.{sh,csh} picks up also the environment of
|
55 |
|
|
# dependencies.
|
56 |
|
|
|
57 |
|
|
rm -rf %i/etc/profile.d
|
58 |
|
|
mkdir -p %i/etc/profile.d
|
59 |
|
|
echo '#!/bin/sh' > %{i}/etc/profile.d/dependencies-setup.sh
|
60 |
|
|
echo '#!/bin/tcsh' > %{i}/etc/profile.d/dependencies-setup.csh
|
61 |
|
|
echo requiredtools `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'`
|
62 |
|
|
for tool in `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'`
|
63 |
|
|
do
|
64 |
|
|
case X$tool in
|
65 |
|
|
Xdistcc|Xccache )
|
66 |
|
|
;;
|
67 |
|
|
* )
|
68 |
|
|
toolcap=`echo $tool | tr a-z- A-Z_`
|
69 |
|
|
eval echo ". $`echo ${toolcap}_ROOT`/etc/profile.d/init.sh" >> %{i}/etc/profile.d/dependencies-setup.sh
|
70 |
|
|
eval echo "source $`echo ${toolcap}_ROOT`/etc/profile.d/init.csh" >> %{i}/etc/profile.d/dependencies-setup.csh
|
71 |
|
|
;;
|
72 |
|
|
esac
|
73 |
|
|
done
|
74 |
|
|
|
75 |
|
|
perl -p -i -e 's|\. /etc/profile\.d/init\.sh||' %{i}/etc/profile.d/dependencies-setup.sh
|
76 |
|
|
perl -p -i -e 's|source /etc/profile\.d/init\.csh||' %{i}/etc/profile.d/dependencies-setup.csh
|
77 |
|
|
|
78 |
egeland |
1.2 |
find -type f | xargs perl -p -i -e "s|#\!.*perl(.*)|#!/usr/bin/env perl$1|"
|
79 |
egeland |
1.1 |
|
80 |
|
|
%install
|
81 |
|
|
make install
|
82 |
|
|
|
83 |
|
|
%post
|
84 |
|
|
%{relocateConfig}etc/profile.d/dependencies-setup.sh
|
85 |
|
|
%{relocateConfig}etc/profile.d/dependencies-setup.csh
|
86 |
|
|
# Relocate the configuration files.
|
87 |
|
|
%{relocateConfig}/bin/apachectl
|
88 |
|
|
%{relocateConfig}/bin/apr-1-config
|
89 |
|
|
%{relocateConfig}/bin/apu-1-config
|
90 |
|
|
%{relocateConfig}/bin/apxs
|
91 |
|
|
%{relocateConfig}/bin/envvars
|
92 |
|
|
%{relocateConfig}/bin/envvars-std
|
93 |
|
|
%{relocateConfig}/build/apr_rules.mk
|
94 |
|
|
%{relocateConfig}/build/config.nice
|
95 |
|
|
%{relocateConfig}/build/config_vars.mk
|
96 |
|
|
%{relocateConfig}/build/libtool
|
97 |
|
|
%{relocateConfig}/conf/extra/httpd-autoindex.conf
|
98 |
|
|
%{relocateConfig}/conf/extra/httpd-dav.conf
|
99 |
|
|
%{relocateConfig}/conf/extra/httpd-manual.conf
|
100 |
|
|
%{relocateConfig}/conf/extra/httpd-multilang-errordoc.conf
|
101 |
|
|
%{relocateConfig}/conf/extra/httpd-ssl.conf
|
102 |
|
|
%{relocateConfig}/conf/extra/httpd-vhosts.conf
|
103 |
|
|
%{relocateConfig}/conf/httpd.conf
|
104 |
|
|
%{relocateConfig}/conf/original/extra/httpd-autoindex.conf
|
105 |
|
|
%{relocateConfig}/conf/original/extra/httpd-dav.conf
|
106 |
|
|
%{relocateConfig}/conf/original/extra/httpd-manual.conf
|
107 |
|
|
%{relocateConfig}/conf/original/extra/httpd-multilang-errordoc.conf
|
108 |
|
|
%{relocateConfig}/conf/original/extra/httpd-ssl.conf
|
109 |
|
|
%{relocateConfig}/conf/original/extra/httpd-vhosts.conf
|
110 |
|
|
%{relocateConfig}/conf/original/httpd.conf
|
111 |
|
|
%{relocateConfig}/include/ap_config_auto.h
|
112 |
|
|
%{relocateConfig}/include/ap_config_layout.h
|
113 |
|
|
%{relocateConfig}/lib/libapr-1.la
|
114 |
|
|
%{relocateConfig}/lib/libaprutil-1.la
|
115 |
|
|
%{relocateConfig}/lib/pkgconfig/apr-1.pc
|
116 |
|
|
%{relocateConfig}/lib/pkgconfig/apr-util-1.pc
|