Fix specification file for Horizon package

Horizon specification file corrected to make sure required
options are set and static files are generated and copied
to required location.

Change-Id: I1191c7ffda2e0ae9e96b2ea94fec2125c0995541
This commit is contained in:
Stanislav Kudriashev
2013-11-25 16:45:52 +02:00
parent 092e2dfe92
commit 6fb1ffa2cc

View File

@@ -103,8 +103,14 @@ sed -i -e 's@^BIN_DIR.*$@BIN_DIR = "/usr/bin"@' \
-e 's@^LOGOUT_URL.*$@LOGOUT_URL = "/dashboard/auth/logout/"@' \
-e 's@^LOGIN_REDIRECT_URL.*$@LOGIN_REDIRECT_URL = "/dashboard"@' \
-e 's@^DEBUG.*$@DEBUG = False@' \
-e '/^COMPRESS_ENABLED.*$/a COMPRESS_OFFLINE = True' \
openstack_dashboard/settings.py
# Correct "local_settings.py.example" config file
sed -i -e 's@^#\?ALLOWED_HOSTS.*$@ALLOWED_HOSTS = ["horizon.example.com", "localhost"]@' \
-e 's@^LOCAL_PATH.*$@LOCAL_PATH = "/tmp"@' \
openstack_dashboard/local/local_settings.py.example
# remove unnecessary .po files
find . -name "django*.po" -exec rm -f '{}' \;
@@ -188,9 +194,10 @@ cat djangojs.lang >> horizon.lang
%endif
# copy static files to %{_datadir}/openstack-dashboard/static
mkdir -p %{buildroot}%{_datadir}/openstack-dashboard/static
install -d -m 755 %{buildroot}%{_datadir}/openstack-dashboard/static
cp -a openstack_dashboard/static/* %{buildroot}%{_datadir}/openstack-dashboard/static
cp -a horizon/static/* %{buildroot}%{_datadir}/openstack-dashboard/static
cp -a static/* %{buildroot}%{_datadir}/openstack-dashboard/static
%clean
rm -rf %{buildroot}