OCaml 4.14.0 rebuild
[arch-packages.git] / apache / repos / extra-x86_64 / PKGBUILD
blob331e3d45e528573d3314e7e919441078790153c8
1 # Maintainer: Jan de Groot <jgc@archlinux.org>
2 # Contributor: Andrea Scarpino <andrea@archlinux.org>
3 # Contributor: Pierre Schmitz <pierre@archlinux.de>
5 pkgname=apache
6 pkgver=2.4.54
7 pkgrel=1
8 pkgdesc='A high performance Unix-based HTTP server'
9 arch=('x86_64')
10 url='https://www.apache.org/dist/httpd'
11 license=('APACHE')
12 backup=(
13     etc/httpd/conf/httpd.conf
14     etc/httpd/conf/extra/httpd-{autoindex,dav,default,info,languages}.conf
15     etc/httpd/conf/extra/httpd-{manual,mpm,multilang-errordoc}.conf
16     etc/httpd/conf/extra/httpd-{ssl,userdir,vhosts}.conf
17     etc/httpd/conf/extra/proxy-html.conf
18     etc/httpd/conf/{mime.types,magic}
19     etc/logrotate.d/httpd
21 provides=('mod_proxy_uwsgi')
22 conflicts=('mod_proxy_uwsgi')
23 replaces=('mod_proxy_uwsgi')
24 depends=('zlib' 'apr-util' 'pcre' 'libnghttp2' 'openssl' 'libxcrypt')
25 makedepends=('libxml2' 'lua' 'curl' 'brotli' 'jansson')
26 optdepends=(
27     'lua: for mod_lua module'
28     'libxml2: for mod_proxy_html, mod_xml2enc modules'
29     'curl: for mod_md module'
30     'jansson: for mod_md module'
31     'brotli: for mod_brotli module'
32     'uwsgi: for mod_proxy_uwsgi module'
33     'lynx: apachectl status'
34     'perl: for apxs and dbmmanage'
36 source=(
37     https://www.apache.org/dist/httpd/httpd-${pkgver}.tar.bz2{,.asc}
38     openssl-malloc-init.patch
39     apache.tmpfiles.conf
40     httpd.logrotate
41     httpd.service
42     arch.layout
44 sha256sums=('eb397feeefccaf254f8d45de3768d9d68e8e73851c49afd5b7176d1ecf80c340'
45             'SKIP'
46             'd305f8b52ac2a9bbda7bb0776496471e69e9d30642740f594d00086a8c7e344c'
47             '63da1a420f4714a3e7af2672d28384419cc7eedbe7bf35baebd02938fabc15bf'
48             '0bbbfae23a917b2fce0bf8f900f60319b50769224a96314e9301a75ccd078e16'
49             'f574bac6d5f398e7a649fc0e1ca66ff01ad4ef34dac71258e93d8a9d9a2b3960'
50             'dda05c6e76f12624e418ca18a36f2e90ec1c5b1cc52fed7142fce6076ec413f3')
51 # following keys are coming from https://downloads.apache.org/httpd/KEYS
52 validpgpkeys=('A93D62ECC3C8EA12DB220EC934EA76E6791485A8' # Jim Jagielski
53               'B9E8213AEFB861AF35A41F2C995E35221AD84DFF'
54               'C55AB7B9139EB2263CD1AABC19B033D1760C227B' # christophe.jaillet@wanadoo.fr
55               '26F51EF9A82F4ACB43F1903ED377C9E7D1944C66' # Stefan Eissing (icing) <stefan@eissing.org>
56               'E3480043595621FE56105F112AB12A7ADC55C003') # Daniel Ruggeri 
58 prepare() {
59   cd httpd-${pkgver}
61   # set default user
62   sed -e 's#User daemon#User http#' \
63       -e 's#Group daemon#Group http#' \
64       -i docs/conf/httpd.conf.in
66   cat "${srcdir}/arch.layout" >> config.layout
68   # https://github.com/openssl/openssl/issues/2865
69   patch -Np1 -i ../openssl-malloc-init.patch
72 build() {
73   cd httpd-${pkgver}
75   ./configure --sbindir=/usr/bin \
76       --enable-layout=Arch \
77       --enable-mpms-shared=all \
78       --enable-modules=all \
79       --enable-mods-shared=all \
80       --enable-so \
81       --enable-suexec \
82       --with-suexec-caller=http \
83       --with-suexec-docroot=/srv/http \
84       --with-suexec-logfile=/var/log/httpd/suexec.log \
85       --with-suexec-bin=/usr/bin/suexec \
86       --with-suexec-uidmin=99 --with-suexec-gidmin=99 \
87       --enable-ldap --enable-authnz-ldap --enable-authnz-fcgi \
88       --enable-cache --enable-disk-cache --enable-mem-cache --enable-file-cache \
89       --enable-ssl --with-ssl \
90       --enable-deflate --enable-cgi --enable-cgid \
91       --enable-proxy --enable-proxy-connect \
92       --enable-proxy-http --enable-proxy-ftp \
93       --enable-dbd --enable-imagemap --enable-ident --enable-cern-meta \
94       --enable-lua --enable-xml2enc --enable-http2 \
95       --enable-proxy-http2 --enable-md --enable-brotli \
96       --with-apr=/usr/bin/apr-1-config \
97       --with-apr-util=/usr/bin/apu-1-config \
98       --with-pcre=/usr
100   make
103 package() {
104   cd httpd-${pkgver}
106   make DESTDIR="${pkgdir}" install
107    
108   install -D -m644 "${srcdir}/httpd.logrotate" "${pkgdir}/etc/logrotate.d/httpd"
109   install -D -m644 "${srcdir}/apache.tmpfiles.conf" "${pkgdir}/usr/lib/tmpfiles.d/apache.conf"
110   install -D -m644 "${srcdir}/httpd.service" "${pkgdir}/usr/lib/systemd/system/httpd.service"   
111   install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
113   # symlinks for /etc/httpd
114   # do we really need this symlink?
115   ln -fs /usr/lib/httpd/modules "${pkgdir}/etc/httpd/modules"
117   # set sane defaults
118   sed -e 's#/usr/lib/httpd/modules/#modules/#' \
119       -e 's|#\(LoadModule negotiation_module \)|\1|' \
120       -e 's|#\(LoadModule include_module \)|\1|' \
121       -e 's|#\(LoadModule userdir_module \)|\1|' \
122       -e 's|#\(LoadModule slotmem_shm_module \)|\1|' \
123       -e 's|#\(Include conf/extra/httpd-multilang-errordoc.conf\)|\1|' \
124       -e 's|#\(Include conf/extra/httpd-autoindex.conf\)|\1|' \
125       -e 's|#\(Include conf/extra/httpd-languages.conf\)|\1|' \
126       -e 's|#\(Include conf/extra/httpd-userdir.conf\)|\1|' \
127       -e 's|#\(Include conf/extra/httpd-default.conf\)|\1|' \
128       -e 's|#\(Include conf/extra/httpd-mpm.conf\)|\1|' \
129       -i "${pkgdir}/etc/httpd/conf/httpd.conf"
131   # cleanup
132   rm -r "${pkgdir}/usr/share/httpd/manual"
133   rm -r "${pkgdir}/etc/httpd/conf/original"
134   rm -r "${pkgdir}/srv/"
135   rm -r "${pkgdir}/run"