]> git.pld-linux.org Git - packages/liblouis.git/blob - liblouis.spec
f5a2f547be28da77871587b86eb2196546c90bf5
[packages/liblouis.git] / liblouis.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # Python 2 binding
4 %bcond_without  python3 # Python 3 binding
5 #
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
9 Version:        3.9.0
10 Release:        1
11 License:        LGPL v2.1+ (library), GPL v3+ (tools)
12 Group:          Libraries
13 #Source0Download: http://liblouis.org/downloads/
14 Source0:        https://github.com/liblouis/liblouis/releases/download/v%{version}/%{name}-%{version}.tar.gz
15 # Source0-md5:  c90c7f2fe3079ceb1c13b55fee07e08a
16 Patch0:         %{name}-info.patch
17 URL:            http://liblouis.org/
18 BuildRequires:  help2man
19 BuildRequires:  pkgconfig
20 %{?with_python2:BuildRequires:  python-modules >= 1:2.6}
21 %{?with_python3:BuildRequires:  python3-modules >= 1:3.2}
22 BuildRequires:  rpmbuild(macros) >= 1.714
23 BuildRequires:  sed >= 4.0
24 BuildRequires:  texinfo >= 5
25 BuildRequires:  yaml-devel
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
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
86 %prep
87 %setup -q
88 %patch0 -p1
89
90 %{__sed} -i -e '1s,/usr/bin/env bash,/bin/bash,' tools/lou_maketable.d/lou_maketable.in
91
92 %build
93 %configure \
94         --enable-ucs4
95
96 %{__make} -j1 \
97         dlname="liblouis.so.17"
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
112
113 %install
114 rm -rf $RPM_BUILD_ROOT
115
116 %{__make} install \
117         DESTDIR=$RPM_BUILD_ROOT
118
119 %if %{with python2}
120 cd python
121 LD_LIBRARY_PATH=$(pwd)/../liblouis/.libs \
122 %py_install
123 cd ..
124 %py_postclean
125 %endif
126
127 %if %{with python3}
128 cd python
129 LD_LIBRARY_PATH=$(pwd)/../liblouis/.libs \
130 %py3_install
131 cd ..
132 %endif
133
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
159 %attr(755,root,root) %{_bindir}/lou_checkyaml
160 %attr(755,root,root) %{_bindir}/lou_compare
161 %attr(755,root,root) %{_bindir}/lou_debug
162 %attr(755,root,root) %{_bindir}/lou_tableinfo
163 %attr(755,root,root) %{_bindir}/lou_trace
164 %attr(755,root,root) %{_bindir}/lou_translate
165 %attr(755,root,root) %{_libdir}/liblouis.so.*.*.*
166 %attr(755,root,root) %ghost %{_libdir}/liblouis.so.17
167 %{_datadir}/liblouis
168 %{_mandir}/man1/lou_allround.1*
169 %{_mandir}/man1/lou_checkhyphens.1*
170 %{_mandir}/man1/lou_checktable.1*
171 %{_mandir}/man1/lou_checkyaml.1*
172 %{_mandir}/man1/lou_debug.1*
173 %{_mandir}/man1/lou_tableinfo.1*
174 %{_mandir}/man1/lou_trace.1*
175 %{_mandir}/man1/lou_translate.1*
176
177 %files devel
178 %defattr(644,root,root,755)
179 %doc HACKING doc/liblouis.html
180 %attr(755,root,root) %{_libdir}/liblouis.so
181 %{_includedir}/liblouis
182 %{_pkgconfigdir}/liblouis.pc
183 %{_infodir}/liblouis.info*
184
185 %files static
186 %defattr(644,root,root,755)
187 %{_libdir}/liblouis.a
188
189 %if %{with python2}
190 %files -n python-louis
191 %defattr(644,root,root,755)
192 %doc python/README
193 %dir %{py_sitescriptdir}/louis
194 %{py_sitescriptdir}/louis/__init__.py[co]
195 %{py_sitescriptdir}/louis-%{version}-py*.egg-info
196 %endif
197
198 %if %{with python3}
199 %files -n python3-louis
200 %defattr(644,root,root,755)
201 %doc python/README
202 %attr(755,root,root) %{_bindir}/lou_maketable
203 # FIXME: should be in %{_datadir} or %{_libexecdir}
204 %{_bindir}/lou_maketable.d
205 %dir %{py3_sitescriptdir}/louis
206 %{py3_sitescriptdir}/louis/__init__.py
207 %{py3_sitescriptdir}/louis/__pycache__
208 %{py3_sitescriptdir}/louis-%{version}-py*.egg-info
209 %endif
This page took 0.057072 seconds and 2 git commands to generate.