summaryrefslogtreecommitdiff
path: root/skip/apache2/apache2.xibuild
diff options
context:
space:
mode:
Diffstat (limited to 'skip/apache2/apache2.xibuild')
-rw-r--r--skip/apache2/apache2.xibuild119
1 files changed, 119 insertions, 0 deletions
diff --git a/skip/apache2/apache2.xibuild b/skip/apache2/apache2.xibuild
new file mode 100644
index 0000000..f2de5a4
--- /dev/null
+++ b/skip/apache2/apache2.xibuild
@@ -0,0 +1,119 @@
+#!/bin/sh
+
+NAME="apache2"
+DESC="A high performance Unix-based HTTP server"
+
+MAKEDEPS=" apr apr-util autoconf automake brotli libxml2 lua nghttp2 openssl-dev>3 pcre sed zlib"
+
+_pkgreal=httpd
+
+PKG_VER=2.4.54
+SOURCE="https://dlcdn.apache.org/$_pkgreal/$_pkgreal-$PKG_VER.tar.bz2"
+
+ADDITIONAL="
+alpine.layout
+apache2-ssl.post-install
+apache2.confd
+apache2.initd
+apache2.logrotate
+apache2.pre-install
+apache2.pre-upgrade
+conf
+"
+
+prepare() {
+ for i in $source; do
+ case $i in
+ *.patch) echo $i; patch -p1 -i "$BUILD_ROOT"/$(basename $i);;
+ esac
+ done
+
+ cat "$BUILD_ROOT/alpine.layout" >> config.layout
+}
+
+build() {
+ ./configure \
+ --prefix=/usr \
+ --enable-so \
+ --enable-suexec \
+ --with-suexec-caller=apache \
+ --with-suexec-docroot=/var/www \
+ --with-suexec-logfile=/var/log/apache2/suexec.log \
+ --with-suexec-bin=/usr/sbin/suexec \
+ --with-suexec-uidmin=99 \
+ --with-suexec-gidmin=99 \
+ --with-apr=/usr/bin/apr-1-config \
+ --with-apr-util=/usr/bin/apu-1-config \
+ --with-pcre=/usr \
+ --enable-mods-shared=all \
+ --enable-mpms-shared=all \
+ --with-mpm=prefork \
+ --enable-ssl \
+ --with-ssl \
+ --enable-proxy \
+ --enable-cache \
+ --enable-disk-cache \
+ --enable-mem-cache \
+ --enable-file-cache \
+ --enable-ldap \
+ --enable-authnz-ldap \
+ --enable-cgid \
+ --enable-cgi \
+ --enable-authn-anon \
+ --enable-authn-alias \
+ --disable-imagemap \
+ --enable-proxy-connect \
+ --enable-proxy-http \
+ --enable-proxy-ftp \
+ --enable-deflate \
+ --enable-dbd \
+ --enable-exception-hook \
+ --enable-dav \
+ --enable-dav-fs \
+ --enable-dav-lock
+ make
+}
+
+package() {
+ make -j1 DESTDIR="$PKG_DEST" install
+
+ # config
+ rm -r "$PKG_DEST"/etc/apache2/extra/httpd-vhosts.conf \
+ "$PKG_DEST"/etc/apache2/original
+ mv "$PKG_DEST"/etc/apache2/extra "$PKG_DEST"/etc/apache2/conf.d
+ for file in "$PKG_DEST"/etc/apache2/conf.d/httpd-*; do
+ mv "$file" \
+ "$(dirname $file)/${file#$PKG_DEST/etc/apache2/conf.d/httpd-}"
+ done
+ sed -Ei \
+ 's:^(\t?#?LoadModule .+ )lib/apache2/:\1modules/:;ta;b;:a;s/^#?LoadModule (dav.*|lbmethod_.+|.*ldap|lua|proxy.*|ssl|xml2enc)_module //;tb;b;:b;d' \
+ "$PKG_DEST"/etc/apache2/httpd.conf
+
+ # init scripts and logrotate
+ install -D -m755 "$BUILD_ROOT"/apache2.initd \
+ "$PKG_DEST"/etc/init.d/apache2
+ install -D -m644 "$BUILD_ROOT"/apache2.logrotate \
+ "$PKG_DEST"/etc/logrotate.d/apache2
+ install -D -m644 "$BUILD_ROOT"/apache2.confd \
+ "$PKG_DEST"/etc/conf.d/apache2
+
+ install -d "$PKG_DEST"/var/www
+ install -d -m 2750 -g wheel "$PKG_DEST"/var/log/apache2
+ ln -fs /var/log/apache2 "$PKG_DEST"/var/www/logs
+ ln -fs /run/apache2 "$PKG_DEST"/var/www/run
+ ln -fs /usr/lib/apache2 "$PKG_DEST"/var/www/modules
+ rm -fr "$PKG_DEST"/run
+
+ # verify all MPMs are built
+ # ref #2866
+ for i in prefork event worker; do
+ if ! [ -e "$PKG_DEST"/usr/lib/apache2/mod_mpm_$i.so ]; then
+ error "$i MPM was not built"
+ fi
+ done
+
+ # create the run directory
+ # ref #9982
+ mkdir -p "$PKG_DEST"/run/apache2
+}
+