Provide a .spec file

Change-Id: Ic516a9eaf26506803082e8e726ec84be702824fb
This commit is contained in:
Gauvain Pocentek 2015-05-26 09:21:35 +02:00
parent 7cf8c74e7c
commit bd4275c4e6
1 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,51 @@
%global full_release cloudkitty-dashboard-%{version}
Name: cloudkitty
Summary: OpenStack Rating (cloudkitty) - Dashboard
Version: @VERSION@
Release: 1%{?dist}
License: ASL 2.0
Group: System Environment/Base
URL: http://github.com/stackforge/cloudkitty-dashboard
Source0: %{full_release}.tar.gz
BuildArch: noarch
BuildRequires: git
BuildRequires: python-cloudkittyclient
BuildRequires: python-keystoneclient
BuildRequires: python-sphinx
BuildRequires: python-pbr
Requires: openstack-dashboard
Requires: python-cloudkittyclient
%prep
%setup -q -n %{full_release}
# make doc build compatible with python-oslo-sphinx RPM
sed -i 's/oslosphinx/oslo.sphinx/' doc/source/conf.py
# Remove the requirements file so that pbr hooks don't add it
# to distutils requires_dist config
rm -rf {test-,}requirements.txt tools/{pip,test}-requires
%build
%{__python} setup.py build
%install
%{__python} setup.py install -O1 --skip-build --root=%{buildroot}
mkdir -p %{buildroot}/usr/share/openstack-dashboard/openstack_dashboard/enabled/
ln -s %{python_sitelib}/cloudkittydashboard/_90_enable_ck.py \
%{buildroot}/usr/share/openstack-dashboard/openstack_dashboard/enabled/_90_enable_ck.py
%files
%{python_sitelib}/*
/usr/share/openstack-dashboard/openstack_dashboard/enabled/_90_enable_ck.py
%description
OpenStack Rating-as-a-Service - Dashboard
%changelog
* Wed May 20 2015 Gauvain Pocentek <gauvain.pocentek@objectif-libre.com> - @VERSION@
- Initial release