]> review.fuel-infra Code Review - openstack-build/horizon-build.git/commitdiff
Generate compressed CSS and js
authorMehdi Abaakouk <sileht@sileht.net>
Thu, 20 Sep 2012 07:02:21 +0000 (09:02 +0200)
committerMehdi Abaakouk <sileht@sileht.net>
Thu, 20 Sep 2012 07:02:21 +0000 (09:02 +0200)
Rewritten-From: 1b548b043f6d49e28da3798d0352e91e55ba01be

trusty/debian/control
trusty/debian/openstack-dashboard.install
trusty/debian/openstack-dashboard.postinst
trusty/debian/rules

index 4f942aa261c6afcee4682b640250d02f73330e87..0bf939d2bbeee33d546692efdbc9a24c8766ace3 100644 (file)
@@ -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
index 00fbcacef36fb144b15985c2d9ae95408ed8c570..748e04443085ebd6bbc03f9d757307509124f1c8 100644 (file)
@@ -1,3 +1,2 @@
 usr/share/openstack-dashboard
 etc/openstack-dashboard
-
index 189fb920588adc267108a74c91ce46d9fa4be2aa..3b50e1399e44919ece4faa952593ecf20b591326 100644 (file)
@@ -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#
index d5ee7516837bea713ee06594ab141ce6b28ae5ad..3d594c84faf5343bd1a43b9aed7ed1bc3192b5fc 100755 (executable)
@@ -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