Skip to content

Commit

Permalink
improved build instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
oetiker committed Feb 5, 2012
1 parent 75418d6 commit 90f06d3
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 12 deletions.
31 changes: 21 additions & 10 deletions README
Expand Up @@ -29,17 +29,22 @@ is a plugin module (written in perl) on the server side.

See http://www.remocular.org for more information

INSTALLATION
------------
INSTALLATION from tar file
--------------------------

Use the regular

./configure
./configure --prefix=$INSTALL_DIR
make
make install

aproach. The configure script will check if the reuqired perl modules are
installed. If they are missing, it will tell you how to install them.
installed. If they are missing, it will tell you how to install them using a
line like this:

./setup/build-perl-modules.sh $INSTALL_DIR/thirdparty

Now try running configure again, it should be happy now.

The installer can be run as a normal user as long as it can write
into the installation directoreis.
Expand All @@ -60,6 +65,16 @@ You can also run remocular standalone:

PREFIX/bin/remocular.pl daemon


INSTALLING from Git
-------------------

* run ./autogetn.sh to create the configure script

* get a copy of the qooxdoo sdk from www.qooxdoo.org

* configure with --with-qooxdoo-sdk=path-to-sdk

DEVELOPEMENT
------------

Expand Down Expand Up @@ -89,13 +104,9 @@ And then access it via the built in webserver:
cd backend/bin
env QX_SRC_MODE=1 MOJO_LOG_LEVEL=debug REMOCULAR_CONF=../etc/remocular.cfg.dist ./remocular.pl daemon

It might also be a good idea to fork smokeping on github and work within
It might also be a good idea to fork remocular github and work within
your copy, so that you can easily feed back your changes to the master
version. Run

./autogen.sh

in your git tree, to build the configure script and the Makefile.in files.
version.

If you want to enhance remOcular with additional plugins, you only have to
change the server side. No JavaScript/Qooxdoo programming is required. See
Expand Down
7 changes: 6 additions & 1 deletion backend/Makefile.am
Expand Up @@ -42,15 +42,20 @@ if BUILD_QOOXDOO_APP
public/script/$(QX_CLASS).js: $(shell find ../frontend/source/class/$(QX_CLASS) -name "*.js") $(QOOXDOO_PATH)/framework/config.json
cd ../frontend && $(QOOXDOO_PATH)/tool/bin/generator.py -m QOOXDOO_PATH:$(QOOXDOO_PATH) -m CACHE:./cache -m BUILD_PATH:../backend/public build

else

public/script/$(QX_CLASS).js:
$(error get a copy of the qooxdoo sdk from www.qooxdoo.org and configure with --with-qooxdoo-sdk=path-to-sdk)

endif

install-exec-hook:
[ "$(PERL5LIB)" != "" ] && cd "$(DESTDIR)$(bindir)" && $(PERL) -i -p -e 's{.*# PERL5LIB}{use lib qw($(PERL5LIB)); # PERL5LIB}' *.pl || true
cd "$(DESTDIR)$(bindir)" && $(PERL) -i -p -e 's{^#!.*perl.*}{#!$(PERL)};' *.pl
$(PERL) -i -p -e "s/#VERSION#/$(PACKAGE_VERSION)/g;s/#YEAR#/$(YEAR)/g;" $(distdir)/public/script/$(QX_CLASS).js

dist-hook:
$(PERL) -i -p -e '"$(PACKAGE_VERSION)" =~ /(\d+)\.(\d+)\.(\d+)/ and $$v = sprintf("%d.%03d%03d",$$1,$$2,$$3) and s/^\$$VERSION\s+=\s+".+?"/\$$VERSION = "$$d"/;' $(distdir)/lib/$(MJ_CLASS).pm
$(PERL) -i -p -e "s/#VERSION#/$(PACKAGE_VERSION)/g;s/#YEAR#/$(YEAR)/g;" $(distdir)/public/script/$(QX_CLASS).js

install-data-local:
mkdir -p $(DESTDIR)$(HTDOCSDIR)
Expand Down
6 changes: 6 additions & 0 deletions backend/lib/remOcular.pm
Expand Up @@ -31,6 +31,12 @@ sub startup {

$self->app->hook(before_dispatch => sub {
my $self = shift;

my $uri = $self->req->env->{SCRIPT_URI};
my $path_info = $self->req->env->{PATH_INFO};
$uri =~ s|/?${path_info}$|/| if $path_info and $uri;
$self->req->url->base(Mojo::URL->new($uri)) if $uri;

my $rr_session;
if (my $id = $self->session('id')){
$self->app->log->debug("use id $id");
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Expand Up @@ -83,7 +83,7 @@ if test "$enable_pkgonly" != yes; then
if test x$prfx = xNONE; then
prfx=$ac_default_prefix
fi
for module in Mojolicious Mojo::Server::FastCGI Config::Grammar IPC::Run; do
for module in Mojolicious Mojo::Server::FastCGI MojoX::Dispatcher::Qooxdoo::Jsonrpc Config::Grammar IPC::Run; do
AC_MSG_CHECKING([checking for perl module '$module'])
if ${PERL} -I$prfx/thirdparty/lib/perl5 -e 'use '$module 2>/dev/null ; then
AC_MSG_RESULT([Ok])
Expand Down

0 comments on commit 90f06d3

Please sign in to comment.