forked from pool/python-blockdiag
implement update-alternatives OBS-URL: https://build.opensuse.org/request/show/443108 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-blockdiag?expand=0&rev=2
76 lines
2.4 KiB
RPMSpec
76 lines
2.4 KiB
RPMSpec
#
|
|
# spec file for package python-blockdiag
|
|
#
|
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
Name: python-blockdiag
|
|
Version: 1.5.3
|
|
Release: 0
|
|
Summary: Generates block-diagram image from text
|
|
License: Apache-2.0
|
|
Group: Development/Languages/Python
|
|
Url: http://blockdiag.com/
|
|
Source: https://files.pythonhosted.org/packages/source/b/blockdiag/blockdiag-%{version}.tar.gz
|
|
BuildRequires: python-devel
|
|
BuildRequires: python-setuptools
|
|
BuildRequires: fdupes
|
|
Requires(post): update-alternatives
|
|
Requires(postun): update-alternatives
|
|
Requires: python-Pillow
|
|
Requires: python-funcparserlib
|
|
Requires: python-webcolors
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
|
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
|
%else
|
|
BuildArch: noarch
|
|
%endif
|
|
|
|
%description
|
|
`blockdiag` generate block-diagram image file from spec-text file.
|
|
|
|
* Generate block-diagram from dot like text (basic feature).
|
|
* Multilingualization for node-label (utf-8 only).
|
|
|
|
%prep
|
|
%setup -q -n blockdiag-%{version}
|
|
|
|
%build
|
|
python setup.py build
|
|
|
|
%install
|
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
|
%fdupes %{buildroot}%{python_sitelib}
|
|
mv %{buildroot}%{_bindir}/blockdiag %{buildroot}%{_bindir}/blockdiag-%{py_ver}
|
|
|
|
%post
|
|
update-alternatives \
|
|
--install %{_bindir}/blockdiag blockdiag %{_bindir}/blockdiag-%{py_ver} 50
|
|
|
|
%postun
|
|
if [ $1 -eq 0 ] ; then
|
|
update-alternatives --remove blockdiag %{_bindir}/blockdiag-%{py_ver}
|
|
fi
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%doc CHANGES.rst LICENSE README.rst
|
|
%{_bindir}/blockdiag-%{py_ver}
|
|
%{python_sitelib}/*
|
|
%ghost %{_sysconfdir}/alternatives/blockdiag
|
|
|
|
%changelog
|