%global commit bf941b5d4b04c4fd658c751e4cefee89330a817d %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: openstack-heat-gbp Version: 2014.2 Release: 0.1.%{shortcommit}git%{?dist} Summary: Group Based Policy add-on for OpenStack Orchestration License: ASL 2.0 URL: https://launchpad.net/group-based-policy-automation # The source tarball is created as follows: # git clone git://git.openstack.org/stackforge/group-based-policy-automation # cd group-based-policy-automation # git checkout %%{commit} # python setup.py sdist Source0: group-based-policy-automation-%{shortcommit}.tar.gz Patch0: 0001-remove-runtime-dependency-on-pbr.patch BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-pbr BuildRequires: python-setuptools Requires: openstack-heat-engine >= 2014.2 Requires: openstack-heat-engine < 2014.3 Requires: python-gbpclient %description Heat add-on for Group Based Policy (GBP), which provides declarative abstractions for achieving scalable intent-based infrastructure automation. GBP complements the OpenStack networking model with the notion of policies that can be applied between groups of network endpoints. %prep %setup -qn group-based-policy-automation-%{shortcommit} %patch0 -p1 find gbpautomation -name \*.py -exec sed -i '/\/usr\/bin\/env python/{d;q}' {} + sed -i 's/RPMVERSION/%{version}/' gbpautomation/__init__.py rm -f requirements.txt %build %{__python2} setup.py build %install %{__python2} setup.py install -O1 --skip-build --root %{buildroot} # Remove unused files rm -rf %{buildroot}%{python2_sitelib}/gbpautomation/heat/db rm -rf %{buildroot}%{python2_sitelib}/gbpautomation/heat/tests %files %doc LICENSE %doc README.rst %{python2_sitelib}/gbpautomation %{python2_sitelib}/group_based_policy_automation*.egg-info %changelog * Tue Dec 16 2014 Robert Kukura - 2014.2-0.1.bf941b5git - Initial package for Fedora