archrelease: copy trunk to extra-x86_64
[arch-packages.git] / apache / repos / extra-x86_64 / PKGBUILD
blob1891ddf2e1d72be467017031d13b2333a74c1271
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.57
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' 'pcre2' 'libnghttp2' 'openssl' 'libxcrypt')
25 makedepends=('libxml2' 'lua' 'curl' 'brotli' 'jansson' 'db' 'systemd')
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'
35     'systemd-libs: for mod_systemd module'
37 source=(
38     https://www.apache.org/dist/httpd/httpd-${pkgver}.tar.bz2{,.asc}
39     apache.tmpfiles.conf
40     httpd.logrotate
41     httpd.service
42     arch.layout
44 sha256sums=('dbccb84aee95e095edfbb81e5eb926ccd24e6ada55dcd83caecb262e5cf94d2a'
45             'SKIP'
46             '63da1a420f4714a3e7af2672d28384419cc7eedbe7bf35baebd02938fabc15bf'
47             '0bbbfae23a917b2fce0bf8f900f60319b50769224a96314e9301a75ccd078e16'
48             'f574bac6d5f398e7a649fc0e1ca66ff01ad4ef34dac71258e93d8a9d9a2b3960'
49             'dda05c6e76f12624e418ca18a36f2e90ec1c5b1cc52fed7142fce6076ec413f3')
50 # following keys are coming from https://downloads.apache.org/httpd/KEYS
51 validpgpkeys=('A93D62ECC3C8EA12DB220EC934EA76E6791485A8' # Jim Jagielski
52               'B9E8213AEFB861AF35A41F2C995E35221AD84DFF'
53               'C55AB7B9139EB2263CD1AABC19B033D1760C227B' # christophe.jaillet@wanadoo.fr
54               '26F51EF9A82F4ACB43F1903ED377C9E7D1944C66' # Stefan Eissing (icing) <stefan@eissing.org>
55               'E3480043595621FE56105F112AB12A7ADC55C003' # Daniel Ruggeri
56               '65B2D44FE74BD5E3DE3AC3F082781DE46D5954FA')  # Eric Covener <covener@apache.org>
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
69 build() {
70   cd httpd-${pkgver}
72   ./configure --sbindir=/usr/bin \
73       --enable-layout=Arch \
74       --enable-mpms-shared=all \
75       --enable-modules=all \
76       --enable-mods-shared=all \
77       --enable-so \
78       --enable-suexec \
79       --with-suexec-caller=http \
80       --with-suexec-docroot=/srv/http \
81       --with-suexec-logfile=/var/log/httpd/suexec.log \
82       --with-suexec-bin=/usr/bin/suexec \
83       --with-suexec-uidmin=99 --with-suexec-gidmin=99 \
84       --enable-ldap --enable-authnz-ldap --enable-authnz-fcgi \
85       --enable-cache --enable-disk-cache --enable-mem-cache --enable-file-cache \
86       --enable-ssl --with-ssl \
87       --enable-deflate --enable-cgi --enable-cgid \
88       --enable-proxy --enable-proxy-connect \
89       --enable-proxy-http --enable-proxy-ftp \
90       --enable-dbd --enable-imagemap --enable-ident --enable-cern-meta \
91       --enable-lua --enable-xml2enc --enable-http2 \
92       --enable-proxy-http2 --enable-md --enable-brotli --enable-systemd \
93       --with-apr=/usr/bin/apr-1-config \
94       --with-apr-util=/usr/bin/apu-1-config \
95       --with-pcre2
97   make
100 package() {
101   cd httpd-${pkgver}
103   make DESTDIR="${pkgdir}" install
104    
105   install -D -m644 "${srcdir}/httpd.logrotate" "${pkgdir}/etc/logrotate.d/httpd"
106   install -D -m644 "${srcdir}/apache.tmpfiles.conf" "${pkgdir}/usr/lib/tmpfiles.d/apache.conf"
107   install -D -m644 "${srcdir}/httpd.service" "${pkgdir}/usr/lib/systemd/system/httpd.service"   
108   install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
110   # symlinks for /etc/httpd
111   # do we really need this symlink?
112   ln -fs /usr/lib/httpd/modules "${pkgdir}/etc/httpd/modules"
114   # set sane defaults
115   sed -e 's#/usr/lib/httpd/modules/#modules/#' \
116       -e 's|#\(LoadModule negotiation_module \)|\1|' \
117       -e 's|#\(LoadModule include_module \)|\1|' \
118       -e 's|#\(LoadModule userdir_module \)|\1|' \
119       -e 's|#\(LoadModule slotmem_shm_module \)|\1|' \
120       -e 's|#\(Include conf/extra/httpd-multilang-errordoc.conf\)|\1|' \
121       -e 's|#\(Include conf/extra/httpd-autoindex.conf\)|\1|' \
122       -e 's|#\(Include conf/extra/httpd-languages.conf\)|\1|' \
123       -e 's|#\(Include conf/extra/httpd-userdir.conf\)|\1|' \
124       -e 's|#\(Include conf/extra/httpd-default.conf\)|\1|' \
125       -e 's|#\(Include conf/extra/httpd-mpm.conf\)|\1|' \
126       -i "${pkgdir}/etc/httpd/conf/httpd.conf"
128   # cleanup
129   rm -r "${pkgdir}/usr/share/httpd/manual"
130   rm -r "${pkgdir}/etc/httpd/conf/original"
131   rm -r "${pkgdir}/srv/"
132   rm -r "${pkgdir}/run"