slang: make install-static do install-pkgconfig
[buildroot-gz.git] / package / thttpd / thttpd.mk
blob5b4b0c45919dd691ae0656523475141e466ed758
1 ################################################################################
3 # thttpd
5 ################################################################################
7 THTTPD_VERSION = 2.25b
8 THTTPD_SOURCE = thttpd_$(THTTPD_VERSION).orig.tar.gz
9 THTTPD_PATCH = thttpd_$(THTTPD_VERSION)-11.diff.gz
10 THTTPD_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/t/thttpd
11 THTTPD_LICENSE = BSD-2c
12 THTTPD_LICENSE_FILES = thttpd.c
14 ifneq ($(THTTPD_PATCH),)
15 define THTTPD_DEBIAN_PATCHES
16 if [ -d $(@D)/debian/patches ]; then \
17 $(APPLY_PATCHES) $(@D) $(@D)/debian/patches \*.patch; \
19 endef
20 endif
22 THTTPD_POST_PATCH_HOOKS = THTTPD_DEBIAN_PATCHES
24 THTTPD_MAKE = $(MAKE1)
26 define THTTPD_INSTALL_TARGET_CMDS
27 $(INSTALL) -D -m 0755 $(@D)/thttpd $(TARGET_DIR)/usr/sbin/thttpd
28 $(INSTALL) -D -m 0755 $(@D)/extras/htpasswd $(TARGET_DIR)/usr/bin/htpasswd
29 $(INSTALL) -D -m 0755 $(@D)/extras/makeweb $(TARGET_DIR)/usr/bin/makeweb
30 $(INSTALL) -D -m 0755 $(@D)/extras/syslogtocern $(TARGET_DIR)/usr/bin/syslogtocern
31 $(INSTALL) -D -m 0755 $(@D)/scripts/thttpd_wrapper $(TARGET_DIR)/usr/sbin/thttpd_wrapper
32 $(SED) 's:/usr/local/sbin:/usr/sbin:g' -e \
33 's:/usr/local/www:/var/www:g' $(TARGET_DIR)/usr/sbin/thttpd_wrapper
34 $(INSTALL) -d $(TARGET_DIR)/var/www/data
35 $(INSTALL) -d $(TARGET_DIR)/var/www/logs
36 echo "dir=/var/www/data" > $(TARGET_DIR)/var/www/thttpd_config
37 echo 'cgipat=**.cgi' >> $(TARGET_DIR)/var/www/thttpd_config
38 echo "logfile=/var/www/logs/thttpd_log" >> $(TARGET_DIR)/var/www/thttpd_config
39 echo "pidfile=/var/run/thttpd.pid" >> $(TARGET_DIR)/var/www/thttpd_config
40 endef
42 define THTTPD_INSTALL_INIT_SYSV
43 $(INSTALL) -D -m 0755 $(@D)/scripts/thttpd.sh $(TARGET_DIR)/etc/init.d/S90thttpd
44 $(SED) 's:/usr/local/sbin:/usr/sbin:g' $(TARGET_DIR)/etc/init.d/S90thttpd
45 endef
47 define THTTPD_INSTALL_INIT_SYSTEMD
48 $(INSTALL) -D -m 0644 package/thttpd/thttpd.service \
49 $(TARGET_DIR)/usr/lib/systemd/system/thttpd.service
50 mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/
51 ln -fs ../../../../usr/lib/systemd/system/thttpd.service \
52 $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/thttpd.service
53 endef
55 $(eval $(autotools-package))