diff options
author | imil <imil@pkgsrc.org> | 2012-08-12 16:13:02 +0000 |
---|---|---|
committer | imil <imil@pkgsrc.org> | 2012-08-12 16:13:02 +0000 |
commit | 59127142c2ad628d659bbdbe18c7af16cead2e1f (patch) | |
tree | b4fc3e1fe1776e6136153706967ca2e0c39cf090 /net | |
parent | 04cce8a836043e55f5854bbf93f4c9fbeca1dac4 (diff) | |
download | pkgsrc-59127142c2ad628d659bbdbe18c7af16cead2e1f.tar.gz |
Initial import of ruby-stompserver, version 0.9.9, into the NetBSD Packages
Collection.
Stompserver handles basic message queue processing.
It is Stomp messaging server with file/dbm/memory/activerecord based FIFO
queues, queue monitoring, and basic authentication.
Diffstat (limited to 'net')
-rw-r--r-- | net/ruby-stompserver/DESCR | 4 | ||||
-rw-r--r-- | net/ruby-stompserver/MESSAGE | 9 | ||||
-rw-r--r-- | net/ruby-stompserver/Makefile | 85 | ||||
-rw-r--r-- | net/ruby-stompserver/PLIST | 40 | ||||
-rw-r--r-- | net/ruby-stompserver/distinfo | 8 | ||||
-rwxr-xr-x | net/ruby-stompserver/files/stompserver.sh | 19 | ||||
-rw-r--r-- | net/ruby-stompserver/patches/patch-config_stompserver.conf | 28 | ||||
-rw-r--r-- | net/ruby-stompserver/patches/patch-gemspec | 16 | ||||
-rw-r--r-- | net/ruby-stompserver/patches/patch-lib_stomp__server.rb | 15 |
9 files changed, 224 insertions, 0 deletions
diff --git a/net/ruby-stompserver/DESCR b/net/ruby-stompserver/DESCR new file mode 100644 index 00000000000..29fe11bf0b1 --- /dev/null +++ b/net/ruby-stompserver/DESCR @@ -0,0 +1,4 @@ +Stompserver handles basic message queue processing. + +It is Stomp messaging server with file/dbm/memory/activerecord based FIFO +queues, queue monitoring, and basic authentication. diff --git a/net/ruby-stompserver/MESSAGE b/net/ruby-stompserver/MESSAGE new file mode 100644 index 00000000000..13e1fa28fbe --- /dev/null +++ b/net/ruby-stompserver/MESSAGE @@ -0,0 +1,9 @@ +=========================================================================== +$NetBSD: MESSAGE,v 1.1 2012/08/12 16:13:02 imil Exp $ + +stompserver is not capable of handling absolute paths from its +configuration file. By default, everything is installed in +${STOMPSERVER_WRKDIR}. +Feel free to modify this variable using your mk.conf file. + +=========================================================================== diff --git a/net/ruby-stompserver/Makefile b/net/ruby-stompserver/Makefile new file mode 100644 index 00000000000..c2b48824df1 --- /dev/null +++ b/net/ruby-stompserver/Makefile @@ -0,0 +1,85 @@ +# $NetBSD: Makefile,v 1.1 2012/08/12 16:13:02 imil Exp $ + +DISTNAME= stompserver-0.9.9 +CATEGORIES= net + +MAINTAINER= imil@NetBSD.org +HOMEPAGE= http://stompserver.rubyforge.org/ +COMMENT= Stomp messaging server +LICENSE= mit + +DEPENDS+= ${RUBY_PKGPREFIX}-eventmachine>=0.12.10:../../devel/ruby-eventmachine +DEPENDS+= ${RUBY_PKGPREFIX}-hoe>=3.0.6:../../devel/hoe +DEPENDS+= ${RUBY_PKGPREFIX}-daemons>=1.1.8:../../misc/ruby-daemons + +.include "../../mk/bsd.prefs.mk" + +BUILD_DEFS+= VARBASE STOMPSERVER_WRKDIR + +STOMPSERVER_WRKDIR?= ${VARBASE}/lib/stompserver +# It seems everything in this software is relative to "working_dir" +STOMPSERVER_LOGDIR?= log +STOMPSERVER_PIDDIR?= pid +STOMPSERVER_PIDFILE?= ${STOMPSERVER_PIDDIR}/stompserver.pid +STOMPSERVER_CFGDIR?= etc +STOMPSERVER_STORAGE?= storage +STOMPSERVER_USER?= stompserver +STOMPSERVER_GROUP?= stompserver + +PKG_USERS_VARS+= STOMPSERVER_USER +PKG_GROUPS_VARS+= STOMPSERVER_GROUP + +PKG_USERS= ${STOMPSERVER_USER}:${STOMPSERVER_GROUP} +PKG_GROUPS= ${STOMPSERVER_GROUP} +PKG_GECOS.${STOMPSERVER_USER}=stompserver server user +PKG_HOME.${STOMPSERVER_USER}=${STOMPSERVER_WRKDIR} +PKG_SHELL.${STOMPSERVER_USER}=${NOLOGIN} + +EGDIR= ${DESTDIR}${PREFIX}/share/examples/stompserver + +ST_ROOT= ${STOMPSERVER_WRKDIR} + +CONF_FILES+= ${PREFIX}/share/examples/stompserver/stompserver.conf \ + ${ST_ROOT}/${STOMPSERVER_CFGDIR}/stompserver.conf + +RCD_SCRIPTS= stompserver + +INSTALLATION_DIRS= bin share/examples/stompserver + +OWN_DIRS+= ${STOMPSERVER_WRKDIR} \ + ${ST_ROOT}/${STOMPSERVER_LOGDIR} \ + ${ST_ROOT}/${STOMPSERVER_STORAGE} \ + ${ST_ROOT}/${STOMPSERVER_PIDDIR} \ + ${ST_ROOT}/${STOMPSERVER_CFGDIR} +OWN_DIRS_PERMS+= ${STOMPSERVER_WRKDIR} \ + ${STOMPSERVER_USER} ${STOMPSERVER_GROUP} 0755 +OWN_DIRS_PERMS+= ${ST_ROOT}/${STOMPSERVER_LOGDIR} \ + ${STOMPSERVER_USER} ${STOMPSERVER_GROUP} 0755 +OWN_DIRS_PERMS+= ${ST_ROOT}/${STOMPSERVER_STORAGE} \ + ${STOMPSERVER_USER} ${STOMPSERVER_GROUP} 0700 +OWN_DIRS_PERMS+= ${ST_ROOT}/${STOMPSERVER_PIDDIR} \ + ${STOMPSERVER_USER} ${STOMPSERVER_GROUP} 0755 +OWN_DIRS_PERMS+= ${ST_ROOT}/${STOMPSERVER_CFGDIR} \ + ${STOMPSERVER_USER} ${STOMPSERVER_GROUP} 0700 + +SUBST_CLASSES+= cfg +SUBST_STAGE.cfg= post-patch +SUBST_FILES.cfg= config/stompserver.conf +SUBST_SED.cfg= -e 's,@STOMPSERVER_WRKDIR@,${STOMPSERVER_WRKDIR},g' +SUBST_SED.cfg+= -e 's,@STOMPSERVER_LOGDIR@,${STOMPSERVER_LOGDIR},g' +SUBST_SED.cfg+= -e 's,@STOMPSERVER_PIDFILE@,${STOMPSERVER_PIDFILE},g' +SUBST_SED.cfg+= -e 's,@STOMPSERVER_CFGDIR@,${STOMPSERVER_CFGDIR},g' +SUBST_SED.cfg+= -e 's,@STOMPSERVER_STORAGE@,${STOMPSERVER_STORAGE},g' +SUBST_SED.cfg+= -e 's,@STOMPSERVER_USER@,${STOMPSERVER_USER},g' +SUBST_SED.cfg+= -e 's,@STOMPSERVER_GROUP@,${STOMPSERVER_GROUP},g' + +FILES_SUBST+= STOMPSERVER_RCD_CFG=${ST_ROOT}/${STOMPSERVER_CFGDIR} +FILES_SUBST+= STOMPSERVER_RCD_PID=${ST_ROOT}/${STOMPSERVER_PIDFILE} + +MESSAGE_SUBST+= STOMPSERVER_WRKDIR=${STOMPSERVER_WRKDIR} + +post-install: + ${INSTALL_DATA} ${WRKSRC}/config/stompserver.conf ${EGDIR} + +.include "../../lang/ruby/gem.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/net/ruby-stompserver/PLIST b/net/ruby-stompserver/PLIST new file mode 100644 index 00000000000..028a279c49f --- /dev/null +++ b/net/ruby-stompserver/PLIST @@ -0,0 +1,40 @@ +@comment $NetBSD: PLIST,v 1.1 2012/08/12 16:13:02 imil Exp $ +bin/stompserver +${GEM_HOME}/cache/${GEM_NAME}.gem +${GEM_LIBDIR}/History.txt +${GEM_LIBDIR}/Manifest.txt +${GEM_LIBDIR}/README.txt +${GEM_LIBDIR}/Rakefile +${GEM_LIBDIR}/STATUS +${GEM_LIBDIR}/bin/stompserver +${GEM_LIBDIR}/client/README.txt +${GEM_LIBDIR}/client/both.rb +${GEM_LIBDIR}/client/consume.rb +${GEM_LIBDIR}/client/send.rb +${GEM_LIBDIR}/config/stompserver.conf +${GEM_LIBDIR}/etc/passwd.example +${GEM_LIBDIR}/lib/stomp_server.rb +${GEM_LIBDIR}/lib/stomp_server/protocols/http.rb +${GEM_LIBDIR}/lib/stomp_server/protocols/stomp.rb +${GEM_LIBDIR}/lib/stomp_server/queue.rb +${GEM_LIBDIR}/lib/stomp_server/queue/activerecord_queue.rb +${GEM_LIBDIR}/lib/stomp_server/queue/ar_message.rb +${GEM_LIBDIR}/lib/stomp_server/queue/dbm_queue.rb +${GEM_LIBDIR}/lib/stomp_server/queue/file_queue.rb +${GEM_LIBDIR}/lib/stomp_server/queue/memory_queue.rb +${GEM_LIBDIR}/lib/stomp_server/queue_manager.rb +${GEM_LIBDIR}/lib/stomp_server/stomp_auth.rb +${GEM_LIBDIR}/lib/stomp_server/stomp_frame.rb +${GEM_LIBDIR}/lib/stomp_server/stomp_id.rb +${GEM_LIBDIR}/lib/stomp_server/stomp_user.rb +${GEM_LIBDIR}/lib/stomp_server/test_server.rb +${GEM_LIBDIR}/lib/stomp_server/topic_manager.rb +${GEM_LIBDIR}/setup.rb +${GEM_LIBDIR}/test/tesly.rb +${GEM_LIBDIR}/test/test_queue_manager.rb +${GEM_LIBDIR}/test/test_stomp_frame.rb +${GEM_LIBDIR}/test/test_topic_manager.rb +${GEM_LIBDIR}/test_todo/test_stomp_server.rb +${GEM_HOME}/specifications/${GEM_NAME}.gemspec +share/examples/rc.d/stompserver +share/examples/stompserver/stompserver.conf diff --git a/net/ruby-stompserver/distinfo b/net/ruby-stompserver/distinfo new file mode 100644 index 00000000000..f1eef71adb4 --- /dev/null +++ b/net/ruby-stompserver/distinfo @@ -0,0 +1,8 @@ +$NetBSD: distinfo,v 1.1 2012/08/12 16:13:03 imil Exp $ + +SHA1 (stompserver-0.9.9.gem) = 99ddf0bac252315d3d9a42372bd111a456467481 +RMD160 (stompserver-0.9.9.gem) = 379796f13e919466171da102d572d82ee957b2f2 +Size (stompserver-0.9.9.gem) = 31232 bytes +SHA1 (patch-config_stompserver.conf) = 896b6636ab9106dd520ddbb9bf415e9f7fe11c8b +SHA1 (patch-gemspec) = b1fde5ff7dd735ebf29f04f4f38f4544f1cbccbc +SHA1 (patch-lib_stomp__server.rb) = 42059b957b3b4ba949e4610a8f9fcf8e352c8e5f diff --git a/net/ruby-stompserver/files/stompserver.sh b/net/ruby-stompserver/files/stompserver.sh new file mode 100755 index 00000000000..ed19e118cd8 --- /dev/null +++ b/net/ruby-stompserver/files/stompserver.sh @@ -0,0 +1,19 @@ +#!/bin/sh +# +# $NetBSD: stompserver.sh,v 1.1 2012/08/12 16:13:03 imil Exp $ +# +# PROVIDE: stompserver +# REQUIRE: DAEMON + +. /etc/rc.subr + +name="stompserver" +rcvar=${name} +command="@PREFIX@/bin/stompserver" +required_files="@STOMPSERVER_RCD_CFG@/stompserver.conf" +pidfile="@STOMPSERVER_RCD_PID@" +command_args="-C @STOMPSERVER_RCD_CFG@/stompserver.conf" +procname="@RUBY@" + +load_rc_config $name +run_rc_command "$1" diff --git a/net/ruby-stompserver/patches/patch-config_stompserver.conf b/net/ruby-stompserver/patches/patch-config_stompserver.conf new file mode 100644 index 00000000000..99f08e88f3b --- /dev/null +++ b/net/ruby-stompserver/patches/patch-config_stompserver.conf @@ -0,0 +1,28 @@ +$NetBSD: patch-config_stompserver.conf,v 1.1 2012/08/12 16:13:03 imil Exp $ + +Decent configuration file with user privileges separation and proper +filesystem locations + +--- config/stompserver.conf.orig 2012-08-12 12:54:26.000000000 +0000 ++++ config/stompserver.conf +@@ -1,11 +1,14 @@ + --- +-:daemon: false +-:working_dir: /tmp/stompserver +-:storage: .queue +-:queue: file ++:daemon: true ++:working_dir: @STOMPSERVER_WRKDIR@ ++:logdir: @STOMPSERVER_LOGDIR@ ++:pidfile: @STOMPSERVER_PIDFILE@ ++:etcdir: @STOMPSERVER_CFGDIR@ ++:storage: @STOMPSERVER_STORAGE@ ++:queue: memory + :auth: false + :debug: false +-:group: +-:user: ++:group: @STOMPSERVER_GROUP@ ++:user: @STOMPSERVER_USER@ + :host: 127.0.0.1 + :port: 61613 diff --git a/net/ruby-stompserver/patches/patch-gemspec b/net/ruby-stompserver/patches/patch-gemspec new file mode 100644 index 00000000000..89b436a1b9b --- /dev/null +++ b/net/ruby-stompserver/patches/patch-gemspec @@ -0,0 +1,16 @@ +$NetBSD: patch-gemspec,v 1.1 2012/08/12 16:13:03 imil Exp $ + +OVERRIDE_GEMSPEC is supposed to handle this, but the homepage field is +broken upstream. + +--- ../stompserver-0.9.9.gemspec.orig 2012-08-12 12:23:16.000000000 +0000 ++++ ../stompserver-0.9.9.gemspec +@@ -104,7 +104,7 @@ files: + - test/test_stomp_frame.rb + - test/test_topic_manager.rb + - test_todo/test_stomp_server.rb +-homepage: ! ' by Patrick Hurley, Lionel Bouton' ++homepage: http://stompserver.rubyforge.org/ + licenses: + post_install_message: + rdoc_options: diff --git a/net/ruby-stompserver/patches/patch-lib_stomp__server.rb b/net/ruby-stompserver/patches/patch-lib_stomp__server.rb new file mode 100644 index 00000000000..88b2b4a3cee --- /dev/null +++ b/net/ruby-stompserver/patches/patch-lib_stomp__server.rb @@ -0,0 +1,15 @@ +$NetBSD: patch-lib_stomp__server.rb,v 1.1 2012/08/12 16:13:03 imil Exp $ + +Buggy code made pid relative to logdir + +--- lib/stomp_server.rb.orig 2012-08-12 15:28:59.000000000 +0000 ++++ lib/stomp_server.rb +@@ -67,7 +67,7 @@ module StompServer + opts[:storage] = File.join(opts[:working_dir],opts[:storage]) + opts[:logdir] = File.join(opts[:working_dir],opts[:logdir]) + opts[:logfile] = File.join(opts[:logdir],opts[:logfile]) +- opts[:pidfile] = File.join(opts[:logdir],opts[:pidfile]) ++ opts[:pidfile] = File.join(opts[:working_dir],opts[:pidfile]) + if opts[:auth] + opts[:passwd] = File.join(opts[:etcdir],'.passwd') + end |