189a0a3
%define srcname notofonttools
Peng Wu b76fbc3
0cb1987
%if 0%{?fedora} >= 31 || 0%{?rhel} >= 9
b539f35
%define with_python3 1
b539f35
%else
b539f35
%define with_python2 1
b539f35
%define with_python3 1
b539f35
%endif
Peng Wu b76fbc3
Peng Wu b76fbc3
%global common_desc \
Peng Wu b76fbc3
The nototools python package contains python scripts \
Peng Wu b76fbc3
used to maintain the Noto Fonts project, \
Peng Wu b76fbc3
including the google.com/get/noto website.
Peng Wu b76fbc3
Peng Wu b76fbc3
Name:		nototools
14faed2
Version:	0.2.19
14faed2
Release:	1%{?dist}
Peng Wu b76fbc3
Summary:	Noto fonts support tools and scripts plus web site generation
Peng Wu b76fbc3
Peng Wu b76fbc3
# In nototools source
Peng Wu b76fbc3
## nototools code is in ASL 2.0 license
Peng Wu b76fbc3
### third_party ucd code is in Unicode license
f16db59
License:	Apache-2.0
a461d79
URL:		https://github.com/googlefonts/nototools
189a0a3
Source0:	%pypi_source
Peng Wu b76fbc3
Peng Wu b76fbc3
BuildArch:	noarch
b539f35
%if %{with python2}
Peng Wu b76fbc3
BuildRequires:	python2-devel
189a0a3
BuildRequires:	python2-wheel
189a0a3
BuildRequires:	python2-setuptools_scm
189a0a3
%endif
Peng Wu b76fbc3
%if %{with python3}
Peng Wu b76fbc3
BuildRequires:	python3-devel
939b2de
BuildRequires:	python3-setuptools
189a0a3
BuildRequires:	python3-wheel
189a0a3
BuildRequires:	python3-setuptools_scm
189a0a3
%endif
Peng Wu b76fbc3
b539f35
%if %{with python2}
Peng Wu b76fbc3
Requires:	python2-nototools = %{version}-%{release}
189a0a3
%endif
b539f35
%if %{with python3}
b539f35
Requires:	python3-nototools = %{version}-%{release}
189a0a3
%endif
Peng Wu b76fbc3
Peng Wu b76fbc3
%description
Peng Wu b76fbc3
%common_desc
Peng Wu b76fbc3
Peng Wu b76fbc3
%if %{with python3}
Peng Wu b76fbc3
%package     -n python3-nototools
Peng Wu b76fbc3
Summary:	Noto tools for python 3
b539f35
Requires:	python3dist(fonttools)
b539f35
BuildRequires:	python3dist(fonttools)
Peng Wu b76fbc3
Peng Wu b76fbc3
%description -n python3-nototools
Peng Wu b76fbc3
%common_desc
Peng Wu b76fbc3
189a0a3
%endif
Peng Wu b76fbc3
b539f35
%if %{with python2}
Peng Wu b76fbc3
%package     -n python2-nototools
Peng Wu b76fbc3
Summary:	Noto tools for python 2
Peng Wu b76fbc3
Requires:	python2dist(fonttools)
Peng Wu b76fbc3
BuildRequires:	python2dist(fonttools)
Peng Wu b76fbc3
Peng Wu b76fbc3
%description -n python2-nototools
Peng Wu b76fbc3
%common_desc
Peng Wu b76fbc3
189a0a3
%endif
b539f35
Peng Wu b76fbc3
%prep
Peng Wu 637003b
%setup -c
Peng Wu 637003b
Peng Wu b76fbc3
# remove unneeded files
189a0a3
rm -rf %{srcname}-%{version}/third_party/{cldr,dspl,fontcrunch,ohchr,spiro,udhr,unicode}
189a0a3
mv %{srcname}-%{version} python2
Peng Wu b76fbc3
Peng Wu b76fbc3
%if %{with python3}
Peng Wu b76fbc3
cp -a python2 python3
189a0a3
%endif
Peng Wu b76fbc3
Peng Wu b76fbc3
# for documents
Peng Wu b76fbc3
cp python2/*.md python2/LICENSE .
Peng Wu b76fbc3
Peng Wu b76fbc3
%build
b539f35
%if %{with python2}
Peng Wu b76fbc3
pushd python2
Peng Wu b76fbc3
%py2_build
Peng Wu b76fbc3
popd
189a0a3
%endif
Peng Wu b76fbc3
Peng Wu b76fbc3
%if %{with python3}
Peng Wu b76fbc3
pushd python3
Peng Wu b76fbc3
%py3_build
Peng Wu b76fbc3
popd
189a0a3
%endif
Peng Wu b76fbc3
Peng Wu b76fbc3
Peng Wu b76fbc3
%install
Peng Wu b76fbc3
%if %{with python3}
Peng Wu b76fbc3
pushd python3
Peng Wu b76fbc3
%py3_install
b539f35
for lib in %{buildroot}%{python3_sitelib}/nototools/*.py; do
b539f35
 sed '1{\@^#!/usr/bin/env python@d}' $lib > $lib.new &&
b539f35
 touch -r $lib $lib.new &&
b539f35
 mv $lib.new $lib
b539f35
done
Peng Wu b76fbc3
popd
189a0a3
%endif
Peng Wu b76fbc3
b539f35
%if %{with python2}
Peng Wu b76fbc3
pushd python2
Peng Wu b76fbc3
%py2_install
Peng Wu b76fbc3
for lib in %{buildroot}%{python2_sitelib}/nototools/*.py; do
Peng Wu b76fbc3
 sed '1{\@^#!/usr/bin/env python@d}' $lib > $lib.new &&
Peng Wu b76fbc3
 touch -r $lib $lib.new &&
Peng Wu b76fbc3
 mv $lib.new $lib
Peng Wu b76fbc3
done
Peng Wu b76fbc3
popd
189a0a3
%endif
Peng Wu b76fbc3
Peng Wu b76fbc3
%check
b539f35
%if %{with python2}
Peng Wu b76fbc3
pushd python2
b539f35
# This doesn’t actually run any tests at all, therefore it doesn‘t fail:
Peng Wu b76fbc3
%{__python2} setup.py test
Peng Wu b76fbc3
popd
b539f35
%endif
Peng Wu b76fbc3
Peng Wu b76fbc3
%if %{with python3}
Peng Wu b76fbc3
pushd python3
b539f35
# Comment it out for the moment because it tries to run something which fails
b539f35
#%{__python3} setup.py test
Peng Wu b76fbc3
popd
Peng Wu b76fbc3
%endif
Peng Wu b76fbc3
Peng Wu b76fbc3
Peng Wu b76fbc3
%files
Peng Wu b76fbc3
%license LICENSE
Peng Wu b76fbc3
%doc CONTRIBUTING.md README.md
Peng Wu b76fbc3
%{_bindir}/add_vs_cmap.py
Peng Wu b76fbc3
%{_bindir}/autofix_for_release.py
Peng Wu b76fbc3
%{_bindir}/create_image.py
Peng Wu b76fbc3
%{_bindir}/decompose_ttc.py
Peng Wu b76fbc3
%{_bindir}/drop_hints.py
Peng Wu b76fbc3
%{_bindir}/dump_otl.py
Peng Wu b76fbc3
%{_bindir}/fix_khmer_and_lao_coverage.py
Peng Wu b76fbc3
%{_bindir}/fix_noto_cjk_thin.py
Peng Wu b76fbc3
%{_bindir}/generate_sample_text.py
Peng Wu b76fbc3
%{_bindir}/merge_fonts.py
Peng Wu b76fbc3
%{_bindir}/merge_noto.py
Peng Wu b76fbc3
%{_bindir}/noto_lint.py
Peng Wu b76fbc3
%{_bindir}/notocoverage
Peng Wu b76fbc3
%{_bindir}/notodiff
Peng Wu b76fbc3
%{_bindir}/scale.py
Peng Wu b76fbc3
%{_bindir}/subset.py
Peng Wu b76fbc3
%{_bindir}/subset_symbols.py
Peng Wu b76fbc3
%{_bindir}/test_vertical_extents.py
Peng Wu b76fbc3
b539f35
%if %{with python2}
Peng Wu b76fbc3
%files -n python2-nototools
189a0a3
%{python2_sitelib}/%{name}
189a0a3
%{python2_sitelib}/%{srcname}-%{version}-py2.7.egg-info
Peng Wu b76fbc3
%{python2_sitelib}/third_party
b539f35
%endif
Peng Wu b76fbc3
Peng Wu b76fbc3
%if %{with python3}
Peng Wu b76fbc3
%files -n python3-nototools
189a0a3
%{python3_sitelib}/%{name}
189a0a3
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info
Peng Wu b76fbc3
%{python3_sitelib}/third_party
189a0a3
%endif
Peng Wu b76fbc3
Peng Wu b76fbc3
Peng Wu b76fbc3
%changelog
14faed2
* Fri Jan 26 2024 Peng Wu <pwu@redhat.com> - 0.2.19-1
14faed2
- Update to 0.2.19
14faed2
de4ac79
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.17-7
de4ac79
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
de4ac79
3db8caa
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.17-6
3db8caa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
3db8caa
5dfcef3
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.17-5
5dfcef3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
5dfcef3
ce76891
* Mon Jun 19 2023 Python Maint <python-maint@redhat.com> - 0.2.17-4
ce76891
- Rebuilt for Python 3.12
ce76891
f16db59
* Thu May 18 2023 Peng Wu <pwu@redhat.com> - 0.2.17-3
f16db59
- Migrate to SPDX license
f16db59
4473757
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.17-2
4473757
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
4473757
e9dd6fa
* Mon Sep 26 2022 Peng Wu <pwu@redhat.com> - 0.2.17-1
e9dd6fa
- Update to 0.2.17
e9dd6fa
c4df6a6
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.13-7
c4df6a6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
c4df6a6
656ca82
* Wed Jun 15 2022 Python Maint <python-maint@redhat.com> - 0.2.13-6
656ca82
- Rebuilt for Python 3.11
656ca82
8aaf301
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.13-5
8aaf301
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
8aaf301
4c6e7d9
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.13-4
4c6e7d9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
4c6e7d9
b14c278
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.2.13-3
b14c278
- Rebuilt for Python 3.10
b14c278
71a27fd
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.13-2
71a27fd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
71a27fd
189a0a3
* Fri Dec 25 2020 Peng Wu <pwu@redhat.com> - 0.2.13-1
189a0a3
- Update to 0.2.13
189a0a3
9f81b84
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.20190715.git9c4375f
9f81b84
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
9f81b84
aec140d
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0-0.20190714.git9c4375f
aec140d
- Rebuilt for Python 3.9
aec140d
ce64962
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.20190713.git9c4375f
ce64962
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
ce64962
b52d5e5
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0-0.20190712.git9c4375f
b52d5e5
- Rebuilt for Python 3.8.0rc1 (#1748018)
b52d5e5
83a8667
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0-0.20190711.git9c4375f
83a8667
- Rebuilt for Python 3.8
83a8667
8fe69e7
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.20190710.git9c4375f
8fe69e7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
8fe69e7
9c7e536
* Tue Jul  9 2019 Mike FABIAN <mfabian@redhat.com> - 0-0.20190709.git9c4375f
9c7e536
- Update nototools package from upstream git repo
b539f35
- Also build the python3-nototools package
9c7e536
Peng Wu 637003b
* Tue Mar  5 2019 Peng Wu <pwu@redhat.com> - 0-0.20190305.gitbb309e8
Peng Wu 637003b
- Update nototools package from upstream git repo
Peng Wu 637003b
35a08e1
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.20170929.git0c99dff
35a08e1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
35a08e1
378dd53
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.20170928.git0c99dff
378dd53
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
378dd53
af3780d
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.20170927.git0c99dff
af3780d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
af3780d
Peng Wu b76fbc3
* Mon Dec 18 2017 Peng Wu <pwu@redhat.com> - 0-0.20170926.git0c99dff
Peng Wu b76fbc3
- Initial package