Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
85 lines (65 sloc) 1.97 KB
%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%define mod_name nova_dns
Name: nova-dns
Version: 0.2.2
Release: 1
Summary: REST API for DNS configuration and service to add records for fixed ips
License: GNU LGPL v2.1
Vendor: Grid Dynamics International, Inc.
Group: Development/Languages/Python
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-devel python-setuptools make
BuildArch: noarch
Requires: python-nova
Requires: start-stop-daemon
This package contains the service to add dns records for instances and
REST API to control DNS
%package doc
Summary: Documentation for %{name}
Group: Documentation
Requires: %{name} = %{version}-%{release}
BuildRequires: python-sphinx make
%description doc
Documentation and examples for %{name}.
%setup -q -n %{name}-%{version}
%{__python} build
%__rm -rf %{buildroot}
%{__python} install -O1 --skip-build --prefix=%{_prefix} --root=%{buildroot}
export PYTHONPATH=%{buildroot}%{python_sitelib}
make -C doc html
install -p -D -m 755 redhat/nova-dns.init %{buildroot}%{_initrddir}/%{name}
mkdir -p %{buildroot}/etc
cp -a etc/nova-dns %{buildroot}/etc
%__rm -rf %{buildroot}
/sbin/chkconfig --add %{name}
if [ $1 -eq 0 ] ; then
/sbin/service %{name} stop >/dev/null 2>&1
/sbin/chkconfig --del %{name}
if [ $1 -eq 1 ] ; then
/sbin/service %{name} condrestart
%doc Changelog
%config(noreplace) /etc/nova-dns
%files doc
%doc doc/build/html