NOW: finalize packaging, apache2 subpackage.
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Mon, 19 Sep 2016 14:36:47 +0000 (16:36 +0200)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Mon, 19 Sep 2016 14:36:47 +0000 (16:36 +0200)
NOW/debian/control
NOW/debian/docs
NOW/debian/now-apache.apache2 [new file with mode: 0644]
NOW/debian/now-apache.conf [new file with mode: 0644]
NOW/debian/now-apache.dirs [new file with mode: 0644]
NOW/debian/now.conf [new file with mode: 0644]
NOW/debian/now.install [new file with mode: 0644]
NOW/debian/rules

index 9e537b7..880a373 100644 (file)
@@ -2,18 +2,32 @@ Source: now
 Section: ruby
 Priority: optional
 Maintainer: František Dvořák <valtri@civ.zcu.cz>
-Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.6.1~)
+Build-Depends: debhelper (>= 7.0.50~), dh-apache2, gem2deb (>= 0.6.1~)
 Standards-Version: 3.9.5
 Homepage: https://github.com/CESNET/NOW
 #Vcs-Git: git://git.debian.org/collab-maint/now.git
 #Vcs-Browser: http://git.debian.org/?p=collab-maint/now.git;a=summary
+Vcs-Browser: http://scientific.zcu.cz/git/?p=packaging-deb-NOW.git;a=summary
 XS-Ruby-Versions: all
 
 Package: now
 Architecture: all
 XB-Ruby-Versions: ${ruby:Versions}
 Pre-Depends: ${misc:Pre-Depends}, adduser
-Depends: ${misc:Depends}, ruby | ruby-interpreter, ruby-ipaddress, ruby-json, ruby-sinatra, ruby-sinatra-cross-origin
+Depends: ${misc:Depends}, libjs-jquery, ruby | ruby-interpreter, ruby-ipaddress, ruby-json, ruby-sinatra, ruby-sinatra-cross-origin
+# missing: ruby-libopennebula
+Suggests: now-apache
 Description: Network Orchestrator Wrapper for OpenNebula
  Network Orchestrator Wrapper is the component to extend OpenNebula network
  orchestration capabilities.
+
+Package: now-apache
+Architecture: all
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, now (>= ${source:Version}), apache2-mpm-worker, libapache2-mod-passenger
+Description: Network Orchestrator Wrapper with configurations for Apache
+ Network Orchestrator Wrapper is the component to extend OpenNebula network
+ orchestration capabilities.
+ .
+ This package contains configuration files, setup scripts, and dependencies for
+ running NOW in Apache.
index b43bf86..799b807 100644 (file)
@@ -1 +1,5 @@
+etc/
+Gemfile.devel
 README.md
+swagger.yaml
+debian/tmp/rdoc/
diff --git a/NOW/debian/now-apache.apache2 b/NOW/debian/now-apache.apache2
new file mode 100644 (file)
index 0000000..78bd8bc
--- /dev/null
@@ -0,0 +1,2 @@
+conf debian/now-apache.conf
+site debian/now.conf
diff --git a/NOW/debian/now-apache.conf b/NOW/debian/now-apache.conf
new file mode 100644 (file)
index 0000000..551131d
--- /dev/null
@@ -0,0 +1 @@
+Listen localhost:11080
diff --git a/NOW/debian/now-apache.dirs b/NOW/debian/now-apache.dirs
new file mode 100644 (file)
index 0000000..719aa4b
--- /dev/null
@@ -0,0 +1 @@
+usr/share/NOW/public
diff --git a/NOW/debian/now.conf b/NOW/debian/now.conf
new file mode 100644 (file)
index 0000000..fe9ddb4
--- /dev/null
@@ -0,0 +1,14 @@
+<VirtualHost *:11080>
+  LogLevel info
+
+  DocumentRoot /usr/share/NOW/public
+  <Directory /usr/share/NOW/public>
+    #apache 2.2: Allow from all
+    Require all granted
+    Options -MultiViews
+  </Directory>
+
+  PassengerUser now
+  PassengerGroup now
+  PassengerMinInstances 3
+</VirtualHost>
diff --git a/NOW/debian/now.install b/NOW/debian/now.install
new file mode 100644 (file)
index 0000000..bb8dade
--- /dev/null
@@ -0,0 +1,8 @@
+lib/        usr/share/NOW/
+models/     usr/share/NOW/
+spec/       usr/share/NOW/
+templates/  usr/share/NOW/
+test/       usr/share/NOW/
+etc/now.yml etc/
+*.rb        usr/share/NOW/
+config.ru   usr/share/NOW/
index 4e193bf..8f36812 100755 (executable)
@@ -2,6 +2,17 @@
 export DH_VERBOSE=1
 # rspec >= 3 required
 export DH_RUBY_IGNORE_TESTS=all
+export DH_RUBY_USE_DH_AUTO_INSTALL_DESTDIR=1
 
 %:
        dh $@ --buildsystem=ruby --with ruby
+
+override_dh_install:
+       rdoc --op debian/tmp/rdoc/ models/ lib/ *.rb README*
+       rm debian/tmp/rdoc/js/jquery.js
+       ln -s /usr/share/javascript/jquery/jquery.js debian/tmp/rdoc/js/
+       dh_apache2 -pnow-apache
+       dh_install
+
+override_dh_installdocs:
+       dh_installdocs --link-doc=now