NOW: reshuffle packaging
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Tue, 18 Oct 2016 22:08:51 +0000 (00:08 +0200)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Tue, 18 Oct 2016 22:08:51 +0000 (00:08 +0200)
14 files changed:
NOW/debian/control
NOW/debian/now-apache.apache2 [deleted file]
NOW/debian/now-apache.conf [deleted file]
NOW/debian/now-apache.postinst [deleted file]
NOW/debian/now-site.conf [new file with mode: 0644]
NOW/debian/now.apache2 [new file with mode: 0644]
NOW/debian/now.conf
NOW/debian/now.dirs [moved from NOW/debian/now-apache.dirs with 100% similarity]
NOW/debian/now.postinst [new file with mode: 0644]
NOW/debian/now.prerm [new file with mode: 0644]
NOW/debian/ruby-now.docs [moved from NOW/debian/docs with 100% similarity]
NOW/debian/ruby-now.install [moved from NOW/debian/now.install with 100% similarity]
NOW/debian/ruby-now.preinst [moved from NOW/debian/preinst with 100% similarity]
NOW/debian/rules

index 07d12b5..6738ca5 100644 (file)
@@ -2,7 +2,7 @@ Source: now
 Section: ruby
 Priority: optional
 Maintainer: František Dvořák <valtri@civ.zcu.cz>
-Build-Depends: debhelper (>= 7.0.50~), dh-apache2, gem2deb (>= 0.6.1~)
+Build-Depends: debhelper (>= 7.0.50~), dh-apache2, apache2-dev, 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
@@ -12,21 +12,24 @@ XS-Ruby-Versions: all
 
 Package: now
 Architecture: all
-XB-Ruby-Versions: ${ruby:Versions}
-Pre-Depends: ${misc:Pre-Depends}, adduser
-Depends: ${misc:Depends}, libjs-jquery, ruby | ruby-interpreter, ruby-ipaddress, ruby-json, ruby-libopennebula, ruby-sinatra, ruby-sinatra-cross-origin
-Suggests: now-apache
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ruby-now (>= ${source:Version}), libapache2-mod-passenger
+Recommends: ${misc:Recommends}, apache2 | httpd
 Description: Network Orchestrator Wrapper for OpenNebula
  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 with passenger.
 
-Package: now-apache
+Package: ruby-now
 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
+XB-Ruby-Versions: ${ruby:Versions}
+Pre-Depends: ${misc:Pre-Depends}, adduser
+Depends: ${misc:Depends}, libjs-jquery, ruby | ruby-interpreter, ruby-ipaddress, ruby-json, ruby-libopennebula, ruby-sinatra, ruby-sinatra-cross-origin
+Suggests: now
+Description: Network Orchestrator Wrapper for OpenNebula
  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.
+ This package contains the core part of the NOW component.
diff --git a/NOW/debian/now-apache.apache2 b/NOW/debian/now-apache.apache2
deleted file mode 100644 (file)
index 78bd8bc..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-conf debian/now-apache.conf
-site debian/now.conf
diff --git a/NOW/debian/now-apache.conf b/NOW/debian/now-apache.conf
deleted file mode 100644 (file)
index 551131d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Listen localhost:11080
diff --git a/NOW/debian/now-apache.postinst b/NOW/debian/now-apache.postinst
deleted file mode 100644 (file)
index 0b09272..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-
-set -e
-
-case "$1" in
-    configure|reconfigure)
-        if [ -e /etc/apache2/apache2.conf ]; then
-            a2enmod passenger >/dev/null || :
-        fi
-    ;;
-esac
-
-#DEBHELPER#
diff --git a/NOW/debian/now-site.conf b/NOW/debian/now-site.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.apache2 b/NOW/debian/now.apache2
new file mode 100644 (file)
index 0000000..698ca0b
--- /dev/null
@@ -0,0 +1,2 @@
+conf debian/now.conf
+site debian/now-site.conf
index fe9ddb4..551131d 100644 (file)
@@ -1,14 +1 @@
-<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>
+Listen localhost:11080
diff --git a/NOW/debian/now.postinst b/NOW/debian/now.postinst
new file mode 100644 (file)
index 0000000..97edea6
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+set -e
+
+if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
+    . /usr/share/apache2/apache2-maintscript-helper
+    apache2_invoke enconf now.conf || exit $?
+    apache2_invoke ensite now-site.conf || exit $?
+fi
+
+#DEBHELPER#
diff --git a/NOW/debian/now.prerm b/NOW/debian/now.prerm
new file mode 100644 (file)
index 0000000..fccfabf
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+set -e
+
+if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
+    . /usr/share/apache2/apache2-maintscript-helper
+    apache2_invoke disconf now.conf || exit $?
+    apache2_invoke dissite now-site.conf || exit $?
+fi
+
+#DEBHELPER#
similarity index 100%
rename from NOW/debian/docs
rename to NOW/debian/ruby-now.docs
index 8f36812..9e7ad76 100755 (executable)
@@ -11,8 +11,8 @@ 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_apache2 -pnow
        dh_install
 
 override_dh_installdocs:
-       dh_installdocs --link-doc=now
+       dh_installdocs --link-doc=ruby-now