From patchwork Mon Jun 29 09:02:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Corjon X-Patchwork-Id: 489266 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 40F8B14076E for ; Mon, 29 Jun 2015 19:02:55 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 6E2678BD1B; Mon, 29 Jun 2015 09:02:54 +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 FUGWHd2A7dEW; Mon, 29 Jun 2015 09:02:51 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id B9D918BCE7; Mon, 29 Jun 2015 09:02:51 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 62E0D1C20F2 for ; Mon, 29 Jun 2015 09:02:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 5ED6A322E7 for ; Mon, 29 Jun 2015 09:02:50 +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 PdHYsKCmNCbH for ; Mon, 29 Jun 2015 09:02:48 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp-out-3.pacwan.net (smtp-out-3.pacwan.net [195.200.166.133]) by silver.osuosl.org (Postfix) with ESMTP id 175B8320F9 for ; Mon, 29 Jun 2015 09:02:48 +0000 (UTC) Received: from mail.sinters.fr (unknown [195.200.174.161]) by smtp-out-3.pacwan.net (Postfix) with ESMTP id 241C32B7F5F for ; Mon, 29 Jun 2015 11:02:45 +0200 (CEST) Received: from MAIL-SINTERS-01.sinters-int.fr ([fe80::7dc5:feb4:84da:82b]) by MAIL-SINTERS-01.sinters-int.fr ([fe80::7dc5:feb4:84da:82b%10]) with mapi id 14.03.0210.002; Mon, 29 Jun 2015 11:02:43 +0200 From: Julien CORJON To: "buildroot@buildroot.org" Thread-Topic: [PATCH v2] monkey: new package Thread-Index: AQHQskpbGpOez1w9AUSmD7XPkn1RXw== Date: Mon, 29 Jun 2015 09:02:43 +0000 Message-ID: <570c4a99-dc8a-4605-9c7e-0f08da3ae412@MAIL-SINTERS-01.sinters-int.fr> Accept-Language: fr-FR, en-US Content-Language: fr-FR X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.31.250] MIME-Version: 1.0 Cc: Morgan DELESTRE , software Subject: [Buildroot] [PATCH v2] monkey: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Morgan Delestre Monkey is a small, fast and lightweight open source Web Server for GNU/Linux. It has been designed with focus in embedded devices, therefore its scalable by nature having a low memory and CPU consumption and an excellent performance. Signed-off-by: Julien Corjon --- Changes v1 -> v2: - Fix typo (suggested by Alexandre) - Change autotools for generic-package (suggested by Thomas) - Add hash file - Add licence - Add uClib & musl support - Add shared library option package/Config.in | 1 + package/monkey/Config.in | 19 ++++++++ package/monkey/monkey.hash | 3 ++ package/monkey/monkey.mk | 109 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 132 insertions(+) create mode 100644 package/monkey/Config.in create mode 100644 package/monkey/monkey.hash create mode 100644 package/monkey/monkey.mk diff --git a/package/Config.in b/package/Config.in index c2f6524..477cc47 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1226,6 +1226,7 @@ endif source "package/modem-manager/Config.in" source "package/mongoose/Config.in" source "package/mongrel2/Config.in" + source "package/monkey/Config.in" source "package/mosquitto/Config.in" source "package/mrouted/Config.in" source "package/mtr/Config.in" diff --git a/package/monkey/Config.in b/package/monkey/Config.in new file mode 100644 index 0000000..5be2284 --- /dev/null +++ b/package/monkey/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_MONKEY + bool "monkey" + depends on BR2_TOOLCHAIN_HAS_THREADS + help + Monkey Server is a fast and lightweight web server for Linux platforms. + + http://monkey-project.com/ + +if BR2_PACKAGE_MONKEY + +config BR2_PACKAGE_MONKEY_SHARED + bool "shared library in addition to stand-alone server" + help + Build Monkey as a shared library in addition to stand-alone server + +endif + +comment "monkey needs an toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/monkey/monkey.hash b/package/monkey/monkey.hash new file mode 100644 index 0000000..6c7eada --- /dev/null +++ b/package/monkey/monkey.hash @@ -0,0 +1,3 @@ +# md5 from http://monkey-project.com/releases/1.5/monkey-1.5.6.tar.gz.md5, sha256 locally computed: +md5 9699e4c9ea6ce6b989907c252ae80254 monkey-1.5.6.tar.gz +sha256 7c3d845306aa74ee6effd7ab6169d16ac4e6450e564954d0d0baa2d1e9be1a22 monkey-1.5.6.tar.gz diff --git a/package/monkey/monkey.mk b/package/monkey/monkey.mk new file mode 100644 index 0000000..b73d0bb --- /dev/null +++ b/package/monkey/monkey.mk @@ -0,0 +1,109 @@ +################################################################################ +# +# monkey +# +################################################################################ +MONKEY_VERSION_MAJOR = 1.5 +MONKEY_VERSION = $(MONKEY_VERSION_MAJOR).6 +MONKEY_SOURCE = monkey-$(MONKEY_VERSION).tar.gz +MONKEY_SITE = http://monkey-project.com/releases/$(MONKEY_VERSION_MAJOR)/ +MONKEY_LICENCE = Apache-2.0 +MONKEY_LICENCE_FILE = LICENSE + +MONKEY_SYSCONF_DIR = /etc/monkey +MONKEY_DATA_DIR = /usr/local/monkey +MONKEY_LOG_DIR = /var/log +MONKEY_PLUGIN_DIR = /usr/lib/monkey + +MONKEY_CONF_OPTS = \ + --prefix=/usr \ + --sysconfdir=$(MONKEY_SYSCONF_DIR) \ + --datadir=$(MONKEY_DATA_DIR) \ + --mandir=/usr/share/man \ + --logdir=$(MONKEY_LOG_DIR) \ + --pidfile=/var/run \ + --plugdir=$(MONKEY_PLUGIN_DIR) + +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) +MONLEY_CONF_OPTS += --uclib-mode +endif + +ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y) +MONKEY_CONF_OPTS += --musl-mode +endif + +ifeq ($(BR2_PACKAGE_MONKEY_SHARED),y) +MONKEY_CONF_OPTS += --enable-shared +MONKEY_INSTALL_STAGING = YES +endif + +ifeq ($(BR2_ENABLE_DEBUG),y) +MONKEY_CONF_OPT += --debug +endif + +define MONKEY_CONFIGURE_CMDS + (cd $(@D); ./configure $(MONKEY_CONF_OPTS)) +endef + +define MONKEY_BUILD_CMDS + $(MAKE) -C $(@D) +endef + +define MONKEY_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install +endef + +define MONKEY_INSTALL_TARGET_BIN + $(INSTALL) -d $(TARGET_DIR)/usr/bin + $(INSTALL) -m 755 $(@D)/bin/* $(TARGET_DIR)/usr/bin/ +endef + +define MONKEY_INSTALL_TARGET_LIBRARY + $(INSTALL) -m 644 $(@D)/src/libmonkey.so.$(MONKEY_VERSION_MAJOR) $(TARGET_DIR)/usr/lib + -ln -sf libmonkey.$(MONKEY_VERSION_MAJOR) $(TARGET_DIR)/usr/lib/libmonkey.so +endef + +define MONKEY_INSTALL_TARGET_CONFIGURATION + $(INSTALL) -d $(TARGET_DIR)$(MONKEY_SYSCONF_DIR) + $(INSTALL) -d $(TARGET_DIR)${MONKEY_SYSCONF_DIR}/plugins + $(INSTALL) -d $(TARGET_DIR)${MONKEY_SYSCONF_DIR}/sites + $(INSTALL) -m 644 $(@D)/conf/*.* $(TARGET_DIR)$(MONKEY_SYSCONF_DIR) + cp -r $(@D)/conf/plugins/* $(TARGET_DIR)${MONKEY_SYSCONF_DIR}/plugins/ +endef + +define MONKEY_INSTALL_TARGET_PLUGINS + $(INSTALL) -d $(TARGET_DIR)${MONKEY_PLUGIN_DIR} + $(INSTALL) -m 644 $(@D)/plugins/*/*.so $(TARGET_DIR)${MONKEY_PLUGIN_DIR}/ +endef + +define MONKEY_INSTALL_TARGET_DATA + $(INSTALL) -d $(TARGET_DIR)${MONKEY_DATA_DIR} + $(INSTALL) -d $(TARGET_DIR)$(MONKEY_DATA_DIR)/imgs + $(INSTALL) -d $(TARGET_DIR)$(MONKEY_DATA_DIR)/css + $(INSTALL) -m 644 $(@D)/htdocs/index.html $(TARGET_DIR)$(MONKEY_DATA_DIR) + $(INSTALL) -m 644 $(@D)/htdocs/404.html $(TARGET_DIR)$(MONKEY_DATA_DIR) + $(INSTALL) -m 644 $(@D)/htdocs/favicon.ico $(TARGET_DIR)$(MONKEY_DATA_DIR) + $(INSTALL) -m 644 $(@D)/htdocs/imgs/monkey_logo.png $(TARGET_DIR)$(MONKEY_DATA_DIR)/imgs + $(INSTALL) -m 644 $(@D)/htdocs/imgs/info_pic.jpg $(TARGET_DIR)$(MONKEY_DATA_DIR)/imgs + $(INSTALL) -m 644 $(@D)/htdocs/css/bootstrap.min.css $(TARGET_DIR)$(MONKEY_DATA_DIR)/css + $(INSTALL) -d $(TARGET_DIR)${MONKEY_LOG_DIR} +endef + +ifeq ($(BR2_PACKAGE_MONKEY_SHARED),y) +define MONKEY_INSTALL_TARGET_CMDS + $(MONKEY_INSTALL_TARGET_BIN) + $(MONKEY_INSTALL_TARGET_LIBRARY) + $(MONKEY_INSTALL_TARGET_CONFIGURATION) + $(MONKEY_INSTALL_TARGET_PLUGINS) + $(MONKEY_INSTALL_TARGET_DATA) +endef +else +define MONKEY_INSTALL_TARGET_CMDS + $(MONKEY_INSTALL_TARGET_BIN) + $(MONKEY_INSTALL_TARGET_CONFIGURATION) + $(MONKEY_INSTALL_TARGET_PLUGINS) + $(MONKEY_INSTALL_TARGET_DATA) +endef +endif + +$(eval $(generic-package))