]> git.pld-linux.org Git - packages/liblouis.git/blob - liblouis.spec
00cb83cf22cef4e007a681e8c69b10c90c96a8c5
[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.15.0
10 Release:        2
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:  ea605d9b55d5fc142a0678eb88bbf9d8
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 BuildArch:      noarch
68
69 %description -n python-louis
70 Python ctypes binding for liblouis.
71
72 %description -n python-louis -l pl.UTF-8
73 Wiązania Pythona oparte na ctypes do biblioteki liblouis.
74
75 %package -n python3-louis
76 Summary:        Python 3 ctypes binding for liblouis
77 Summary(pl.UTF-8):      Wiązania Pythona 3 oparte na ctypes do biblioteki liblouis
78 Group:          Development/Languages/Python
79 Requires:       %{name} = %{version}-%{release}
80 BuildArch:      noarch
81
82 %description -n python3-louis
83 Python 3 ctypes binding for liblouis.
84
85 %description -n python3-louis -l pl.UTF-8
86 Wiązania Pythona 3 oparte na ctypes do biblioteki liblouis.
87
88 %prep
89 %setup -q
90 %patch0 -p1
91
92 %{__sed} -i -e '1s,/usr/bin/env bash,/bin/bash,' tools/lou_maketable.d/lou_maketable.in
93
94 %build
95 %configure \
96         --enable-ucs4
97
98 %{__make} -j1 \
99         dlname="liblouis.so.20"
100
101 %if %{with python2}
102 cd python
103 LD_LIBRARY_PATH=$(pwd)/../liblouis/.libs \
104 %py_build
105 cd ..
106 %endif
107
108 %if %{with python2}
109 cd python
110 LD_LIBRARY_PATH=$(pwd)/../liblouis/.libs \
111 %py3_build
112 cd ..
113 %endif
114
115 %install
116 rm -rf $RPM_BUILD_ROOT
117
118 %{__make} install \
119         DESTDIR=$RPM_BUILD_ROOT
120
121 %if %{with python2}
122 cd python
123 LD_LIBRARY_PATH=$(pwd)/../liblouis/.libs \
124 %py_install
125 cd ..
126 %py_postclean
127 %endif
128
129 %if %{with python3}
130 cd python
131 LD_LIBRARY_PATH=$(pwd)/../liblouis/.libs \
132 %py3_install
133 cd ..
134 %endif
135
136 # obsoleted by pkg-config
137 %{__rm} $RPM_BUILD_ROOT%{_libdir}/liblouis.la
138 # packaged as %doc
139 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/liblouis
140
141 %py_postclean
142
143 %clean
144 rm -rf $RPM_BUILD_ROOT
145
146 %post   -p /sbin/ldconfig
147 %postun -p /sbin/ldconfig
148
149 %post   devel -p /sbin/postshell
150 -/usr/sbin/fix-info-dir -c %{_infodir}
151
152 %postun devel -p /sbin/postshell
153 -/usr/sbin/fix-info-dir -c %{_infodir}
154
155 %files
156 %defattr(644,root,root,755)
157 %doc AUTHORS ChangeLog NEWS README TODO
158 %attr(755,root,root) %{_bindir}/lou_allround
159 %attr(755,root,root) %{_bindir}/lou_checkhyphens
160 %attr(755,root,root) %{_bindir}/lou_checktable
161 %attr(755,root,root) %{_bindir}/lou_checkyaml
162 %attr(755,root,root) %{_bindir}/lou_debug
163 %attr(755,root,root) %{_bindir}/lou_tableinfo
164 %attr(755,root,root) %{_bindir}/lou_trace
165 %attr(755,root,root) %{_bindir}/lou_translate
166 %attr(755,root,root) %{_libdir}/liblouis.so.*.*.*
167 %attr(755,root,root) %ghost %{_libdir}/liblouis.so.20
168 %{_datadir}/liblouis
169 %{_mandir}/man1/lou_allround.1*
170 %{_mandir}/man1/lou_checkhyphens.1*
171 %{_mandir}/man1/lou_checktable.1*
172 %{_mandir}/man1/lou_checkyaml.1*
173 %{_mandir}/man1/lou_debug.1*
174 %{_mandir}/man1/lou_tableinfo.1*
175 %{_mandir}/man1/lou_trace.1*
176 %{_mandir}/man1/lou_translate.1*
177
178 %files devel
179 %defattr(644,root,root,755)
180 %doc HACKING doc/liblouis.html
181 %attr(755,root,root) %{_libdir}/liblouis.so
182 %{_includedir}/liblouis
183 %{_pkgconfigdir}/liblouis.pc
184 %{_infodir}/liblouis.info*
185
186 %files static
187 %defattr(644,root,root,755)
188 %{_libdir}/liblouis.a
189
190 %if %{with python2}
191 %files -n python-louis
192 %defattr(644,root,root,755)
193 %doc python/README
194 %dir %{py_sitescriptdir}/louis
195 %{py_sitescriptdir}/louis/__init__.py[co]
196 %{py_sitescriptdir}/louis-%{version}-py*.egg-info
197 %endif
198
199 %if %{with python3}
200 %files -n python3-louis
201 %defattr(644,root,root,755)
202 %doc python/README
203 %attr(755,root,root) %{_bindir}/lou_maketable
204 # FIXME: should be in %{_datadir} or %{_libexecdir}
205 %{_bindir}/lou_maketable.d
206 %dir %{py3_sitescriptdir}/louis
207 %{py3_sitescriptdir}/louis/__init__.py
208 %{py3_sitescriptdir}/louis/__pycache__
209 %{py3_sitescriptdir}/louis-%{version}-py*.egg-info
210 %endif
This page took 0.084741 seconds and 2 git commands to generate.