浏览代码

Added buildroot files, and install guide

Thomas Davis 12 年之前
父节点
当前提交
185060729e
共有 6 个文件被更改,包括 145 次插入6 次删除
  1. 7 4
      RELEASE_NOTES.md
  2. 34 0
      contrib/buildroot/Config.in
  3. 48 0
      contrib/buildroot/civetweb.mk
  4. 15 1
      docs/Building.md
  5. 32 0
      docs/Installing.md
  6. 9 1
      docs/UserManual.md

+ 7 - 4
RELEASE_NOTES.md

@@ -1,14 +1,12 @@
-### Some Windows users may be the install the 
-[Visual C++ Redistributable for Visual Studio 2012](http://www.microsoft.com/en-us/download/details.aspx?id=30679)
-
 Release Notes v1.2 
 ===
-### Objectives: *Instalation Improvements, buildroot, cross compile support*
+### Objectives: *Installation Improvements, buildroot, cross compile support*
 The objective of this release is to make installation seemless.
 
 Changes
 -------
 
+- Create an installation guide
 - Created both 32 and 64 bit windows installations
 - Added install for windows distribution
 - Added 64 bit build profiles for VS 2012.
@@ -19,6 +17,11 @@ Changes
 - Updated OS X Package
 - Improved install scheme with welcome web page
 
+Known Issues
+-----
+
+- The prebuilt Window's version requires [Visual C++ Redistributable for Visual Studio 2012](http://www.microsoft.com/en-us/download/details.aspx?id=30679)
+
 Release Notes v1.1 
 ===
 ### Objectives: *Build, Documentation, License Improvements*

+ 34 - 0
contrib/buildroot/Config.in

@@ -0,0 +1,34 @@
+config BR2_PACKAGE_CIVETWEB
+	bool "civetweb"
+	depends on BR2_TOOLCHAIN_BUILDROOT_UCLIBC && !BR2_PTHREADS_NONE
+	help
+	  Full featured embedded web server with LUA support.
+	  
+	  https://sourceforge.net/projects/civetweb
+
+if BR2_PACKAGE_CIVETWEB
+
+	config BR2_CIVETWEB_WITH_IPV6
+		bool "enable IPV6 support"
+		depends on BR2_INET_IPV6
+
+	config BR2_CIVETWEB_WITH_LUA
+		bool "enable LUA support"
+		depends on BR2_LARGEFILE # util-linux
+
+	config BR2_CIVETWEB_WITH_SSL
+		bool "enable SSL support"
+		depends on BR2_PACKAGE_OPENSSL
+
+	comment "civetweb IPV6 support requires IPV6"
+		depends on !BR2_INET_IPV6
+
+	comment "civetweb LUA support requires large file support"
+		depends on !BR2_LARGEFILE
+
+	comment "civetweb SSL support requires OpenSSL"
+		depends on !BR2_PACKAGE_OPENSSL
+endif
+
+comment "civetweb requires a toolchain with PTHREAD support"
+	depends on !BR2_TOOLCHAIN_BUILDROOT_UCLIBC || BR2_PTHREADS_NONE

+ 48 - 0
contrib/buildroot/civetweb.mk

@@ -0,0 +1,48 @@
+# 
+# Copyright (c) 2013 No Face Press, LLC
+# License http://opensource.org/licenses/mit-license.php MIT License
+#
+################################################################################
+#
+# civetweb
+#
+################################################################################
+
+CIVETWEB_VERSION = 1.2
+CIVETWEB_SOURCE = civetweb-$(CIVETWEB_VERSION).tar.gz
+CIVETWEB_SITE = http://github.com/sunsetbrew/civetweb/tarball/v$(CIVETWEB_VERSION)
+CIVETWEB_LICENSE = MIT
+CIVETWEB_LICENSE_FILES = LICENSE.md
+
+CIVETWEB_COPT = $(TARGET_CFLAGS)
+CIVETWEB_MOPT = TARGET_OS=LINUX
+CIVETWEB_LDFLAGS = $(TARGET_LDFLAGS)
+
+ifndef BR2_PACKAGE_UTIL_LINUX_FALLOCATE
+	CIVETWEB_COPT += -DHAVE_POSIX_FALLOCATE=0
+endif
+
+ifdef BR2_CIVETWEB_WITH_IPV6
+	CIVETWEB_MOPT += WITH_IPV6=1
+endif
+
+ifdef BR2_CIVETWEB_WITH_LUA
+	CIVETWEB_MOPT += WITH_LUA=1
+endif
+
+ifdef BR2_CIVETWEB_WITH_SSL
+	CIVETWEB_COPT += -DNO_SSL_DL -lcrypt -lssl
+	CIVETWEB_DEPENDENCIES += openssl
+else
+	CIVETWEB_COPT += -DNO_SSL
+endif
+
+define CIVETWEB_BUILD_CMDS
+	$(MAKE) CC="$(TARGET_CC)" -C $(@D) all $(CIVETWEB_MOPT) COPT="$(CIVETWEB_COPT)"
+endef
+
+define CIVETWEB_INSTALL_TARGET_CMDS
+	$(MAKE) CC="$(TARGET_CC)" -C $(@D) install DOCUMENT_ROOT=/usr/local/share/doc/civetweb PREFIX="$(TARGET_DIR)/usr/local" $(CIVETWEB_MOPT) COPT='$(CIVETWEB_COPT)'
+endef
+
+$(eval $(generic-package))

+ 15 - 1
docs/Building.md

@@ -102,7 +102,6 @@ TARGET_OS values should be be one found in *resources/Makefile.in-os*.
 make CC=arm-none-linux-gnueabi-gcc COPT="-march=armv7-a  -mfpu=vfp -mfloat-abi=softfp" TARGET_OS=FROG
 ```
 
-
 ## Cocoa DMG Packaging (OSX Only)
 
 Use the alternate *Makefile.osx* to do the build.  The entire build has
@@ -114,6 +113,21 @@ one additional *package* rule.
 make -f Makefile.osx package
 ```
 
+Building with Buildroot
+---------
+
+[Buildroot](http://buildroot.uclibc.org/) is a tool for creating cross compiled file systems.  Including Civetweb in buildroot is fairly easy.  There is even support for various build options.
+
+1. First, check if it already there.
+  - In buildroot, make menuconfig
+     - Package Selection for the target --->
+     - Networking applications  --->
+     - civetweb
+2. If not there, just add it
+  - copy *Config.in* and *civetweb.mk* from Civetweb's *contrib/buildroot/* to Buildroot's *package/civetweb/* directory.
+  - In Buildroot's *package/Config.in, insert the following line in were you will know how to find it in the menu.
+    > ``` source "package/civetweb/Config.in" ```
+
 
 Building on Android
 ---------

+ 32 - 0
docs/Installing.md

@@ -0,0 +1,32 @@
+Civetweb Install Guide
+====
+
+This guide covers the binary distributions for CivetWeb.  Please refer to the 
+
+Windows
+---
+
+1. Install the [Visual C++ Redistributable for Visual Studio 2012](http://www.microsoft.com/en-us/download/details.aspx?id=30679)
+2. Download latest *civetweb64_setup.msi* (64 bit) or *civetweb32_setup.msi* (32 bit) from [SourceForge](https://sourceforge.net/projects/civetweb/files/)
+3. Run the installation program.
+4. Civetweb will be in the programs menu.
+5. When started, Civetweb puts itself into the tray.
+
+OS X
+---
+
+1. Download the latest *Civetweb.dmg* from [SourceForge](https://sourceforge.net/projects/civetweb/files/)
+2. Click on the it and look for the attachment in the finder.
+4. Drag Civetweb to the Applications folder.
+5. When started, Civetweb puts itself into top menu.
+
+Linux
+---
+
+1. Download the latest *civetweb.tar.gz* from [SourceForge](https://sourceforge.net/projects/civetweb/files/)
+2. Open arachive and change to the new directory.
+3. make
+4. make install
+5. Run the program ```/usr/local/bin/civetweb```, it will use the configuration file */usr/local/etc/civetweb.conf*.
+
+

+ 9 - 1
docs/UserManual.md

@@ -1,8 +1,16 @@
-# Overview
+
+Overview
+=====
 
 Civetweb is small and easy to use web server. It is self-contained, and does
 not require any external software to run.
 
+Installatation
+----
+
+### Some Windows users may be the install the 
+[Visual C++ Redistributable for Visual Studio 2012](http://www.microsoft.com/en-us/download/details.aspx?id=30679)
+
 On Windows, civetweb iconifies itself to the system tray icon when started.
 Right-click on the icon pops up a menu, where it is possible to stop
 civetweb, or configure it, or install it as Windows service. The easiest way