Просмотр исходного кода

Made the install more seemless.

Thomas Davis 12 лет назад
Родитель
Сommit
de99716bfc
4 измененных файлов с 64 добавлено и 3 удалено
  1. 6 2
      Makefile
  2. 3 1
      Makefile.osx
  3. 32 0
      resources/civetweb.conf
  4. 23 0
      resources/itworks.html

+ 6 - 2
Makefile

@@ -22,6 +22,7 @@ BINDIR = $(EXEC_PREFIX)/bin
 DATAROOTDIR = $(PREFIX)/share
 DOCDIR = $(DATAROOTDIR)/doc/$(CPROG)
 SYSCONFDIR = $(PREFIX)/etc
+DOCUMENTROOT = $(DOCDIR)
 
 BUILD_DIRS += $(BUILD_DIR) $(BUILD_DIR)/src
 
@@ -127,10 +128,13 @@ build: $(CPROG) $(CXXPROG)
 
 install: build
 ifeq ($(TARGET_OS),LINUX)
-	install -d "$(BINDIR)" "$(DOCDIR)" "$(SYSCONFDIR)"
+	install -d "$(BINDIR)" "$(DOCDIR)" "$(SYSCONFDIR)" "$(DOCUMENTROOT)"
 	install -m 755 $(CPROG) "$(BINDIR)/"
-	install -m 644 distribution/arch/$(CPROG).conf  "$(SYSCONFDIR)/"
+	install -m 644 resources/civetweb.conf  "$(SYSCONFDIR)/"
+	install -m 644 resources/itworks.html $(DOCUMENTROOT)/index.html
+	install -m 644 resources/civetweb_64x64.png $(DOCUMENTROOT)/
 	install -m 644 *.md "$(DOCDIR)"
+	@sed -i 's#^document_root.*$$#document_root $(DOCUMENTROOT)#' "$(SYSCONFDIR)/$(CPROG).conf"
 endif
 
 lib: lib$(CPROG).a

+ 3 - 1
Makefile.osx

@@ -27,9 +27,11 @@ package: build
 	install -d -m 755 $(CONTENTS_DIR) $(RESOURCES_DIR) $(OSXBIN_DIR)
 	install -m 644 resources/Info.plist $(CONTENTS_DIR)/
 	install -m 644 resources/civetweb_*.png resources/civetweb.icns $(RESOURCES_DIR)/
+	install -m 644 resources/itworks.html $(OSXBIN_DIR)/index.html
+	install -m 644 resources/civetweb_64x64.png $(OSXBIN_DIR)/
 	install -m 755 $(CPROG) $(OSXBIN_DIR)/$(PACKAGE)
 	ln -fs /Applications $(DMG_DIR)/
 	hdiutil create $(PACKAGE)-$(CIVETWEB_VERSION).dmg -volname "$(PACKAGE) $(CIVETWEB_VERSION)" -srcfolder $(DMG_DIR) -ov
-	@rm -rf $(DMG_DIR)
+#	@rm -rf $(DMG_DIR)
 
 .PHONY: package

+ 32 - 0
resources/civetweb.conf

@@ -0,0 +1,32 @@
+# Civetweb web server configuration file.
+# For detailed description of every option, visit
+# https://github.com/sunsetbrew/civetweb/blob/master/docs/UserManual.md
+# Lines starting with '#' and empty lines are ignored.
+# To make a change, remove leading '#', modify option's value,
+# save this file and then restart Civetweb.
+
+document_root .
+listening_ports 8080
+
+# cgi_pattern **.cgi$|**.pl$|**.php$
+# cgi_environment 
+# put_delete_auth_file 
+# cgi_interpreter 
+# protect_uri 
+# authentication_domain mydomain.com
+# ssi_pattern **.shtml$|**.shtm$
+# throttle 
+# access_log_file 
+# enable_directory_listing yes
+# error_log_file 
+# global_auth_file 
+# index_files index.html,index.htm,index.cgi,index.shtml,index.php,index.lp
+# enable_keep_alive no
+# access_control_list 
+# extra_mime_types 
+# ssl_certificate 
+# num_threads 50
+# run_as_user 
+# url_rewrite_patterns 
+# hide_files_patterns 
+# request_timeout_ms 30000

+ 23 - 0
resources/itworks.html

@@ -0,0 +1,23 @@
+<html>
+<head>
+<title>Civetweb: It Works!</title>
+</head>
+<body>
+<div style="float:right; width:100%; text-align:center;">
+</div>
+<div style="float:left; height:50%; margin-bottom:-200px;"></div>
+<div style="clear:both; height:400px; width:400px; margin: auto; position:relative;">
+<img src="civetweb_64x64.png" alt="logo"/>
+<p>
+<b style="font-size:larger"><a style="text-decoration:none" href="https://sourceforge.net/projects/civetweb/">Civetweb</a></b><br>
+<i>Your web server</i>
+<ul>
+<li><a href="https://github.com/sunsetbrew/civetweb/blob/master/docs/UserManual.md">User Manual</a></li>
+<li><a href="https://github.com/sunsetbrew/civetweb/blob/master/RELEASE_NOTES.md">Release Notes</a></li>
+<li><a href="https://sourceforge.net/projects/civetweb/">Downloads</a></li>
+<li><a href="https://github.com/sunsetbrew/civetweb">GitHub</a></li>
+</ul>
+</p>
+</div>
+</body>
+</html>