Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/apache-utils: new package
@ 2023-09-14 19:17 Giulio Benetti
  2023-09-14 19:49 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 5+ messages in thread
From: Giulio Benetti @ 2023-09-14 19:17 UTC (permalink / raw)
  To: buildroot
  Cc: Giulio Benetti, James Autry, Matthew Maron, Thomas Petazzoni,
	Giulio Benetti, Jim Reinhart

From: Giulio Benetti <giulio.benetti+tekvox@benettiengineering.com>

Build htdigest and htpasswd utilities only without building entire Apache
package.

Cc: Jim Reinhart <jimr@tekvox.com>
Cc: James Autry <jautry@tekvox.com>
Cc: Matthew Maron <matthewm@tekvox.com>
Signed-off-by: Giulio Benetti <giulio.benetti+tekvox@benettiengineering.com>
---
 DEVELOPERS                                    |  1 +
 package/Config.in                             |  1 +
 .../apache-utils/0001-nios2_is_not_os2.patch  | 19 ++++++++++
 package/apache-utils/Config.in                | 15 ++++++++
 package/apache-utils/apache-utils.hash        |  5 +++
 package/apache-utils/apache-utils.mk          | 37 +++++++++++++++++++
 6 files changed, 78 insertions(+)
 create mode 100644 package/apache-utils/0001-nios2_is_not_os2.patch
 create mode 100644 package/apache-utils/Config.in
 create mode 100644 package/apache-utils/apache-utils.hash
 create mode 100644 package/apache-utils/apache-utils.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index f0c6f9cb52..806429f433 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1196,6 +1196,7 @@ F:	configs/freescale_imx6ullevk_defconfig
 F:	configs/imx6ullevk_defconfig
 F:	configs/imxrt1050-evk_defconfig
 F:	configs/olimex_a*
+F:	package/apache-utils/
 F:	package/at/
 F:	package/binutils/
 F:	package/cryptsetup/
diff --git a/package/Config.in b/package/Config.in
index e8dbadadf3..f5c9f9d321 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2278,6 +2278,7 @@ menu "Networking applications"
 	source "package/alfred/Config.in"
 	source "package/aoetools/Config.in"
 	source "package/apache/Config.in"
+	source "package/apache-utils/Config.in"
 if BR2_PACKAGE_APACHE
 menu "External Apache modules"
 	source "package/modsecurity2/Config.in"
diff --git a/package/apache-utils/0001-nios2_is_not_os2.patch b/package/apache-utils/0001-nios2_is_not_os2.patch
new file mode 100644
index 0000000000..ac9b3fb373
--- /dev/null
+++ b/package/apache-utils/0001-nios2_is_not_os2.patch
@@ -0,0 +1,19 @@
+Fix nios2 detection.
+
+Apache treats nios2 as OS/2.
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+Signed-off-by: Giulio Benetti <giulio.benetti+tekvox@benettiengineering.com>
+
+diff -uNr httpd-2.4.12.org/configure.in httpd-2.4.12/configure.in
+--- httpd-2.4.12.org/configure.in	2015-01-22 18:33:07.000000000 +0100
++++ httpd-2.4.12/configure.in	2015-04-02 22:01:32.851102219 +0200
+@@ -268,7 +268,7 @@
+ AC_MSG_NOTICE([])
+ 
+ case $host in
+-  *os2*)
++  *-os2*)
+       # Use a custom made libtool replacement
+       echo "using aplibtool"
+       LIBTOOL="$abs_srcdir/srclib/apr/build/aplibtool"
diff --git a/package/apache-utils/Config.in b/package/apache-utils/Config.in
new file mode 100644
index 0000000000..d83874c9ea
--- /dev/null
+++ b/package/apache-utils/Config.in
@@ -0,0 +1,15 @@
+config BR2_PACKAGE_APACHE_UTILS
+	bool "apache-utils"
+	depends on !BR2_STATIC_LIBS
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_USE_MMU # apr
+	select BR2_PACKAGE_APR_UTIL
+	select BR2_PACKAGE_PCRE2
+	help
+	  Apache utilities htdigest and htpasswd
+
+	  https://httpd.apache.org
+
+comment "apache-utils needs a toolchain w/ dynamic library, threads"
+	depends on BR2_USE_MMU
+	depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/apache-utils/apache-utils.hash b/package/apache-utils/apache-utils.hash
new file mode 100644
index 0000000000..1f0020f65a
--- /dev/null
+++ b/package/apache-utils/apache-utils.hash
@@ -0,0 +1,5 @@
+# From https://archive.apache.org/dist/httpd/httpd-2.4.57.tar.bz2.{sha256,sha512}
+sha256  dbccb84aee95e095edfbb81e5eb926ccd24e6ada55dcd83caecb262e5cf94d2a  httpd-2.4.57.tar.bz2
+sha512  4d1e0a274ee90bdfb5f38d4a7d73a7367ed1c6388e26280e640014e49abc0df03683705b88dcfe2ec2da313dda4c7b4a3b86daffa1911f58e224eba89d82d155  httpd-2.4.57.tar.bz2
+# Locally computed
+sha256  47b8c2b6c3309282a99d4a3001575c790fead690cc14734628c4667d2bbffc43  LICENSE
diff --git a/package/apache-utils/apache-utils.mk b/package/apache-utils/apache-utils.mk
new file mode 100644
index 0000000000..f632eaec24
--- /dev/null
+++ b/package/apache-utils/apache-utils.mk
@@ -0,0 +1,37 @@
+################################################################################
+#
+# apache-utils
+#
+################################################################################
+
+APACHE_UTILS_VERSION = 2.4.57
+APACHE_UTILS_SOURCE = httpd-$(APACHE_UTILS_VERSION).tar.bz2
+APACHE_UTILS_SITE = https://downloads.apache.org/httpd
+APACHE_UTILS_LICENSE = Apache-2.0
+APACHE_UTILS_LICENSE_FILES = LICENSE
+# We have a patch touching configure.in and Makefile.in,
+# so we need to autoreconf:
+APACHE_UTILS_AUTORECONF = YES
+APACHE_UTILS_DEPENDENCIES = apr apr-util pcre2
+
+APACHE_UTILS_CONF_ENV= \
+	ap_cv_void_ptr_lt_long=no \
+	PCRE_CONFIG=$(STAGING_DIR)/usr/bin/pcre2-config
+
+APACHE_UTILS_CONF_OPTS = \
+	--with-apr=$(STAGING_DIR)/usr \
+	--with-apr-util=$(STAGING_DIR)/usr \
+	--with-pcre=$(STAGING_DIR)/usr/bin/pcre2-config \
+	--with-static-htdigest \
+	--with-static-htpasswd
+
+define APACHE_UTILS_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/support htdigest htpasswd
+endef
+
+define APACHE_UTILS_INSTALL_TARGET_CMDS
+	$(INSTALL) -m 0755 -D $(@D)/support/htdigest $(TARGET_DIR)/usr/bin/htdigest
+	$(INSTALL) -m 0755 -D $(@D)/support/htpasswd $(TARGET_DIR)/usr/bin/htpasswd
+endef
+
+$(eval $(autotools-package))
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-09-17 20:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-14 19:17 [Buildroot] [PATCH] package/apache-utils: new package Giulio Benetti
2023-09-14 19:49 ` Thomas Petazzoni via buildroot
2023-09-14 20:11   ` Giulio Benetti
2023-09-15 22:17     ` Yann E. MORIN
2023-09-17 20:26       ` Giulio Benetti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox