]>
Commit | Line | Data |
---|---|---|
5ea09963 JB |
1 | # |
2 | # Conditional build: | |
0aa58c3e | 3 | %bcond_without python2 # Python 2 binding |
5ea09963 JB |
4 | %bcond_without python3 # Python 3 binding |
5 | # | |
5ab74684 JB |
6 | Summary: Braille translator and back-translator library |
7 | Summary(pl.UTF-8): Biblioteka tłumacząca na i z alfabetu Braille'a | |
8 | Name: liblouis | |
da195dcc | 9 | Version: 3.13.0 |
6f6ec41e | 10 | Release: 1 |
75f7f66a | 11 | License: LGPL v2.1+ (library), GPL v3+ (tools) |
5ab74684 | 12 | Group: Libraries |
b3995ec3 | 13 | #Source0Download: http://liblouis.org/downloads/ |
61eb2e10 | 14 | Source0: https://github.com/liblouis/liblouis/releases/download/v%{version}/%{name}-%{version}.tar.gz |
da195dcc | 15 | # Source0-md5: 990332fee04700fab2470a3a85668385 |
5ab74684 | 16 | Patch0: %{name}-info.patch |
b3995ec3 | 17 | URL: http://liblouis.org/ |
5ab74684 JB |
18 | BuildRequires: help2man |
19 | BuildRequires: pkgconfig | |
0aa58c3e | 20 | %{?with_python2:BuildRequires: python-modules >= 1:2.6} |
61eb2e10 | 21 | %{?with_python3:BuildRequires: python3-modules >= 1:3.2} |
0aa58c3e | 22 | BuildRequires: rpmbuild(macros) >= 1.714 |
da89ed70 | 23 | BuildRequires: sed >= 4.0 |
0aa58c3e JB |
24 | BuildRequires: texinfo >= 5 |
25 | BuildRequires: yaml-devel | |
5ab74684 JB |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
27 | ||
28 | %description | |
29 | Liblouis is an open-source braille translator and back-translator. It | |
30 | features support for computer and literary braille, supports | |
31 | contracted and uncontracted translation for many, many languages | |
32 | ||
33 | %description -l pl.UTF-8 | |
34 | Liblouis to mający otwarte źródła tłumacz na i z alfabetu Braille'a. | |
35 | Ma obsługę komputerowego i literackiego Braille'a, obowiązujących | |
36 | i nie obowiązujących tłumaczeń dla naprawdę wielu języków. | |
37 | ||
38 | %package devel | |
39 | Summary: Header files for liblouis library | |
40 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki liblouis | |
41 | Group: Development/Libraries | |
42 | Requires: %{name} = %{version}-%{release} | |
43 | ||
44 | %description devel | |
45 | Header files for liblouis library. | |
46 | ||
47 | %description devel -l pl.UTF-8 | |
48 | Pliki nagłówkowe biblioteki liblouis. | |
49 | ||
50 | %package static | |
51 | Summary: Static liblouis library | |
52 | Summary(pl.UTF-8): Statyczna biblioteka liblouis | |
53 | Group: Development/Libraries | |
54 | Requires: %{name}-devel = %{version}-%{release} | |
55 | ||
56 | %description static | |
57 | Static liblouis library. | |
58 | ||
59 | %description static -l pl.UTF-8 | |
60 | Statyczna biblioteka liblouis. | |
61 | ||
62 | %package -n python-louis | |
63 | Summary: Python ctypes binding for liblouis | |
64 | Summary(pl.UTF-8): Wiązania Pythona oparte na ctypes do biblioteki liblouis | |
65 | Group: Development/Languages/Python | |
66 | Requires: %{name} = %{version}-%{release} | |
67 | ||
68 | %description -n python-louis | |
69 | Python ctypes binding for liblouis. | |
70 | ||
71 | %description -n python-louis -l pl.UTF-8 | |
72 | Wiązania Pythona oparte na ctypes do biblioteki liblouis. | |
73 | ||
5ea09963 JB |
74 | %package -n python3-louis |
75 | Summary: Python 3 ctypes binding for liblouis | |
76 | Summary(pl.UTF-8): Wiązania Pythona 3 oparte na ctypes do biblioteki liblouis | |
77 | Group: Development/Languages/Python | |
78 | Requires: %{name} = %{version}-%{release} | |
79 | ||
80 | %description -n python3-louis | |
81 | Python 3 ctypes binding for liblouis. | |
82 | ||
83 | %description -n python3-louis -l pl.UTF-8 | |
84 | Wiązania Pythona 3 oparte na ctypes do biblioteki liblouis. | |
85 | ||
5ab74684 JB |
86 | %prep |
87 | %setup -q | |
88 | %patch0 -p1 | |
89 | ||
da89ed70 JB |
90 | %{__sed} -i -e '1s,/usr/bin/env bash,/bin/bash,' tools/lou_maketable.d/lou_maketable.in |
91 | ||
5ab74684 | 92 | %build |
7cec3b67 JB |
93 | %configure \ |
94 | --enable-ucs4 | |
5ab74684 | 95 | |
75f7f66a | 96 | %{__make} -j1 \ |
da89ed70 | 97 | dlname="liblouis.so.17" |
0aa58c3e JB |
98 | |
99 | %if %{with python2} | |
100 | cd python | |
101 | LD_LIBRARY_PATH=$(pwd)/../liblouis/.libs \ | |
102 | %py_build | |
103 | cd .. | |
104 | %endif | |
105 | ||
106 | %if %{with python2} | |
107 | cd python | |
108 | LD_LIBRARY_PATH=$(pwd)/../liblouis/.libs \ | |
109 | %py3_build | |
110 | cd .. | |
111 | %endif | |
5ab74684 JB |
112 | |
113 | %install | |
114 | rm -rf $RPM_BUILD_ROOT | |
115 | ||
116 | %{__make} install \ | |
117 | DESTDIR=$RPM_BUILD_ROOT | |
118 | ||
0aa58c3e | 119 | %if %{with python2} |
5ab74684 JB |
120 | cd python |
121 | LD_LIBRARY_PATH=$(pwd)/../liblouis/.libs \ | |
0aa58c3e JB |
122 | %py_install |
123 | cd .. | |
124 | %py_postclean | |
125 | %endif | |
5ab74684 | 126 | |
5ea09963 | 127 | %if %{with python3} |
0aa58c3e | 128 | cd python |
5ea09963 | 129 | LD_LIBRARY_PATH=$(pwd)/../liblouis/.libs \ |
0aa58c3e JB |
130 | %py3_install |
131 | cd .. | |
5ea09963 JB |
132 | %endif |
133 | ||
5ab74684 JB |
134 | # obsoleted by pkg-config |
135 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/liblouis.la | |
136 | # packaged as %doc | |
137 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/liblouis | |
138 | ||
139 | %py_postclean | |
140 | ||
141 | %clean | |
142 | rm -rf $RPM_BUILD_ROOT | |
143 | ||
144 | %post -p /sbin/ldconfig | |
145 | %postun -p /sbin/ldconfig | |
146 | ||
147 | %post devel -p /sbin/postshell | |
148 | -/usr/sbin/fix-info-dir -c %{_infodir} | |
149 | ||
150 | %postun devel -p /sbin/postshell | |
151 | -/usr/sbin/fix-info-dir -c %{_infodir} | |
152 | ||
153 | %files | |
154 | %defattr(644,root,root,755) | |
155 | %doc AUTHORS ChangeLog NEWS README TODO | |
156 | %attr(755,root,root) %{_bindir}/lou_allround | |
157 | %attr(755,root,root) %{_bindir}/lou_checkhyphens | |
158 | %attr(755,root,root) %{_bindir}/lou_checktable | |
75f7f66a | 159 | %attr(755,root,root) %{_bindir}/lou_checkyaml |
5ab74684 | 160 | %attr(755,root,root) %{_bindir}/lou_debug |
da89ed70 | 161 | %attr(755,root,root) %{_bindir}/lou_tableinfo |
5ab74684 JB |
162 | %attr(755,root,root) %{_bindir}/lou_trace |
163 | %attr(755,root,root) %{_bindir}/lou_translate | |
164 | %attr(755,root,root) %{_libdir}/liblouis.so.*.*.* | |
6f6ec41e | 165 | %attr(755,root,root) %ghost %{_libdir}/liblouis.so.20 |
5ab74684 JB |
166 | %{_datadir}/liblouis |
167 | %{_mandir}/man1/lou_allround.1* | |
168 | %{_mandir}/man1/lou_checkhyphens.1* | |
169 | %{_mandir}/man1/lou_checktable.1* | |
75f7f66a | 170 | %{_mandir}/man1/lou_checkyaml.1* |
5ab74684 | 171 | %{_mandir}/man1/lou_debug.1* |
da89ed70 | 172 | %{_mandir}/man1/lou_tableinfo.1* |
5ab74684 JB |
173 | %{_mandir}/man1/lou_trace.1* |
174 | %{_mandir}/man1/lou_translate.1* | |
175 | ||
176 | %files devel | |
177 | %defattr(644,root,root,755) | |
178 | %doc HACKING doc/liblouis.html | |
179 | %attr(755,root,root) %{_libdir}/liblouis.so | |
180 | %{_includedir}/liblouis | |
181 | %{_pkgconfigdir}/liblouis.pc | |
182 | %{_infodir}/liblouis.info* | |
183 | ||
184 | %files static | |
185 | %defattr(644,root,root,755) | |
186 | %{_libdir}/liblouis.a | |
187 | ||
0aa58c3e | 188 | %if %{with python2} |
5ab74684 JB |
189 | %files -n python-louis |
190 | %defattr(644,root,root,755) | |
191 | %doc python/README | |
5ab74684 JB |
192 | %dir %{py_sitescriptdir}/louis |
193 | %{py_sitescriptdir}/louis/__init__.py[co] | |
194 | %{py_sitescriptdir}/louis-%{version}-py*.egg-info | |
0aa58c3e | 195 | %endif |
5ea09963 JB |
196 | |
197 | %if %{with python3} | |
198 | %files -n python3-louis | |
199 | %defattr(644,root,root,755) | |
200 | %doc python/README | |
da89ed70 JB |
201 | %attr(755,root,root) %{_bindir}/lou_maketable |
202 | # FIXME: should be in %{_datadir} or %{_libexecdir} | |
203 | %{_bindir}/lou_maketable.d | |
5ea09963 JB |
204 | %dir %{py3_sitescriptdir}/louis |
205 | %{py3_sitescriptdir}/louis/__init__.py | |
206 | %{py3_sitescriptdir}/louis/__pycache__ | |
207 | %{py3_sitescriptdir}/louis-%{version}-py*.egg-info | |
208 | %endif |