bbc6dd6
%?python_enable_dependency_generator
bbc6dd6
bbc6dd6
%define srcname nmstate
bbc6dd6
%define libname libnmstate
bbc6dd6
bbc6dd6
Name:           nmstate
414bb92
Version:        0.0.3
414bb92
Release:        1%{?dist}
bbc6dd6
Summary:        Declarative network manager API
bbc6dd6
License:        GPLv2+
bbc6dd6
URL:            https://github.com/%{srcname}/%{srcname}
bbc6dd6
Source0:        %{url}/archive/v%{version}/%{srcname}-%{version}.tar.gz
bbc6dd6
BuildArch:      noarch
bbc6dd6
BuildRequires:  python3-devel
bbc6dd6
BuildRequires:  python3-setuptools
bbc6dd6
Requires:       python3-%{libname} = %{?epoch:%{epoch}:}%{version}-%{release}
bbc6dd6
bbc6dd6
%description
bbc6dd6
NMState is a library with an accompanying command line tool that manages host
bbc6dd6
networking settings in a declarative manner and aimed to satisfy enterprise
bbc6dd6
needs to manage host networking through a northbound declarative API and multi
bbc6dd6
provider support on the southbound.
bbc6dd6
bbc6dd6
bbc6dd6
%package -n python3-%{libname}
bbc6dd6
Summary:        nmstate Python 3 API library
bbc6dd6
Requires:       NetworkManager-libnm
bbc6dd6
Requires:       python3-gobject-base
bbc6dd6
# Once upstream fixed https://github.com/nmstate/nmstate/issues/184
bbc6dd6
# Remove above requirement and let python_enable_dependency_generator
bbc6dd6
# macro generate it.
bbc6dd6
Suggests:       NetworkManager
bbc6dd6
bbc6dd6
%description -n python3-%{libname}
bbc6dd6
This package contains the Python 3 library for nmstate.
bbc6dd6
bbc6dd6
%prep
bbc6dd6
%setup -q
bbc6dd6
bbc6dd6
%build
bbc6dd6
%py3_build
bbc6dd6
bbc6dd6
%install
bbc6dd6
%py3_install
bbc6dd6
bbc6dd6
%files
bbc6dd6
%doc README.md
bbc6dd6
%{python3_sitelib}/nmstatectl
bbc6dd6
%{_bindir}/nmstatectl
bbc6dd6
bbc6dd6
%files -n python3-%{libname}
bbc6dd6
%license LICENSE
bbc6dd6
%{python3_sitelib}/%{libname}
bbc6dd6
%{python3_sitelib}/%{srcname}-*.egg-info/
bbc6dd6
bbc6dd6
%changelog
414bb92
* Thu Dec 20 2018 Gris Ge <fge@redhat.com> - 0.0.3-1
414bb92
- Upgrade to 0.0.3.
414bb92
bbc6dd6
* Mon Dec 03 2018 Gris Ge <fge@redhat.com> - 0.0.2-2
bbc6dd6
- Trival RPM SPEC fix.
bbc6dd6
bbc6dd6
* Wed Nov 28 2018 Gris Ge <fge@redhat.com> - 0.0.2-1
bbc6dd6
- Initial release.