mirror of
https://github.com/outbackdingo/ports.git
synced 2026-01-27 10:20:12 +00:00
59 lines
2.0 KiB
Plaintext
Executable File
59 lines
2.0 KiB
Plaintext
Executable File
# description : Open-source HTTP server
|
|
# depends : apr-util libnghttp2 pcre2 libxml2 openssl
|
|
|
|
name=apache
|
|
version=2.4.58
|
|
release=3
|
|
source="https://archive.apache.org/dist/httpd/httpd-$version.tar.bz2
|
|
httpd-blfs_layout-1.patch::https://www.linuxfromscratch.org/patches/blfs/svn/httpd-$version-blfs_layout-1.patch
|
|
apache_libxml2-2.12.patch
|
|
rc.httpd
|
|
run.httpd"
|
|
|
|
build() {
|
|
cd httpd-$version
|
|
|
|
# Forces the apxs utility to use absolute pathnames for modules, when instructed to do so
|
|
patch -Np1 -i $SRC/httpd-blfs_layout-1.patch
|
|
|
|
patch -Np1 -i $SRC/apache_libxml2-2.12.patch
|
|
|
|
sed '/dir.*CFG_PREFIX/s@^@#@' -i support/apxs.in
|
|
|
|
sed -e '/HTTPD_ROOT/s:${ap_prefix}:/etc/httpd:' \
|
|
-e '/SERVER_CONFIG_FILE/s:${rel_sysconfdir}/::' \
|
|
-e '/AP_TYPES_CONFIG_FILE/s:${rel_sysconfdir}/::' \
|
|
-i configure
|
|
|
|
./configure --enable-authnz-fcgi \
|
|
--enable-layout=BLFS \
|
|
--enable-mods-shared="all cgi" \
|
|
--enable-mpms-shared=all \
|
|
--enable-suexec=shared \
|
|
--with-apr=/usr/bin/apr-1-config \
|
|
--with-apr-util=/usr/bin/apu-1-config \
|
|
--with-suexec-bin=/usr/lib/httpd/suexec \
|
|
--with-suexec-caller=apache \
|
|
--with-suexec-docroot=/srv/www \
|
|
--with-suexec-logfile=/var/log/httpd/suexec.log \
|
|
--with-suexec-uidmin=100 \
|
|
--with-suexec-userdir=public_html
|
|
make
|
|
make DESTDIR=$PKG install
|
|
|
|
mv -v $PKG/usr/sbin/suexec $PKG/usr/lib/httpd/suexec
|
|
|
|
rm -fr $PKG/var/run
|
|
|
|
_runit() {
|
|
# runit service
|
|
install -Dm755 $SRC/run.httpd $PKG/etc/sv/httpd/run
|
|
ln -s /run/runit/supervise.httpd $PKG/etc/sv/httpd/supervise
|
|
}
|
|
_sysv() {
|
|
# rc service
|
|
install -Dm755 $SRC/rc.httpd $PKG/etc/rc.d/httpd
|
|
}
|
|
scratch isinstalled runit && _runit || _sysv
|
|
}
|