From: František Dvořák Date: Tue, 18 Oct 2016 22:08:51 +0000 (+0200) Subject: NOW: reshuffle packaging X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=649ccc42c8237809040b61374145b40fed183aa3;p=packaging-deb-NOW.git NOW: reshuffle packaging --- diff --git a/NOW/debian/control b/NOW/debian/control index 07d12b5..6738ca5 100644 --- a/NOW/debian/control +++ b/NOW/debian/control @@ -2,7 +2,7 @@ Source: now Section: ruby Priority: optional Maintainer: FrantiÅ¡ek Dvořák -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 index 78bd8bc..0000000 --- a/NOW/debian/now-apache.apache2 +++ /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 index 551131d..0000000 --- a/NOW/debian/now-apache.conf +++ /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 index 0b09272..0000000 --- a/NOW/debian/now-apache.postinst +++ /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 index 0000000..fe9ddb4 --- /dev/null +++ b/NOW/debian/now-site.conf @@ -0,0 +1,14 @@ + + LogLevel info + + DocumentRoot /usr/share/NOW/public + + #apache 2.2: Allow from all + Require all granted + Options -MultiViews + + + PassengerUser now + PassengerGroup now + PassengerMinInstances 3 + diff --git a/NOW/debian/now.apache2 b/NOW/debian/now.apache2 new file mode 100644 index 0000000..698ca0b --- /dev/null +++ b/NOW/debian/now.apache2 @@ -0,0 +1,2 @@ +conf debian/now.conf +site debian/now-site.conf diff --git a/NOW/debian/now.conf b/NOW/debian/now.conf index fe9ddb4..551131d 100644 --- a/NOW/debian/now.conf +++ b/NOW/debian/now.conf @@ -1,14 +1 @@ - - LogLevel info - - DocumentRoot /usr/share/NOW/public - - #apache 2.2: Allow from all - Require all granted - Options -MultiViews - - - PassengerUser now - PassengerGroup now - PassengerMinInstances 3 - +Listen localhost:11080 diff --git a/NOW/debian/now-apache.dirs b/NOW/debian/now.dirs similarity index 100% rename from NOW/debian/now-apache.dirs rename to NOW/debian/now.dirs diff --git a/NOW/debian/now.postinst b/NOW/debian/now.postinst new file mode 100644 index 0000000..97edea6 --- /dev/null +++ b/NOW/debian/now.postinst @@ -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 index 0000000..fccfabf --- /dev/null +++ b/NOW/debian/now.prerm @@ -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# diff --git a/NOW/debian/docs b/NOW/debian/ruby-now.docs similarity index 100% rename from NOW/debian/docs rename to NOW/debian/ruby-now.docs diff --git a/NOW/debian/now.install b/NOW/debian/ruby-now.install similarity index 100% rename from NOW/debian/now.install rename to NOW/debian/ruby-now.install diff --git a/NOW/debian/preinst b/NOW/debian/ruby-now.preinst similarity index 100% rename from NOW/debian/preinst rename to NOW/debian/ruby-now.preinst diff --git a/NOW/debian/rules b/NOW/debian/rules index 8f36812..9e7ad76 100755 --- a/NOW/debian/rules +++ b/NOW/debian/rules @@ -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