From c5628436cfeb662ebbc9c94c3f27191784ee9e29 Mon Sep 17 00:00:00 2001 From: Mehdi Abaakouk Date: Thu, 20 Sep 2012 09:02:21 +0200 Subject: [PATCH] Generate compressed CSS and js Rewritten-From: 1b548b043f6d49e28da3798d0352e91e55ba01be --- xenial/debian/control | 5 +++++ xenial/debian/openstack-dashboard.install | 1 - xenial/debian/openstack-dashboard.postinst | 7 ++++++- xenial/debian/rules | 9 ++++++++- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/xenial/debian/control b/xenial/debian/control index 4f942aa..0bf939d 100644 --- a/xenial/debian/control +++ b/xenial/debian/control @@ -13,6 +13,7 @@ Build-Depends: debhelper (>= 8), python-all (>= 2.6.6-3~), python-setuptools, python-coverage, python-django-nose, python-glanceclient, + python-cinderclient, python-keystoneclient, python-mox, python-netaddr, @@ -21,6 +22,10 @@ Build-Depends: debhelper (>= 8), python-all (>= 2.6.6-3~), python-setuptools, python-quantumclient, python-sphinx, python-swiftclient, + python-openstack-auth, + python-compressor, + nodejs-legacy, + node-less Standards-Version: 3.9.3 Homepage: http://launchpad.net/horizon Vcs-Browser: http://anonscm.debian.org/gitweb/?p=openstack/horizon.git;a=summary diff --git a/xenial/debian/openstack-dashboard.install b/xenial/debian/openstack-dashboard.install index 00fbcac..748e044 100644 --- a/xenial/debian/openstack-dashboard.install +++ b/xenial/debian/openstack-dashboard.install @@ -1,3 +1,2 @@ usr/share/openstack-dashboard etc/openstack-dashboard - diff --git a/xenial/debian/openstack-dashboard.postinst b/xenial/debian/openstack-dashboard.postinst index 189fb92..3b50e13 100644 --- a/xenial/debian/openstack-dashboard.postinst +++ b/xenial/debian/openstack-dashboard.postinst @@ -8,6 +8,11 @@ then --quiet \ --disabled-password \ --group horizon + + if [ -e /usr/share/openstack-dashboard/openstack_dashboard/static ] ; then + chown -R www-data:www-data \ + /usr/share/openstack-dashboard/openstack_dashboard/static + fi fi -#DEBHELPER# \ No newline at end of file +#DEBHELPER# diff --git a/xenial/debian/rules b/xenial/debian/rules index d5ee751..3d594c8 100755 --- a/xenial/debian/rules +++ b/xenial/debian/rules @@ -8,10 +8,10 @@ override_dh_auto_install: python setup.py install --root=$(CURDIR)/debian/tmp --no-compile -O0 --install-layout=deb + install -d -m 755 $(CURDIR)/debian/tmp/usr/share/openstack-dashboard install -d -m 755 $(CURDIR)/debian/tmp/etc/openstack-dashboard - cp -a $(CURDIR)/openstack_dashboard/ $(CURDIR)/debian/tmp/usr/share/openstack-dashboard/ cp $(CURDIR)/openstack_dashboard/local/local_settings.py.example \ @@ -21,6 +21,12 @@ override_dh_auto_install: ln -fs /etc/openstack-dashboard/local_settings.py \ $(CURDIR)/debian/tmp/usr/share/openstack-dashboard/openstack_dashboard/local/local_settings.py + # compressed js and css + DJANGO_SETTINGS_MODULE="openstack_dashboard.settings" python -c 'import os, sys; from django.core.management import execute_from_command_line ; sys.path.append("$(CURDIR)") ;execute_from_command_line(["", "compress", "--force"])' + cp -a $(CURDIR)/static/dashboard/js $(CURDIR)/debian/tmp/usr/share/openstack-dashboard/openstack_dashboard/static/dashboard/js + cp -a $(CURDIR)/static/dashboard/css $(CURDIR)/debian/tmp/usr/share/openstack-dashboard/openstack_dashboard/static/dashboard/css + cp $(CURDIR)/static/dashboard/manifest.json $(CURDIR)/debian/tmp/usr/share/openstack-dashboard/openstack_dashboard/static/dashboard/ + # openstack-dashboard-apache install -d -m 755 $(CURDIR)/debian/tmp/etc/apache2/sites-available/ cp -a $(CURDIR)/debian/openstack-dashboard-apache.conf $(CURDIR)/debian/tmp/etc/apache2/sites-available/openstack-dashboard @@ -30,6 +36,7 @@ override_dh_builddeb: override_dh_auto_clean: dh_auto_clean + rm -rf $(CURDIR)/static rm -rf $(CURDIR)/horizon/build rm -rf $(CURDIR)/horizon.egg-info rm -rf $(CURDIR)/openstack_dashboard/openstack_dashboard.egg-info -- 2.45.2