summaryrefslogtreecommitdiffstats
path: root/rules
diff options
context:
space:
mode:
authorJuergen Beisert <j.beisert@pengutronix.de>2006-12-07 16:12:32 +0000
committerJuergen Beisert <j.beisert@pengutronix.de>2006-12-07 16:12:32 +0000
commit1d863f18115d3675da87655984103625e43dc935 (patch)
treee925fea3248a9447b9867fc6aad96595697dde8c /rules
parent302ff90d8df9de72aa0284f7949232cd35275f1a (diff)
downloadptxdist-1d863f18115d3675da87655984103625e43dc935.tar.gz
ptxdist-1d863f18115d3675da87655984103625e43dc935.tar.xz
moving apache's init.d stuff into the packet itself
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@6481 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'rules')
-rw-r--r--rules/apache2.in168
-rw-r--r--rules/apache2.make50
-rw-r--r--rules/rootfs_init_d_files.in38
-rw-r--r--rules/rootfs_rc_d_links.in2
4 files changed, 136 insertions, 122 deletions
diff --git a/rules/apache2.in b/rules/apache2.in
index 9a563ea53..40cd13812 100644
--- a/rules/apache2.in
+++ b/rules/apache2.in
@@ -6,11 +6,14 @@ menuconfig APACHE2
select GLIBC_LIBRT
select HOST_APACHE2
help
- Apache v2 is the next generation of the Apache web server.
- This version - a total rewrite - introduces many new
- improvements, such as threading, a new API, IPv6 support,
+ Apache v2 is the next generation of the Apache web server.
+ This version - a total rewrite - introduces many new
+ improvements, such as threading, a new API, IPv6 support,
request/response filtering, and more.
+comment "build options ---"
+ depends on APACHE2
+
choice
depends on APACHE2
prompt "Multi Process Model"
@@ -34,27 +37,89 @@ choice
One acceptor thread, multiple worker threads.
endchoice
-config APACHE2_DEFAULTCONFIG
- prompt "Default config file"
+comment "runtime options ---"
+ depends on APACHE2
+
+config APACHE2_SERVERROOT
+ depends on APACHE2
+ string
+ prompt "ServerRoot directory"
+ default "/usr/share/apache2"
+ help
+ This directory defines apache's serverroot where the icons are
+ located.
+
+menuconfig ROOTFS_ETC_INITD_HTTPD
+ depends on APACHE2
bool
+ default y
+ prompt "Install startup script"
+ help
+ The /etc/init.d/httpd script lets you control the apache daemon.
+
+ choice
+ prompt "Kind of startup script"
+ depends on ROOTFS_ETC_INITD_HTTPD
+ default ROOTFS_ETC_INITD_HTTPD_DEFAULT
+
+ config ROOTFS_ETC_INITD_HTTPD_DEFAULT
+ bool
+ prompt "Use generic"
+ help
+ Install a generic /etc/init.d/httpd file.
+ See <ptxdist-install>/generic/etc/init.d/httpd
+
+ config ROOTFS_ETC_INITD_HTTPD_USER
+ bool
+ prompt "User defined"
+ help
+ This uses a user defined httpd startup script. PTXdist
+ uses file projectroot/etc/init.d/httpd in your local
+ project
+ endchoice
+
+config APACHE2_INSTALL_CONFIG
depends on APACHE2
+ bool
default y
+ prompt "Install httpd.conf"
help
- This uses a generic configuration file for your apache. There is
- nothing special in it, so you should check it before using.
+ Install a $(PTXCONF_APACHE2_CONFIGDIR)/httpd.conf from a selectable
+ source.
+
+ choice
+ prompt "Kind of httpd.conf"
+ depends on APACHE2_INSTALL_CONFIG
+ default APACHE2_DEFAULTCONFIG
+
+ config APACHE2_DEFAULTCONFIG
+ bool
+ prompt "Use generic"
+ help
+ Install a generic httpd.conf file.
+ See <ptxdist-install>/generic/etc/httpd.conf
+
+ config APACHE2_USERCONFIG
+ bool
+ prompt "User defined"
+ help
+ This uses a user defined httpd.conf startup script.
+ PTXdist uses file projectroot/httpd.conf in your
+ local project
+ endchoice
config APACHE2_LISTEN
- depends on APACHE2_DEFAULTCONFIG
+ depends on APACHE2_INSTALL_CONFIG
string
default "0.0.0.0:80"
prompt "LISTEN"
help
LISTEN entry in httpd.conf; this entry must contain a server
name or IP and a port, for example "0.0.0.0:80" to listen
- on all interfaces.
+ on all interfaces.
config APACHE2_SERVERNAME
- depends on APACHE2_DEFAULTCONFIG
+ depends on APACHE2_INSTALL_CONFIG
string
default "localhost"
prompt "SERVERNAME"
@@ -62,54 +127,32 @@ config APACHE2_SERVERNAME
SERVERNAME entry in httpd.conf
config APACHE2_SERVERADMIN
- depends on APACHE2_DEFAULTCONFIG
+ depends on APACHE2_INSTALL_CONFIG
string
default "foo\@bar"
prompt "SERVERADMIN"
help
SERVERADMIN entry in httpd.conf
-config APACHE2_USER_CONFIG
- depends on APACHE2 && !APACHE2_DEFAULTCONFIG
- string
- prompt "Your own apache configurations file"
- default ""
- help
- Enter path to your own configuration file that should be
- used by apache on your target.
-
-comment "Directories"
+comment "Directories ---"
depends on APACHE2
-config APACHE2_SERVERROOT
+config APACHE2_CONFIGDIR
depends on APACHE2
string
- prompt "ServerRoot directory"
- default "/usr/share/apache2"
+ default "/etc/apache2"
+ prompt "Config directory"
help
- This directory defines apache's serverroot where the icons are
- located.
+ Apache's configuration directory (httpd.conf, mime.types etc. are
+ searched here).
-config APACHE2_PUBLICDOMAINICONS
- bool "Public Domain Icons"
- depends on APACHE2 && APACHE2_SERVERROOT != ""
- default y
- help
- These icons were originally made for Mosaic for X and have been
- included in the NCSA httpd and Apache server distributions in the
- past. They are in the public domain and may be freely included in
- any application. The originals were done by Kevin Hughes
- (kevinh@kevcom.com).
-
-config APACHE2_CUSTOMERRORS
- bool "Multi Language Custom Error Documents"
- depends on APACHE2 && APACHE2_SERVERROOT != ""
- default y
+config APACHE2_LOGDIR
+ depends on APACHE2
+ string
+ default "/var/log/apache2"
+ prompt "Logfile directory"
help
- Install HTTP error messages in multiple languages. If the preferred
- language of a client is available it is selected automatically via
- the MultiViews feature. This feature is enabled by default via the
- Options, Language and ErrorDocument directives.
+ Apache's logfile directory.
config APACHE2_DOCUMENTROOT
depends on APACHE2
@@ -120,7 +163,7 @@ config APACHE2_DOCUMENTROOT
Apache's docroot is very empty if you don't add some
files. Later you can connect to your target, but you
will see nothing special (only an very small html page
- is provided).
+ is provided).
config APACHE2_DEFAULT_INDEX
depends on APACHE2 && APACHE2_DOCUMENTROOT != ""
@@ -128,24 +171,31 @@ config APACHE2_DEFAULT_INDEX
default y
prompt "Default index.html"
help
- Install a demo HTML file, from project/generic/index.html.
+ Install a demo HTML file, from project/generic/index.html.
-config APACHE2_CONFIGDIR
+comment "Misc ---"
depends on APACHE2
- string
- default "/etc/apache2"
- prompt "Config directory"
+
+config APACHE2_PUBLICDOMAINICONS
+ bool "Public Domain Icons"
+ depends on APACHE2 && APACHE2_SERVERROOT != ""
+ default y
help
- Apache's configuration directory (httpd.conf, mime.types etc. are
- searched here).
+ These icons were originally made for Mosaic for X and have been
+ included in the NCSA httpd and Apache server distributions in the
+ past. They are in the public domain and may be freely included in
+ any application. The originals were done by Kevin Hughes
+ (kevinh@kevcom.com).
-config APACHE2_LOGDIR
- depends on APACHE2
- string
- default "/var/log/apache2"
- prompt "Logfile directory"
+config APACHE2_CUSTOMERRORS
+ bool "Multi Language Custom Error Documents"
+ depends on APACHE2 && APACHE2_SERVERROOT != ""
+ default y
help
- Apache's logfile directory.
+ Install HTTP error messages in multiple languages. If the preferred
+ language of a client is available it is selected automatically via
+ the MultiViews feature. This feature is enabled by default via the
+ Options, Language and ErrorDocument directives.
comment "----------------------------------"
depends on APACHE2
diff --git a/rules/apache2.make b/rules/apache2.make
index b020d1d8a..f17da2440 100644
--- a/rules/apache2.make
+++ b/rules/apache2.make
@@ -245,15 +245,22 @@ endif
ifneq ($(PTXCONF_APACHE2_CONFIGDIR),"")
@$(call install_copy, apache2, 12, 102, 0755, $(PTXCONF_APACHE2_CONFIGDIR))
+# ---------------------------
+# generate a config file
#
-# generate a default config file
-# Replace special markers with their designated values
-#
+ifdef PTXCONF_APACHE2_INSTALL_CONFIG
ifdef PTXCONF_APACHE2_DEFAULTCONFIG
+# use generic one
@$(call install_copy, apache2, 12, 102, 0644, \
$(PTXDIST_TOPDIR)/generic/httpd.conf, \
$(PTXCONF_APACHE2_CONFIGDIR)/httpd.conf, n)
- @echo "installing apache's default config file..."
+endif
+ifdef PTXCONF_APACHE2_USERCONFIG
+# users one
+ @$(call install_copy, apache2, 12, 102, 0644, \
+ $(PTXDIST_WORKSPACE)/projectroot/httpd.conf, \
+ $(PTXCONF_APACHE2_CONFIGDIR)/httpd.conf, n)
+endif
# modify placeholders with data from configuration
@$(call install_replace, apache2, $(PTXCONF_APACHE2_CONFIGDIR)/httpd.conf, \
@SERVERROOT@, $(PTXCONF_APACHE2_SERVERROOT) )
@@ -271,43 +278,38 @@ ifdef PTXCONF_APACHE2_DEFAULTCONFIG
@SERVERADMIN@, $(PTXCONF_APACHE2_SERVERADMIN) )
@$(call install_replace, apache2, $(PTXCONF_APACHE2_CONFIGDIR)/httpd.conf, \
@SERVERNAME@, $(PTXCONF_APACHE2_SERVERNAME) )
-else
-#
-# use users configuration instead
-#
-ifneq ($(PTXCONF_APACHE2_USER_CONFIG), "")
- @echo "installing user config file..."
- @$(call install_copy, apache2, 12, 102, 0644, \
- $(PTXCONF_APACHE2_USER_CONFIG), \
- $(PTXCONF_APACHE2_CONFIGDIR)/httpd.conf,n)
-endif
endif
endif
-#
+
+
+# ---------------------------
# create the log dir if enabled
#
ifneq ($(PTXCONF_APACHE2_LOGDIR),"")
@$(call install_copy, apache2, 12, 102, 0755, $(PTXCONF_APACHE2_LOGDIR))
endif
-#
-# create init script and link to launch at startup
+
+# ---------------------------
+# install startup script on demand
#
ifdef PTXCONF_ROOTFS_ETC_INITD_HTTPD
-ifneq ($(call remove_quotes,$(PTXCONF_ROOTFS_ETC_INITD_HTTPD_USER_FILE)),)
-# users own file without modifications
- @$(call install_copy, apache2, 0, 0, 0755, \
- $(PTXCONF_ROOTFS_ETC_INITD_HTTPD_USER_FILE), \
- /etc/init.d/httpd, n)
-else
+ifdef PTXCONF_ROOTFS_ETC_INITD_HTTPD_DEFAULT
# generic script with path modifications
@$(call install_copy, apache2, 0, 0, 0755, \
$(PTXDIST_TOPDIR)/generic/etc/init.d/httpd, \
/etc/init.d/httpd, n)
+endif
+ifdef PTXCONF_ROOTFS_ETC_INITD_HTTPD_USER
+# users one
+ @$(call install_copy, apache2, 0, 0, 0755, \
+ $(PTXDIST_WORKSPACE)/projectroot/etc/init.d/httpd, \
+ /etc/init.d/httpd, n)
+endif
+# replace some placeholders
@$(call install_replace, apache2, /etc/init.d/httpd, \
@APACHECONFIG@, $(PTXCONF_APACHE2_CONFIGDIR) )
@$(call install_replace, apache2, /etc/init.d/httpd, \
@LOGPATH@, $(PTXCONF_APACHE2_LOGDIR) )
-endif
# install link to launch automatically if enabled
ifneq ($(PTXCONF_ROOTFS_ETC_INITD_HTTPD_LINK),"")
@$(call install_link, apache2, ../init.d/httpd, \
diff --git a/rules/rootfs_init_d_files.in b/rules/rootfs_init_d_files.in
index 9abeb8544..1e5997f8f 100644
--- a/rules/rootfs_init_d_files.in
+++ b/rules/rootfs_init_d_files.in
@@ -215,44 +215,6 @@ menuconfig ROOTFS_ETC_INITD_BANNER
Type in here your favorite vendorname. It gets displayed
whenever your system starts.
-########################## Apache 2 ##########################################
-
-menuconfig ROOTFS_ETC_INITD_HTTPD
- depends on ROOTFS_ETC_INITD && APACHE2
- bool
- default y
- prompt "apache "
- help
- The /etc/init.d/httpd script lets you control the apache daemon.
-
- choice
- prompt "Kind of startup scrict"
- depends on ROOTFS_ETC_INITD_HTTPD
- default ROOTFS_ETC_INITD_HTTPD_DEFAULT
-
- config ROOTFS_ETC_INITD_HTTPD_DEFAULT
- bool
- prompt "Use default httpd"
- help
- A file from generic/etc/init.d/httpd will be used.
-
- config ROOTFS_ETC_INITD_HTTPD_USER
- bool
- prompt "Use your own httpd file"
- help
- Select this, then you can enter a path and filename to your
- own httpd startup script.
- endchoice
-
- config ROOTFS_ETC_INITD_HTTPD_USER_FILE
- depends on ROOTFS_ETC_INITD_HTTPD
- depends on ROOTFS_ETC_INITD_HTTPD_USER
- prompt "Path and name of your own httpd to be used"
- string
- default ""
- help
- Enter a path and filename to be used as httpd script on your target.
-
########################## crond ##########################################
# this is for busybox' crond only
#
diff --git a/rules/rootfs_rc_d_links.in b/rules/rootfs_rc_d_links.in
index 79e39dd00..9af242da3 100644
--- a/rules/rootfs_rc_d_links.in
+++ b/rules/rootfs_rc_d_links.in
@@ -85,7 +85,7 @@ config ROOTFS_ETC_INITD_THTTPD_LINK
config ROOTFS_ETC_INITD_HTTPD_LINK
depends on ROOTFS_ETC_INITD_HTTPD
string
- prompt "apache link name in /etc/rc.d"
+ prompt "apache link name"
default "S08_httpd"
help
Set a link into /etc/rc.d which points to /etc/init.d/httpd to