From patchwork Tue Aug 27 23:26:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Davis X-Patchwork-Id: 270297 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 61DD82C00A4 for ; Wed, 28 Aug 2013 09:34:48 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 1FBAD31C9F; Tue, 27 Aug 2013 23:34:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wVipnvv2TRZs; Tue, 27 Aug 2013 23:34:37 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id DD8D126F6E; Tue, 27 Aug 2013 23:34:36 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id B983B1BFA19 for ; Tue, 27 Aug 2013 23:34:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id A939789FAD for ; Tue, 27 Aug 2013 23:34:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QqYPU8f-J28n for ; Tue, 27 Aug 2013 23:34:41 +0000 (UTC) X-Greylist: delayed 00:07:41 by SQLgrey-1.7.6 Received: from mail-qa0-f46.google.com (mail-qa0-f46.google.com [209.85.216.46]) by whitealder.osuosl.org (Postfix) with ESMTPS id A216B89DC5 for ; Tue, 27 Aug 2013 23:34:41 +0000 (UTC) Received: by mail-qa0-f46.google.com with SMTP id i13so1685946qae.19 for ; Tue, 27 Aug 2013 16:34:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=lecq3f5ib9UkMLjjGjMDZqhAC4OAqzt7mRJXjb7Var0=; b=Fin06hkcBOWtpXEIdcuj/8PEWRdSDVeJtP7xvFb96gTbIVeevvsp6ABhDNU9b3MLhA 1K57RkVOolWgnFZujTw0cfGNHppcGyu6H0IqQg/7L7Eh9Ye406qeueNOOY1g0RDx+CUw vfVsn+RDIfNACC1hf2NDiUx5tqxFHeKF7oQuOO2PVxRCvaTab3AqXNHBWA76I1hVzb+z cZtI226phJmBLTSuMlAX+LmfSbFG8ORWpfNApQ+pWfRE/hQLPIV8xxPBF9RzRmEx0x4R fbTBCimE+vE/BgRG5WPNK8/cds1Sww4FWEHpppEILphEQp6+/hNQMtTn3P9h9HCNP9v8 9aTw== X-Gm-Message-State: ALoCoQlhWCbzEAC2NjVGfqE/T8nb/YBKh/hOMbMkaVGsqbjh0TDGBbIidsJeYC8272+/n7GmvBEh X-Received: by 10.49.47.113 with SMTP id c17mr4652723qen.90.1377646023045; Tue, 27 Aug 2013 16:27:03 -0700 (PDT) Received: from Thomass-MacBook-Air.local.com (cpe-065-190-093-086.nc.res.rr.com. [65.190.93.86]) by mx.google.com with ESMTPSA id w8sm31153079qej.3.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 27 Aug 2013 16:27:02 -0700 (PDT) From: Thomas Davis To: buildroot@busybox.net Date: Tue, 27 Aug 2013 19:26:03 -0400 Message-Id: <1377645963-1953-2-git-send-email-sunsetbrew@sunsetbrew.com> X-Mailer: git-send-email 1.7.12.4 (Apple Git-37) In-Reply-To: <1377645963-1953-1-git-send-email-sunsetbrew@sunsetbrew.com> References: <1377645963-1953-1-git-send-email-sunsetbrew@sunsetbrew.com> Cc: Thomas Davis Subject: [Buildroot] [PATCHv3 1/1] civetweb: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Signed-off-by: Thomas Davis --- package/Config.in | 1 + package/civetweb/Config.in | 26 ++++++++++++++++++++ package/civetweb/civetweb.mk | 53 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+), 0 deletions(-) create mode 100644 package/civetweb/Config.in create mode 100644 package/civetweb/civetweb.mk diff --git a/package/Config.in b/package/Config.in index 7069d77..25433b6 100644 --- a/package/Config.in +++ b/package/Config.in @@ -719,6 +719,7 @@ source "package/bridge-utils/Config.in" source "package/bwm-ng/Config.in" source "package/can-utils/Config.in" source "package/chrony/Config.in" +source "package/civetweb/Config.in" source "package/connman/Config.in" source "package/crda/Config.in" source "package/ctorrent/Config.in" diff --git a/package/civetweb/Config.in b/package/civetweb/Config.in new file mode 100644 index 0000000..8ca587b --- /dev/null +++ b/package/civetweb/Config.in @@ -0,0 +1,26 @@ +config BR2_PACKAGE_CIVETWEB + bool "civetweb" + depends on BR2_TOOLCHAIN_HAS_THREADS + help + Full featured embedded web server with LUA support. + + https://sourceforge.net/projects/civetweb + +if BR2_PACKAGE_CIVETWEB + +config BR2_CIVETWEB_WITH_LUA + bool "enable LUA support" + # required by the bundled sqlite and lua code + depends on BR2_LARGEFILE + help + Enable Lua support in Civetweb. Note that this will use a + version of Lua and Sqlite bundled within the Civetweb + sources, and not the packages from Buildroot. + +comment "lua support requires largefile support in toolchain" + depends on !BR2_LARGEFILE + +endif + +comment "civetweb requires a toolchain with PTHREAD support" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/civetweb/civetweb.mk b/package/civetweb/civetweb.mk new file mode 100644 index 0000000..17b02fb --- /dev/null +++ b/package/civetweb/civetweb.mk @@ -0,0 +1,53 @@ +################################################################################ +# +# civetweb +# +################################################################################ + +CIVETWEB_VERSION = 1.3 +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) -DHAVE_POSIX_FALLOCATE=0 +CIVETWEB_CONF_OPT = TARGET_OS=LINUX +CIVETWEB_LDFLAGS = $(TARGET_LDFLAGS) +CIVETWEB_HTMLDIR = /var/www + +ifneq ($(BR2_LARGEFILE),y) + CIVETWEB_COPT += -DSQLITE_DISABLE_LFS +endif + +ifeq ($(BR2_INET_IPV6),y) + CIVETWEB_CONF_OPT += WITH_IPV6=1 +endif + +ifeq ($(BR2_CIVETWEB_WITH_LUA),y) + CIVETWEB_CONF_OPT += WITH_LUA=1 +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) + 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) build \ + $(CIVETWEB_CONF_OPT) \ + COPT="$(CIVETWEB_COPT)" +endef + +define CIVETWEB_INSTALL_TARGET_CMDS + $(MAKE) CC="$(TARGET_CC)" -C $(@D) install \ + DOCUMENT_ROOT="$(CIVETWEB_HTMLDIR)" \ + HTMLDIR="$(TARGET_DIR)$(CIVETWEB_HTMLDIR)" \ + PREFIX="$(TARGET_DIR)/usr/local" \ + $(CIVETWEB_CONF_OPT) \ + COPT='$(CIVETWEB_COPT)' +endef + +$(eval $(generic-package)) +