blob: 7afa2ad23f9e418bbb6cacfabcc9d8a084837d99 (
plain)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
|
# $Id: PKGBUILD 96448 2010-10-21 09:16:04Z jgc $
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Pierre Schmitz <pierre@archlinux.de>
pkgname=apache
pkgver=2.2.17
pkgrel=1
pkgdesc='A high performance Unix-based HTTP server'
arch=('i686' 'x86_64')
options=('!libtool')
url='http://www.apache.org/dist/httpd'
license=('APACHE')
backup=(etc/conf.d/apache etc/httpd/conf/httpd.conf
etc/httpd/conf/extra/httpd-{autoindex,dav,default,info,languages}.conf
etc/httpd/conf/extra/httpd-{manual,mpm,multilang-errordoc}.conf
etc/httpd/conf/extra/httpd-{ssl,userdir,vhosts}.conf
etc/logrotate.d/httpd)
depends=('openssl' 'zlib' 'apr-util' 'pcre')
optdepends=('lynx: apachectl status')
_itkurl=http://mpm-itk.sesse.net/apache2.2-mpm-itk-2.2.11-02
source=(http://www.apache.org/dist/httpd/httpd-${pkgver}.tar.bz2
${_itkurl}/02-rename-prefork-to-itk.patch
${_itkurl}/03-add-mpm-to-build-system.patch
${_itkurl}/04-correct-output-makefile-location.patch
${_itkurl}/05-add-copyright.patch
${_itkurl}/06-hook-just-after-merging-perdir-config.patch
${_itkurl}/07-base-functionality.patch
${_itkurl}/08-max-clients-per-vhost.patch
${_itkurl}/09-capabilities.patch
${_itkurl}/10-nice.patch
apachectl-confd.patch
apache.conf.d
httpd.logrotate
httpd
arch.layout)
md5sums=('16eadc59ea6b38af33874d300973202e'
'db42cfcc18ae1c32aaaff2347e35b79d'
'131408ad4dc7b18547b4e062e7e495ab'
'ee488f391054d528547c3a372faa2aa7'
'b202944761b2f0516196488b12504236'
'78fa15f8ca3a284b7d71f942e24e47fb'
'd33e39350e987721d50e6fb8e164ab6b'
'9f7a8935f9cabc7b46d0052906634cef'
'1b28e3363e1b0d05b738a21e7ddd264f'
'd9667fcd2ffecc63e446edd4d6666731'
'4ac64df6e019edbe137017cba1ff2f51'
'08b3c875f6260644f2f52b4056d656b0'
'6382331e9700ed9e8cc78ea51887b537'
'c7e300a287ef7e2e066ac7639536f87e'
'3d659d41276ba3bfcb20c231eb254e0c')
build() {
cd "${srcdir}/httpd-${pkgver}"
patch -Np0 -i "${srcdir}/apachectl-confd.patch"
# set default user
sed -e 's#User daemon#User http#' \
-e 's#Group daemon#Group http#' \
-i docs/conf/httpd.conf.in
cat "${srcdir}/arch.layout" >> config.layout
for mpm in prefork worker itk; do
if [ "${mpm}" = "itk" ]; then
mkdir -p server/mpm/experimental/itk
cp -r server/mpm/prefork/* server/mpm/experimental/itk/
mv server/mpm/experimental/itk/prefork.c server/mpm/experimental/itk/itk.c
patch -Np1 -i "${srcdir}/02-rename-prefork-to-itk.patch"
patch -Np1 -i "${srcdir}/03-add-mpm-to-build-system.patch"
patch -Np1 -i "${srcdir}/04-correct-output-makefile-location.patch"
patch -Np1 -i "${srcdir}/05-add-copyright.patch"
patch -Np1 -i "${srcdir}/06-hook-just-after-merging-perdir-config.patch"
patch -Np1 -i "${srcdir}/07-base-functionality.patch"
patch -Np1 -i "${srcdir}/08-max-clients-per-vhost.patch"
patch -Np1 -i "${srcdir}/09-capabilities.patch"
patch -Np1 -i "${srcdir}/10-nice.patch"
autoconf
fi
mkdir build-${mpm}
pushd build-${mpm}
../configure --enable-layout=Arch \
--enable-modules=all \
--enable-mods-shared=all \
--enable-so \
--enable-suexec \
--with-suexec-caller=http \
--with-suexec-docroot=/srv/http \
--with-suexec-logfile=/var/log/httpd/suexec.log \
--with-suexec-bin=/usr/sbin/suexec \
--with-suexec-uidmin=99 --with-suexec-gidmin=99 \
--enable-ldap --enable-authnz-ldap \
--enable-cache --enable-disk-cache --enable-mem-cache --enable-file-cache \
--enable-ssl --with-ssl \
--enable-deflate --enable-cgid \
--enable-proxy --enable-proxy-connect \
--enable-proxy-http --enable-proxy-ftp \
--enable-dbd \
--with-apr=/usr/bin/apr-1-config \
--with-apr-util=/usr/bin/apu-1-config \
--with-pcre=/usr \
--with-mpm=${mpm}
make
if [ "${mpm}" = "prefork" ]; then
make DESTDIR="${pkgdir}" install
else
install -m755 httpd "${pkgdir}/usr/sbin/httpd.${mpm}"
fi
popd
done
install -D -m755 "${srcdir}/httpd" "${pkgdir}/etc/rc.d/httpd"
install -D -m644 "${srcdir}/httpd.logrotate" "${pkgdir}/etc/logrotate.d/httpd"
install -D -m644 "${srcdir}/apache.conf.d" "${pkgdir}/etc/conf.d/apache"
# symlinks for /etc/httpd
ln -fs /var/log/httpd "${pkgdir}/etc/httpd/logs"
ln -fs /var/run/httpd "${pkgdir}/etc/httpd/run"
ln -fs /usr/lib/httpd/modules "${pkgdir}/etc/httpd/modules"
ln -fs /usr/lib/httpd/build "${pkgdir}/etc/httpd/build"
# set sane defaults
sed -e 's#/usr/lib/httpd/modules/#modules/#' \
-e 's|#\(Include conf/extra/httpd-multilang-errordoc.conf\)|\1|' \
-e 's|#\(Include conf/extra/httpd-autoindex.conf\)|\1|' \
-e 's|#\(Include conf/extra/httpd-languages.conf\)|\1|' \
-e 's|#\(Include conf/extra/httpd-userdir.conf\)|\1|' \
-e 's|#\(Include conf/extra/httpd-default.conf\)|\1|' \
-i "${pkgdir}/etc/httpd/conf/httpd.conf"
# cleanup
rm -rf "${pkgdir}/usr/share/httpd/manual"
rm -rf "${pkgdir}/etc/httpd/conf/original"
rm -rf "${pkgdir}/srv/"
rm -rf "${pkgdir}/usr/bin"
}
|