[4/4] apache: Introduce apache into IPFire3.x

Message ID 20230918141810.536112-4-adolf.belka@ipfire.org
State Accepted
Commit b2c4ea1cc24d27a404ecf63810cc6b7342e56062
Headers
Series [1/4] libxcrypt: Update to version 4.4.36 |

Commit Message

Adolf Belka Sept. 18, 2023, 2:16 p.m. UTC
  - IPFire3.x
- Creation of nm file for installation of apache

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
 apache/apache.nm | 104 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 104 insertions(+)
 create mode 100644 apache/apache.nm
  

Patch

diff --git a/apache/apache.nm b/apache/apache.nm
new file mode 100644
index 000000000..a4421b634
--- /dev/null
+++ b/apache/apache.nm
@@ -0,0 +1,104 @@ 
+###############################################################################
+# IPFire.org    - An Open Source Firewall Solution                            #
+# Copyright (C) - IPFire Development Team <info@ipfire.org>                   #
+###############################################################################
+
+name       = apache
+version    = 2.4.57
+release    = 1
+thisapp    = httpd-%{version}
+
+groups     = System/Libraries
+url        = https://httpd.apache.org/
+license    = ASL 2.0
+summary    = Apache Portable Runtime library
+
+description
+	The Apache HTTP Server Project is an effort to develop and maintain an open-source HTTP
+	server for modern operating systems including UNIX and Windows. The goal of this project is
+	to provide a secure, efficient and extensible server that provides HTTP services in sync with 
+	the current HTTP standards.
+
+	The Apache HTTP Server ("httpd") was launched in 1995 and it has been the most popular web
+	server on the Internet since April 1996. It has celebrated its 25th birthday as a project
+	in February 2020.
+
+	The Apache HTTP Server is a project of The Apache Software Foundation.
+end
+
+source_dl  = https://downloads.apache.org/httpd/
+sources    = %{thisapp}.tar.bz2
+
+build
+	requires
+		apr-devel
+		apr-util-devel
+		pcre-devel
+		pcre2-devel
+		openssl-devel
+		expat-devel
+		libuuid-devel
+		libxcrypt-devel
+	end
+	
+	prepare_cmds
+		### Add IPFire's layout, too
+		echo "# IPFire layout" >> config.layout
+		echo "<Layout IPFire>" >> config.layout
+		echo "    prefix:             /usr" >> config.layout
+		echo "    exec_prefix:        /usr" >> config.layout
+		echo "    bindir:             /usr/bin" >> config.layout
+		echo "    sbindir:            /usr/sbin" >> config.layout
+		echo "    libdir:             /usr/lib" >> config.layout
+		echo "    libexecdir:         /usr/lib/httpd/modules" >> config.layout
+		echo "    mandir:             /usr/share/man" >> config.layout
+		echo "    sysconfdir:         /etc/httpd/conf" >> config.layout
+		echo "    datadir:            /srv/web/ipfire" >> config.layout
+		echo "    installbuilddir:    /usr/lib/apache/build" >> config.layout
+		echo "    errordir:           /srv/web/ipfire/error" >> config.layout
+		echo "    iconsdir:           /srv/web/ipfire/icons" >> config.layout
+		echo "    htdocsdir:          /srv/web/ipfire/htdocs" >> config.layout
+		echo "    manualdir:          /srv/web/ipfire/manual" >> config.layout
+		echo "    cgidir:             /srv/web/ipfire/cgi-bin" >> config.layout
+		echo "    includedir:         /usr/include/apache" >> config.layout
+		echo "    localstatedir:      /srv/web/ipfire" >> config.layout
+		echo "    runtimedir:         /var/run" >> config.layout
+		echo "    logfiledir:         /var/log/httpd" >> config.layout
+		echo "    proxycachedir:      /var/cache/apache/proxy" >> config.layout
+		echo "</Layout>" >> config.layout
+	end
+
+	configure_options += \
+		--enable-layout=IPFire \
+		--enable-ssl \
+		--enable-mods-shared=all \
+		--enable-proxy \
+		--with-mpm=event \
+		--disable-lua \
+		--disable-md \
+		--libexecdir=/usr/lib/httpd/modules
+
+	install_cmds
+		# var/run no longer used
+		rm -df %{BUILDROOT}/var/run
+		
+		# non executable bash scripts should not be in usr/sbin 
+		mv %{BUILDROOT}/usr/sbin/envvars* %{BUILDROOT}/usr/lib/apache/
+		
+		# change location of envars files in apachectl
+		sed -i 's#/usr/sbin/envvars#/usr/lib/apache/envvars#g' %{BUILDROOT}/usr/sbin/apachectl
+	end
+
+end
+
+packages
+	package %{name}
+
+	package %{name}-devel
+		template DEVEL
+	end
+
+	package %{name}-debuginfo
+		template DEBUGINFO
+	end
+end