]> git.pld-linux.org Git - packages/hamlib.git/blob - hamlib.spec
d88ee1f9ad8f9c4499455b181e7719633b6b0e81
[packages/hamlib.git] / hamlib.spec
1 #
2 # Conditional build:
3 %bcond_without  static_libs     # static library
4 %bcond_without  usrp            # USRP backend
5 %bcond_without  lua             # Lua binding
6 %bcond_without  perl            # Perl binding
7 %bcond_without  python          # Python binding
8 %bcond_without  tcl             # Tcl binding
9
10 Summary:        Library to control radio transceivers and receivers
11 Summary(pl.UTF-8):      Biblioteka do sterowania nadajnikami i odbiornikami radiowymi
12 Name:           hamlib
13 Version:        3.3
14 Release:        3
15 License:        LGPL v2.1+ (library), GPL v2+ (programs)
16 Group:          Libraries
17 #Source0Download: https://github.com/Hamlib/Hamlib/releases
18 Source0:        https://github.com/Hamlib/Hamlib/releases/download/%{version}/%{name}-%{version}.tar.gz
19 # Source0-md5:  2faa2894a61ed0ef307740aa6e3b73e4
20 Patch0:         %{name}-perl_install.patch
21 Patch1:         %{name}-format.patch
22 Patch2:         %{name}-info.patch
23 Patch3:         %{name}-usrp.patch
24 URL:            http://hamlib.org/
25 BuildRequires:  autoconf >= 2.67
26 BuildRequires:  automake
27 BuildRequires:  boost-devel
28 BuildRequires:  doxygen
29 BuildRequires:  gd-devel
30 BuildRequires:  libltdl-devel >= 2:2.2.6b
31 BuildRequires:  libstdc++-devel
32 BuildRequires:  libtool >= 2:2.2.6b
33 %{?with_usrp:BuildRequires:     libusrp-devel >= 0.8}
34 BuildRequires:  libusb-devel >= 1.0
35 BuildRequires:  libxml2-devel >= 2.0
36 %{?with_lua:BuildRequires:      lua52-devel >= 5.2}
37 %{?with_perl:BuildRequires:     perl-devel}
38 BuildRequires:  pkgconfig
39 %{?with_python:BuildRequires:   python-devel >= 2.1}
40 BuildRequires:  readline-devel
41 %{?with_perl:BuildRequires:     swig-perl >= 1.3.22}
42 %{?with_python:BuildRequires:   swig-python >= 1.3.22}
43 %{?with_tcl:BuildRequires:      swig-tcl >= 1.3.22}
44 %{?with_tcl:BuildRequires:      tcl-devel}
45 BuildRequires:  texinfo
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48 %description
49 Hamlib provides a standardized programming interface that applications
50 can use to send the appropriate commands to a radio.
51
52 Also included in the package is a simple radio control program
53 'rigctl', which lets one control a radio transceiver or receiver,
54 either from command line interface or in a text-oriented interactive
55 interface.
56
57 %description -l pl.UTF-8
58 Hamlib zapewnia ustandaryzowany interfejs programistyczny, który może
59 być używany przez aplikacje do wysyłania odpowiednich poleceń do
60 radia.
61
62 W pakiecie dołączony jest także prosty program do sterowania radiem
63 "rigctl", który pozwala sterować nadajnikiem lub odbiornikiem radiowym
64 z poziomu linii poleceń lub interaktywnego interfejsu tekstowego.
65
66 %package devel
67 Summary:        Header files for Hamlib library
68 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki Hamlib
69 License:        LGPL v2.1+
70 Group:          Development/Libraries
71 Requires:       %{name} = %{version}-%{release}
72 Requires:       libusb-devel >= 1.0
73
74 %description devel
75 Development headers for building C applications with Hamlib radio
76 control library.
77
78 %description devel -l pl.UTF-8
79 Pliki nagłówkowe do tworzenia aplikacji w C z użyciem biblioteki
80 sterującej radiem Hamlib.
81
82 %package static
83 Summary:        Static Hamlib library
84 Summary(pl.UTF-8):      Statyczna biblioteka Hamlib
85 License:        LGPL v2.1+
86 Group:          Development/Libraries
87 Requires:       %{name}-devel = %{version}-%{release}
88
89 %description static
90 Static Hamlib library.
91
92 %description static -l pl.UTF-8
93 Statyczna biblioteka Hamlib.
94
95 %package doc
96 Summary:        Documentation for the Hamlib radio control library
97 Summary(pl.UTF-8):      Dokumentacja do biblioteki sterującej radiem Hamlib
98 License:        LGPL v2.1+
99 Group:          Documentation
100 %if "%{_rpmversion}" >= "5"
101 BuildArch:      noarch
102 %endif
103
104 %description doc
105 This package provides the developers documentation for the Hamlib
106 radio control library API.
107
108 %description doc -l pl.UTF-8
109 Ten pakiet zawiera dokumentację programistyczną API biblioteki
110 sterującej radiem Hamlib.
111
112 %package c++
113 Summary:        Hamlib radio control library C++ binding
114 Summary(pl.UTF-8):      Wiązanie C++ do biblioteki sterującej radiem Hamlib
115 License:        LGPL v2.1+
116 Group:          Libraries
117 Requires:       %{name} = %{version}-%{release}
118
119 %description c++
120 Hamlib radio control library C++ language binding.
121
122 %description c++ -l pl.UTF-8
123 Wiązanie C++ do biblioteki sterującej radiem Hamlib.
124
125 %package c++-devel
126 Summary:        Header files for Hamlib radio control library C++ binding
127 Summary(pl.UTF-8):      Pliki nagłówkowe wiązania C++ do biblioteki sterującej radiem Hamblib
128 License:        LGPL v2.1+
129 Group:          Development/Libraries
130 Requires:       %{name}-c++ = %{version}-%{release}
131 Requires:       %{name}-devel = %{version}-%{release}
132 Requires:       libstdc++-devel
133
134 %description c++-devel
135 Development headers for building C++ applications with Hamlib radio
136 control library.
137
138 %description c++-devel -l pl.UTF-8
139 Pliki nagłówkowe do tworzenia aplikacji w C++ z użyciem biblioteki
140 sterującej radiem Hamlib.
141
142 %package c++-static
143 Summary:        Static Hamlib C++ library
144 Summary(pl.UTF-8):      Statyczna biblioteka C++ Hamlib
145 License:        LGPL v2.1+
146 Group:          Development/Libraries
147 Requires:       %{name}-c++-devel = %{version}-%{release}
148
149 %description c++-static
150 Static Hamlib C++ library.
151
152 %description c++-static -l pl.UTF-8
153 Statyczna biblioteka C++ Hamlib.
154
155 %package -n lua-%{name}
156 Summary:        Hamlib radio control library Lua binding
157 Summary(pl.UTF-8):      Wiązanie języka Lua do biblioteki sterującej radiem Hamlib
158 Group:          Development/Languages/Perl
159 Requires:       %{name} = %{version}-%{release}
160 Requires:       lua52-libs >= 5.2
161
162 %description -n lua-%{name}
163 Hamlib Lua language bindings to allow radio control from Perl
164 scripts.
165
166 %description -n lua-%{name} -l pl.UTF-8
167 Wiązania języka Lua do biblioteki Hamlib, umożliwiające sterowanie
168 radiem z poziomu skryptów Lua.
169
170 %package -n perl-%{name}
171 Summary:        Hamlib radio control library Perl binding
172 Summary(pl.UTF-8):      Wiązanie Perla do biblioteki sterującej radiem Hamlib
173 Group:          Development/Languages/Perl
174 Requires:       %{name} = %{version}-%{release}
175
176 %description -n perl-%{name}
177 Hamlib Perl language bindings to allow radio control from Perl
178 scripts.
179
180 %description -n perl-%{name} -l pl.UTF-8
181 Wiązania języka Perl do biblioteki Hamlib, umożliwiające sterowanie
182 radiem z poziomu skryptów Perla.
183
184 %package -n python-%{name}
185 Summary:        Hamlib radio control library Python binding
186 Summary(pl.UTF-8):      Wiązanie Pythona do biblioteki sterującej radiem Hamlib
187 Group:          Libraries/Perl
188 Requires:       %{name} = %{version}-%{release}
189
190 %description -n python-%{name}
191 Hamlib Python language bindings to allow radio control from Python
192 scripts.
193
194 %description -n python-%{name} -l pl.UTF-8
195 Wiązania języka Python do biblioteki Hamlib, umożliwiające sterowanie
196 radiem z poziomu skryptów Pythona.
197
198 %package -n tcl-%{name}
199 Summary:        Hamlib radio control library Tcl binding
200 Summary(pl.UTF-8):      Wiązanie Tcl-a do biblioteki sterującej radiem Hamlib
201 Group:          Development/Languages/Tcl
202 Requires:       %{name} = %{version}-%{release}
203   
204 %description -n tcl-%{name}
205 Hamlib Tcl Language bindings to allow radio control from Tcl scripts.
206
207 %description -n tcl-%{name} -l pl.UTF-8
208 Wiązania języka Tcl do biblioteki Hamlib, umożliwiające sterowanie
209 radiem z poziomu skryptów Tcl-a.
210
211 %prep
212 %setup -q
213 %patch0 -p1
214 %patch1 -p1
215 %patch2 -p1
216 %patch3 -p1
217
218 %build
219 %{__libtoolize}
220 %{__aclocal} -I macros
221 %{__autoconf}
222 %{__autoheader}
223 %{__automake}
224 %configure \
225         LUA=/usr/bin/lua5.2 \
226         --disable-silent-rules \
227         %{!?with_static_libs:--disable-static} \
228         %{?with_usrp:--enable-usrp} \
229         %{?with_lua:--with-lua-binding} \
230         %{?with_perl:--with-perl-binding} \
231         %{?with_python:--with-python-binding} \
232         %{?with_tcl:--with-tcl-binding}
233
234 %{__make}
235
236 %{__make} -C doc doc
237
238 %install
239 rm -rf $RPM_BUILD_ROOT
240
241 %{__make} install \
242         DESTDIR=$RPM_BUILD_ROOT
243
244 # obsoleted by pkg-config
245 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libhamlib*.la
246
247 %{__rm} -f $RPM_BUILD_ROOT%{_infodir}/dir
248
249 %if %{with lua}
250 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lua/5.*/Hamliblua.la \
251         %{?with_static_libs:$RPM_BUILD_ROOT%{_libdir}/lua/5.*/Hamliblua.a}
252 %endif
253
254 %if %{with perl}
255 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/perltest.pl
256 %{__rm} -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Hamlib/.packlist
257 %endif
258
259 %if %{with python}
260 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/_Hamlib.la \
261         %{?with_static_libs:$RPM_BUILD_ROOT%{py_sitedir}/_Hamlib.a}
262 %py_postclean
263 %endif
264
265 %if %{with tcl}
266 %{__rm} $RPM_BUILD_ROOT%{_libdir}/tcl*/Hamlib/hamlibtcl.la \
267         %{?with_static_libs:$RPM_BUILD_ROOT%{_libdir}/tcl*/Hamlib/hamlibtcl.a}
268 %endif
269
270 %clean
271 rm -rf $RPM_BUILD_ROOT
272
273 %post   -p /sbin/postshell
274 /sbin/ldconfig
275 -/usr/sbin/fix-info-dir -c %{_infodir}
276
277 %postun -p /sbin/postshell
278 /sbin/ldconfig
279 -/usr/sbin/fix-info-dir -c %{_infodir}
280
281 %post   c++ -p /sbin/ldconfig
282 %postun c++ -p /sbin/ldconfig
283
284 %files
285 %defattr(644,root,root,755)
286 %doc AUTHORS ChangeLog LICENSE NEWS PLAN README THANKS TODO
287 %attr(755,root,root) %{_bindir}/rigctl
288 %attr(755,root,root) %{_bindir}/rigctld
289 %attr(755,root,root) %{_bindir}/rigmem
290 %attr(755,root,root) %{_bindir}/rigsmtr
291 %attr(755,root,root) %{_bindir}/rigswr
292 %attr(755,root,root) %{_bindir}/rotctl
293 %attr(755,root,root) %{_bindir}/rotctld
294 %attr(755,root,root) %{_libdir}/libhamlib.so.*.*.*
295 %attr(755,root,root) %ghost %{_libdir}/libhamlib.so.2
296 %{_mandir}/man1/rigctl.1*
297 %{_mandir}/man1/rigctld.1*
298 %{_mandir}/man1/rigmem.1*
299 %{_mandir}/man1/rigsmtr.1*
300 %{_mandir}/man1/rigswr.1*
301 %{_mandir}/man1/rotctl.1*
302 %{_mandir}/man1/rotctld.1*
303 %{_mandir}/man7/hamlib.7*
304 %{_mandir}/man7/hamlib-primer.7*
305 %{_mandir}/man7/hamlib-utilities.7*
306 %{_infodir}/hamlib.info*
307
308 %files devel
309 %defattr(644,root,root,755)
310 %attr(755,root,root) %{_libdir}/libhamlib.so
311 %dir %{_includedir}/hamlib
312 %{_includedir}/hamlib/rig.h
313 %{_includedir}/hamlib/rig_dll.h
314 %{_includedir}/hamlib/riglist.h
315 %{_includedir}/hamlib/rotator.h
316 %{_includedir}/hamlib/rotlist.h
317 %{_pkgconfigdir}/hamlib.pc
318 %{_aclocaldir}/hamlib.m4
319
320 %if %{with static_libs}
321 %files static
322 %defattr(644,root,root,755)
323 %{_libdir}/libhamlib.a
324 %endif
325
326 %files doc
327 %defattr(644,root,root,755)
328 %doc doc/html/{search,*.css,*.html,*.js,*.png}
329
330 %files c++
331 %defattr(644,root,root,755)
332 %attr(755,root,root) %{_libdir}/libhamlib++.so.*.*.*
333 %attr(755,root,root) %ghost %{_libdir}/libhamlib++.so.2
334
335 %files c++-devel
336 %defattr(644,root,root,755)
337 %attr(755,root,root) %{_libdir}/libhamlib++.so
338 %{_includedir}/hamlib/rigclass.h
339 %{_includedir}/hamlib/rotclass.h
340
341 %if %{with static_libs}
342 %files c++-static
343 %defattr(644,root,root,755)
344 %{_libdir}/libhamlib++.a
345 %endif
346
347 %if %{with lua}
348 %files -n lua-%{name}
349 %defattr(644,root,root,755)
350 %attr(755,root,root) %{_libdir}/lua/5.*/Hamliblua.so
351 %endif
352
353 %if %{with perl}
354 %files -n perl-%{name}
355 %defattr(644,root,root,755)
356 %{perl_vendorarch}/Hamlib.pm
357 %dir %{perl_vendorarch}/auto/Hamlib
358 %attr(755,root,root) %{perl_vendorarch}/auto/Hamlib/Hamlib.so
359 %endif
360
361 %if %{with python}
362 %files -n python-%{name}
363 %defattr(644,root,root,755)
364 %attr(755,root,root) %{py_sitedir}/_Hamlib.so
365 %{py_sitedir}/Hamlib.py[co]
366 %endif
367
368 %if %{with tcl}
369 %files -n tcl-%{name}
370 %defattr(644,root,root,755)
371 %dir %{_libdir}/tcl8.6/Hamlib
372 %attr(755,root,root) %{_libdir}/tcl8.6/Hamlib/hamlibtcl*.so
373 %{_libdir}/tcl8.6/Hamlib/pkgIndex.tcl
374 %endif
This page took 0.11961 seconds and 2 git commands to generate.