--no-create-home --shell /bin/false horizon
fi
+ (
+ cd /usr/share/openstack-dashboard
+ echo "Collecting and compressing static assets..."
+ rm -rf ./static/horizon 2>&1 > /dev/null
+ python manage.py collectstatic --noinput 2>&1 > /dev/null
+ python manage.py compress --force 2>&1 > /dev/null
+ )
+
+
if [ -e /usr/share/openstack-dashboard/openstack_dashboard/static ] ; then
chown -R horizon:horizon \
/usr/share/openstack-dashboard/openstack_dashboard/static
PYVER=$(shell pyversions -d)
+DEB_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
+DEB_NOEPOCH_VERSION := $(shell echo $(DEB_VERSION) | cut -d: -f2-)
+DEB_UPSTREAM_VERSION := $(shell echo $(DEB_NOEPOCH_VERSION) | sed 's/-[^-]*$$//')
+
+override_dh_auto_clean:
+ find . -name "django*.mo" -delete || :
+ rm -f horizon/xstatic
+ dh_auto_clean
+ rm -f horizon/openstack_dashboard/local/.secret_key_store
+
+override_dh_auto_build:
+ # NOTE(jamespage) this is a little horrible but works around
+ # the switch to /var/lib/openstack once installed for lockfiles
+# ln -sf ../xstatic horizon/xstatic
+# patch -p1 -R <debian/patches/ubuntu_settings.patch
+# ./run_tests.sh -N --compilemessages
+# patch -p1 <debian/patches/ubuntu_settings.patch
+# dh_auto_build
+
override_dh_auto_install:
# install horizon and dashboard
python setup.py install --root=$(CURDIR)/debian/tmp --no-compile -O0 --install-layout=deb
+ # install vendorfied xstatic assets
+# cp -r xstatic $(CURDIR)/debian/tmp/usr/lib/$(PYVER)/dist-packages/horizon
install -d -m 755 $(CURDIR)/debian/tmp/usr/share/openstack-dashboard
install -d -m 755 $(CURDIR)/debian/tmp/etc/openstack-dashboard
install -d -m 755 $(CURDIR)/debian/tmp/etc/apache2/conf-available
$(CURDIR)/debian/tmp/usr/share/openstack-dashboard/manage.py
ln -fs /etc/openstack-dashboard/local_settings.py \
$(CURDIR)/debian/tmp/usr/share/openstack-dashboard/openstack_dashboard/local/local_settings.py
- cp $(CURDIR)/debian/theme/img/juju.png \
- $(CURDIR)/debian/tmp/usr/share/openstack-dashboard/openstack_dashboard/static/dashboard/img/juju.png
ln -fs /usr/lib/$(PYVER)/dist-packages/horizon/static/horizon \
$(CURDIR)/debian/tmp/usr/share/openstack-dashboard/openstack_dashboard/static/horizon
get-orig-source:
uscan --verbose --force-download --rename --destdir=../build-area
-refresh-static-assets:
- (cd openstack_dashboard/local; ln -sf local_settings.py.example local_settings.py)
- python ./manage.py compress --force
- rm -rf debian/static/openstack-dashboard/*
- cp -r static/dashboard/* debian/static/openstack-dashboard/
- rm -f openstack_dashboard/local/local_settings.py