kumquat-buildroot/package/thttpd/thttpd.mk
Fabrice Fontaine e4eda364a2 package/thttpd: add libxcrypt optional dependency
Fix the following build failure raised since bump of glibc to version
2.39 in commit b5680f53d6:

/home/autobuild/autobuild/instance-14/output-1/host/lib/gcc/arm-buildroot-linux-gnueabi/12.3.0/../../../../arm-buildroot-linux-gnueabi/bin/ld: libhttpd.o: in function `auth_check2':
libhttpd.c:(.text+0x3d50): undefined reference to `crypt'

Fixes: b5680f53d6
 - http://autobuild.buildroot.org/results/bfb8a115edf71b1852cc8585c00eb9f0e801a955

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2024-04-07 17:34:28 +02:00

47 lines
1.6 KiB
Makefile

################################################################################
#
# thttpd
#
################################################################################
THTTPD_VERSION = 2.29
THTTPD_SITE = https://acme.com/software/thttpd
THTTPD_LICENSE = BSD-2-Clause
THTTPD_LICENSE_FILES = thttpd.c
THTTPD_CPE_ID_VENDOR = acme
THTTPD_MAKE = $(MAKE1)
ifeq ($(BR2_PACKAGE_LIBXCRYPT),y)
THTTPD_DEPENDENCIES += libxcrypt
endif
define THTTPD_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0755 $(@D)/thttpd $(TARGET_DIR)/usr/sbin/thttpd
$(INSTALL) -D -m 0755 $(@D)/extras/htpasswd $(TARGET_DIR)/usr/bin/htpasswd
$(INSTALL) -D -m 0755 $(@D)/extras/makeweb $(TARGET_DIR)/usr/bin/makeweb
$(INSTALL) -D -m 0755 $(@D)/extras/syslogtocern $(TARGET_DIR)/usr/bin/syslogtocern
$(INSTALL) -D -m 0755 $(@D)/scripts/thttpd_wrapper $(TARGET_DIR)/usr/sbin/thttpd_wrapper
$(SED) 's:/usr/local/sbin:/usr/sbin:g' -e \
's:/usr/local/www/thttpd_config:/etc/thttpd.conf:g' \
$(TARGET_DIR)/usr/sbin/thttpd_wrapper
$(INSTALL) -d $(TARGET_DIR)/var/www/data
$(INSTALL) -d $(TARGET_DIR)/var/www/logs
echo "dir=/var/www/data" > $(TARGET_DIR)/etc/thttpd.conf
echo 'cgipat=**.cgi' >> $(TARGET_DIR)/etc/thttpd.conf
echo "logfile=/var/www/logs/thttpd_log" >> $(TARGET_DIR)/etc/thttpd.conf
echo "pidfile=/var/run/thttpd.pid" >> $(TARGET_DIR)/etc/thttpd.conf
endef
define THTTPD_INSTALL_INIT_SYSV
$(INSTALL) -D -m 0755 package/thttpd/S90thttpd \
$(TARGET_DIR)/etc/init.d/S90thttpd
endef
define THTTPD_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 0644 package/thttpd/thttpd.service \
$(TARGET_DIR)/usr/lib/systemd/system/thttpd.service
endef
$(eval $(autotools-package))