]> git.pld-linux.org Git - packages/fonttools.git/blame - fonttools.spec
- updated to 3.34.2
[packages/fonttools.git] / fonttools.spec
CommitLineData
e4814ebe
JB
1#
2# Conditional build:
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
5%bcond_without doc # Sphinx documentation
6%bcond_without tests # pytest tests
7
baf8eefc
JB
8Summary: A tool to convert TrueType/OpenType fonts to XML and back
9Summary(pl.UTF-8): Narzędzie do konwersji fontów TrueType/OpenType do/z XML-a
77da64f4 10Name: fonttools
6c07898f
JB
11Version: 3.34.2
12Release: 1
e4814ebe
JB
13# basic license is BSD
14# FontTools includes Adobe AGL & AGLFN, which is under 3-clauses BSD license
15License: MIT, BSD
77da64f4 16Group: Development/Tools
e4814ebe
JB
17#Source0Download: https://github.com/fonttools/fonttools/releases
18Source0: https://github.com/fonttools/fonttools/archive/%{version}/%{name}-%{version}.tar.gz
6c07898f 19# Source0-md5: e70418b1d9175a29e7574cd3a7988ccd
e4814ebe
JB
20URL: https://github.com/fonttools/fonttools
21%if %(locale -a | grep -q '^C\.utf8$'; echo $?)
22BuildRequires: glibc-localedb-all
23%endif
24%if %{with python2}
25BuildRequires: python-devel >= 1:2.7
26BuildRequires: python-setuptools
27%if %{with tests}
28BuildRequires: python-pytest >= 3.0
6c07898f 29BuildRequires: python-unicodedata2 >= 11.0.0
e4814ebe
JB
30%endif
31%if %{with doc}
6c07898f 32BuildRequires: sphinx-pdg-2 >= 1.5.5
e4814ebe
JB
33%endif
34%endif
35%if %{with python3}
36BuildRequires: python3-devel >= 1:3.4
37%if %{with tests}
38BuildRequires: python3-pytest >= 3.0
6c07898f
JB
39%if "%{py3_ver}" < "3.7"
40BuildRequires: python3-unicodedata2 >= 11.0.0
41%endif
e4814ebe
JB
42%endif
43%endif
44BuildRequires: rpmbuild(macros) >= 1.714
45%if %{with python2}
46Requires: python-fonttools = %{version}-%{release}
47Requires: python-setuptools
48%else
49Requires: python3-fonttools = %{version}-%{release}
50Requires: python3-setuptools
51%endif
77da64f4 52Provides: ttx = %{version}-%{release}
e4814ebe 53BuildArch: noarch
77da64f4
AM
54BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
55
56%description
57TTX/FontTools is a tool for manipulating TrueType and OpenType fonts.
58It is written in Python and has a BSD-style, open-source license. TTX
59can dump TrueType and OpenType fonts to an XML-based text format and
60vice versa.
61
baf8eefc
JB
62%description -l pl.UTF-8
63TTX/FontTools to narzędzie do operacji na fontach TrueType i OpenType.
64Zostało napisane w Pythonie i ma otwartą licencję w stylu BSD. TTX
65potrafi wykonywać zrzuty fontów TrueType i OpenType do formatu
66tekstowego opartego na XML-u oraz dokonać operacji odwrotnej.
67
e4814ebe
JB
68%package -n python-fonttools
69Summary: Python 2 tools to manipulate font files
70Summary(pl.UTF-8): Narzędzia do manipulacji na plikach fontów dla Pythona 2
71Group: Libraries/Python
72Requires: python-modules >= 1:2.7
6c07898f 73Requires: python-unicodedata2 >= 11.0.0
e4814ebe
JB
74
75%description -n python-fonttools
76Python 2 tools to manipulate font files.
77
78%description -n python-fonttools -l pl.UTF-8
79Narzędzia do manipulacji na plikach fontów dla Pythona 2.
80
81%package -n python-fonttools-apidocs
82Summary: Documentation for Python fonttools module
83Summary(pl.UTF-8): Dokumentacja modułu Pythona fonttools
84Group: Documentation
85
86%description -n python-fonttools-apidocs
87Documentation for Python fonttools module.
88
89%description -n python-fonttools-apidocs -l pl.UTF-8
90Dokumentacja modułu Pythona fonttools.
91
92%package -n python3-fonttools
93Summary: Python 3 tools to manipulate font files
94Summary(pl.UTF-8): Narzędzia do manipulacji na plikach fontów dla Pythona 3
95Group: Libraries/Python
96Requires: python3-modules >= 1:3.4
6c07898f
JB
97%if "%{py3_ver}" < "3.7"
98Requires: python3-unicodedata2 >= 11.0.0
99%endif
e4814ebe
JB
100
101%description -n python3-fonttools
102Python 3 tools to manipulate font files.
103
104%description -n python3-fonttools -l pl.UTF-8
105Narzędzia do manipulacji na plikach fontów dla Pythona 3.
106
77da64f4
AM
107%prep
108%setup -q
109
77da64f4 110%build
e4814ebe
JB
111export LC_ALL=C.UTF-8
112%if %{with python2}
113%py_build %{?with_tests:test}
114%if %{with doc}
115PYTHONPATH=$(pwd)/build-2/lib \
116%{__make} -C Doc html \
117 SPHINXBUILD=sphinx-build-2
118%endif
119%endif
120
121%if %{with python3}
122%py3_build %{?with_tests:test}
123%endif
77da64f4
AM
124
125%install
126rm -rf $RPM_BUILD_ROOT
baf8eefc 127
e4814ebe
JB
128%if %{with python3}
129%py3_install
130%endif
131
132%if %{with python2}
133%py_install
77da64f4 134
baf8eefc 135%py_postclean
e4814ebe 136%endif
77da64f4
AM
137
138%clean
139rm -rf $RPM_BUILD_ROOT
140
141%files
142%defattr(644,root,root,755)
e4814ebe
JB
143%doc LICENSE LICENSE.external NEWS.rst README.rst
144%attr(755,root,root) %{_bindir}/fonttools
145%attr(755,root,root) %{_bindir}/pyftinspect
146%attr(755,root,root) %{_bindir}/pyftmerge
147%attr(755,root,root) %{_bindir}/pyftsubset
baf8eefc 148%attr(755,root,root) %{_bindir}/ttx
77da64f4 149%{_mandir}/man1/ttx.1*
e4814ebe
JB
150
151%if %{with python2}
152%files -n python-fonttools
153%defattr(644,root,root,755)
154%{py_sitescriptdir}/fontTools
155%{py_sitescriptdir}/fonttools-%{version}-py*.egg-info
156
157%if %{with doc}
158%files -n python-fonttools-apidocs
159%defattr(644,root,root,755)
160%doc Doc/build/html/{_static,designspaceLib,misc,pens,ttLib,varLib,*.html,*.js}
161%endif
162%endif
163
164%if %{with python3}
165%files -n python3-fonttools
166%defattr(644,root,root,755)
167%{py3_sitescriptdir}/fontTools
168%{py3_sitescriptdir}/fonttools-%{version}-py*.egg-info
169%endif
This page took 0.042367 seconds and 4 git commands to generate.