kind: manual
depends:
- erlang.bst
- unmaintained/django.bst
- unmaintained/xstatic.bst
- openstack-clients.bst
- unmaintained/test-tools.bst
- python-tools.bst
- unmaintained/openstack-services/pint.bst
- unmaintained/openstack-services/django-openstack-auth.bst
- unmaintained/openstack-services/kombu.bst
- unmaintained/openstack-services/oslo-concurrency.bst
sources:
- kind: git
  url: upstream:openstack/horizon
  track: 2015.1.0
  ref: b99cf48ff346494198fb9740495eacc14fa406bf
config:
  configure-commands:
  - find . -name "django*.mo" -exec rm -f '{}' \;
  build-commands:
  - cd horizon && django-admin.py compilemessages
  - cd openstack_dashboard && django-admin.py compilemessages
  - python setup.py build
  - |
    cp openstack_dashboard/local/local_settings.py.example \
       openstack_dashboard/local/local_settings.py
  - python manage.py collectstatic --noinput
  - python manage.py compress --force
  install-commands:
  - mkdir temproot
  - python setup.py install -O1 --skip-build --prefix "%{prefix}" --root temproot
  - find temproot -name django.po -exec rm '{}' \;
  - find temproot -name djangojs.po -exec rm '{}' \;
  - mkdir -p "%{install-root}"/var/lib/horizon/
  - |
    mv temproot/"%{prefix}"/lib/python*/site-packages/openstack_dashboard \
        "%{install-root}"/var/lib/horizon/
  - cp manage.py "%{install-root}"/var/lib/horizon/openstack_dashboard/
  - cp -a temproot/* "%{install-root}"
  - mkdir -p "%{install-root}"/etc/horizon/openstack_dashboard/
  - |
    cp openstack_dashboard/local/local_settings.py.example \
        "%{install-root}"/etc/horizon/openstack_dashboard/local_settings.py
  - |
    echo "COMPRESS_OFFLINE=True" >> \
      "%{install-root}"/etc/horizon/openstack_dashboard/local_settings.py
  - mkdir -p "%{install-root}"/var/lib/horizon/openstack_dashboard/local
  - |
    ln -sf /etc/horizon/openstack_dashboard/local_settings.py \
           "%{install-root}"/var/lib/horizon/openstack_dashboard/local/local_settings.py
  - mkdir -p "%{install-root}"/var/lib/horizon/static
  - cp -a static/* "%{install-root}"/var/lib/horizon/static
  - mkdir -p "%{install-root}"/var/lib/horizon/.blackhole
