1 #############################################################
5 #############################################################
7 THTTPD_SOURCE
:=thttpd-
$(THTTPD_VER
).
tar.gz
8 THTTPD_SITE
:=http
://www.acme.com
/software
/thttpd
/
9 THTTPD_DIR
:=$(BUILD_DIR
)/thttpd-
$(THTTPD_VER
)
12 THTTPD_TARGET_BINARY
:=sbin
/thttpd
14 THTTPD_WEB_DIR
:=$(THTTPD_ROOT
)/www
16 $(DL_DIR
)/$(THTTPD_SOURCE
):
17 $(WGET
) -P
$(DL_DIR
) $(THTTPD_SITE
)/$(THTTPD_SOURCE
)
19 $(THTTPD_DIR
)/.unpacked
: $(DL_DIR
)/$(THTTPD_SOURCE
)
20 $(THTTPD_CAT
) $(DL_DIR
)/$(THTTPD_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
21 touch
$(THTTPD_DIR
)/.unpacked
23 $(THTTPD_DIR
)/.configured
: $(THTTPD_DIR
)/.unpacked
24 (cd
$(THTTPD_DIR
); rm -rf config.cache
; \
25 $(TARGET_CONFIGURE_OPTS
) CC_FOR_BUILD
=$(HOSTCC
) \
26 CFLAGS
="$(TARGET_CFLAGS)" \
28 --target
=$(GNU_TARGET_NAME
) \
29 --host
=$(GNU_TARGET_NAME
) \
30 --build
=$(GNU_HOST_NAME
) \
31 --prefix=$(THTTPD_ROOT
) \
33 touch
$(THTTPD_DIR
)/.configured
35 $(THTTPD_DIR
)/$(THTTPD_BINARY
): $(THTTPD_DIR
)/.configured
36 $(TARGET_CONFIGURE_OPTS
) $(MAKE
) CC
=$(TARGET_CC
) -C
$(THTTPD_DIR
)
38 $(TARGET_DIR
)/$(THTTPD_TARGET_BINARY
): $(THTTPD_DIR
)/$(THTTPD_BINARY
)
39 install -D
$(THTTPD_DIR
)/$(THTTPD_BINARY
) $(TARGET_DIR
)/$(THTTPD_TARGET_BINARY
)
40 install -D
$(THTTPD_DIR
)/extras
/htpasswd
$(TARGET_DIR
)/bin
/htpasswd
41 install -D
$(THTTPD_DIR
)/extras
/makeweb
$(TARGET_DIR
)/bin
/makeweb
42 install -D
$(THTTPD_DIR
)/extras
/syslogtocern
$(TARGET_DIR
)/bin
/syslogtocern
43 install -D
$(THTTPD_DIR
)/scripts
/thttpd_wrapper
$(TARGET_DIR
)/sbin
/thttpd_wrapper
44 install -D
$(THTTPD_DIR
)/scripts
/thttpd.sh
$(TARGET_DIR
)/etc
/init.d
/S90thttpd
45 cp
$(TARGET_DIR
)/etc
/init.d
/S90thttpd
$(TARGET_DIR
)/etc
/init.d
/S90thttpd.in
46 cp
$(TARGET_DIR
)/sbin
/thttpd_wrapper
$(TARGET_DIR
)/sbin
/thttpd_wrapper.in
47 sed
-e
"s:/usr/local/sbin:/sbin:g" -e
"s:/usr/local/www:$(THTTPD_WEB_DIR):g" < $(TARGET_DIR
)/sbin
/thttpd_wrapper.in
> $(TARGET_DIR
)/sbin
/httpd_wrapper
48 sed
-e
"s:/usr/local/sbin:/sbin:g" < $(TARGET_DIR
)/etc
/init.d
/S90thttpd.in
> $(TARGET_DIR
)/etc
/init.d
/S90thttpd
49 rm -f
$(TARGET_DIR
)/etc
/init.d
/S90thttpd.in
$(TARGET_DIR
)/sbin
/thttpd_wrapper.in
50 install -d
$(TARGET_DIR
)$(THTTPD_WEB_DIR
)/data
51 install -d
$(TARGET_DIR
)$(THTTPD_WEB_DIR
)/logs
52 echo
"dir=$(THTTPD_WEB_DIR)/data" > $(TARGET_DIR
)$(THTTPD_WEB_DIR
)/thttpd_config
53 echo
'cgipat=**.cgi' >> $(TARGET_DIR
)$(THTTPD_WEB_DIR
)/thttpd_config
54 echo
"logfile=$(THTTPD_WEB_DIR)/logs/thttpd_log" >> $(TARGET_DIR
)$(THTTPD_WEB_DIR
)/thttpd_config
55 echo
"pidfile=/var/run/thttpd.pid" >> $(TARGET_DIR
)$(THTTPD_WEB_DIR
)/thttpd_config
56 echo
"<HTML><BODY>thttpd test page</BODY></HTML>" > $(TARGET_DIR
)$(THTTPD_WEB_DIR
)/data
/index.html
58 thttpd
: uclibc
$(TARGET_DIR
)/$(THTTPD_TARGET_BINARY
)
61 rm -f
$(TARGET_DIR
)/$(THTTPD_TARGET_BINARY
)
62 -$(MAKE
) -C
$(THTTPD_DIR
) clean
66 #############################################################
68 # Toplevel Makefile options
70 #############################################################
71 ifeq ($(strip $(BR2_PACKAGE_THTTPD
)),y
)