Patchwork [12/12] orbit: New package

login
register
mail settings
Submitter Assaf Inbal
Date May 20, 2013, 12:56 p.m.
Message ID <1369054604-26139-12-git-send-email-shmuelzon@gmail.com>
Download mbox | patch
Permalink /patch/245032/
State Accepted
Headers show

Comments

Assaf Inbal - May 20, 2013, 12:56 p.m.
An MVC web framework for Lua

Signed-off-by: Assaf Inbal <shmuelzon@gmail.com>
---
 package/Config.in       |  1 +
 package/orbit/Config.in | 10 ++++++++++
 package/orbit/orbit.mk  | 26 ++++++++++++++++++++++++++
 3 files changed, 37 insertions(+)
 create mode 100644 package/orbit/Config.in
 create mode 100644 package/orbit/orbit.mk
Thomas Petazzoni - Aug. 13, 2013, 9:53 a.m.
Dear Assaf Inbal,

On Mon, 20 May 2013 15:56:44 +0300, Assaf Inbal wrote:
> An MVC web framework for Lua
> 
> Signed-off-by: Assaf Inbal <shmuelzon@gmail.com>

I've applied your patch to the next branch, thanks!

I've done a few changes:

 * Instead of doing the installation manually, I added a patch to fix
   the Makefile so that the Buildroot .mk file can simply use "make
   install"

 * Remove the wsapi build-time dependency, since there is apparently no
   build-time dependency for orbit (it's just some Lua code that gets
   copied to the target)

 * Remove the 'rings' run-time dependency since I couldn't find an
   indication that it was needed for Orbit.

Also, I've noticed that Orbit appears to use Xavante, though you
haven't selected it. I wasn't sure on this one, so I left as it was,
but it'd be good to check this.

Thomas
Assaf Inbal - Aug. 13, 2013, 10:16 a.m.
Hey Thomas,

Thanks for taking the time to do this.

 * Remove the wsapi build-time dependency, since there is apparently no
>    build-time dependency for orbit (it's just some Lua code that gets
>    copied to the target)
>
Yes, you are correct.

>  * Remove the 'rings' run-time dependency since I couldn't find an
>    indication that it was needed for Orbit.
>
You're right again, it's actually WSAPI that needs Rings and Orbit needs
WSAPI.

> Also, I've noticed that Orbit appears to use Xavante, though you
> haven't selected it. I wasn't sure on this one, so I left as it was,
> but it'd be good to check this.
>
As far as I understand it (though I never actually tried a different web
server), WSAPI provides an abstraction layer on top of a web server, and
Orbit uses that abstraction. So, there shouldn't be any dependency on
Xavante directly, just a web server that WSAPI supports. But, WSAPI should
be the one to enforce this.
 Good day,
Assaf

Patch

diff --git a/package/Config.in b/package/Config.in
index 17fa1e7..5e18e8f 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -320,6 +320,7 @@  source "package/luasocket/Config.in"
 source "package/luasql/Config.in"
 source "package/lua-ev/Config.in"
 source "package/lua-msgpack-native/Config.in"
+source "package/orbit/Config.in"
 source "package/rings/Config.in"
 source "package/wsapi/Config.in"
 source "package/xavante/Config.in"
diff --git a/package/orbit/Config.in b/package/orbit/Config.in
new file mode 100644
index 0000000..959481f
--- /dev/null
+++ b/package/orbit/Config.in
@@ -0,0 +1,10 @@ 
+config BR2_PACKAGE_ORBIT
+	bool "orbit"
+	select BR2_PACKAGE_WSAPI
+	select BR2_PACKAGE_LUAFILESYSTEM
+	select BR2_PACKAGE_RINGS
+	help
+	  An MVC web framework for Lua. The design is inspired by lightweight
+	  Ruby frameworks such as Camping
+
+	  http://keplerproject.github.com/orbit
diff --git a/package/orbit/orbit.mk b/package/orbit/orbit.mk
new file mode 100644
index 0000000..8eff332
--- /dev/null
+++ b/package/orbit/orbit.mk
@@ -0,0 +1,26 @@ 
+#############################################################
+#
+# orbit
+#
+#############################################################
+
+ORBIT_VERSION = 2.2.0
+ORBIT_SITE = http://github.com/downloads/keplerproject/orbit
+ORBIT_LICENSE = MIT
+ORBIT_LICENSE_FILES = COPYRIGHT
+ORBIT_DEPENDENCIES = wsapi
+
+define ORBIT_INSTALL_TARGET_CMDS
+	$(INSTALL) -m 0644 -D $(@D)/src/orbit.lua \
+		$(TARGET_DIR)/usr/share/lua
+	mkdir $(TARGET_DIR)/usr/share/lua/orbit
+	$(INSTALL) -m 0644 -D $(@D)/src/orbit/*.lua \
+		$(TARGET_DIR)/usr/share/lua/orbit
+endef
+
+define ORBIT_UNINSTALL_TARGET_CMDS
+	rm -rf "$(TARGET_DIR)/usr/share/lua/orbit"
+	rm -rf "$(TARGET_DIR)/usr/share/lua/orbit.lua"
+endef
+
+$(eval $(generic-package))