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
10 Summary: Library to control radio transceivers and receivers
11 Summary(pl.UTF-8): Biblioteka do sterowania nadajnikami i odbiornikami radiowymi
15 License: LGPL v2.1+ (library), GPL v2+ (programs)
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)
49 Hamlib provides a standardized programming interface that applications
50 can use to send the appropriate commands to a radio.
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
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
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.
67 Summary: Header files for Hamlib library
68 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Hamlib
70 Group: Development/Libraries
71 Requires: %{name} = %{version}-%{release}
72 Requires: libusb-devel >= 1.0
75 Development headers for building C applications with Hamlib radio
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.
83 Summary: Static Hamlib library
84 Summary(pl.UTF-8): Statyczna biblioteka Hamlib
86 Group: Development/Libraries
87 Requires: %{name}-devel = %{version}-%{release}
90 Static Hamlib library.
92 %description static -l pl.UTF-8
93 Statyczna biblioteka Hamlib.
96 Summary: Documentation for the Hamlib radio control library
97 Summary(pl.UTF-8): Dokumentacja do biblioteki sterującej radiem Hamlib
100 %if "%{_rpmversion}" >= "5"
105 This package provides the developers documentation for the Hamlib
106 radio control library API.
108 %description doc -l pl.UTF-8
109 Ten pakiet zawiera dokumentację programistyczną API biblioteki
110 sterującej radiem Hamlib.
113 Summary: Hamlib radio control library C++ binding
114 Summary(pl.UTF-8): Wiązanie C++ do biblioteki sterującej radiem Hamlib
117 Requires: %{name} = %{version}-%{release}
120 Hamlib radio control library C++ language binding.
122 %description c++ -l pl.UTF-8
123 Wiązanie C++ do biblioteki sterującej radiem Hamlib.
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
129 Group: Development/Libraries
130 Requires: %{name}-c++ = %{version}-%{release}
131 Requires: %{name}-devel = %{version}-%{release}
132 Requires: libstdc++-devel
134 %description c++-devel
135 Development headers for building C++ applications with Hamlib radio
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.
143 Summary: Static Hamlib C++ library
144 Summary(pl.UTF-8): Statyczna biblioteka C++ Hamlib
146 Group: Development/Libraries
147 Requires: %{name}-c++-devel = %{version}-%{release}
149 %description c++-static
150 Static Hamlib C++ library.
152 %description c++-static -l pl.UTF-8
153 Statyczna biblioteka C++ Hamlib.
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
162 %description -n lua-%{name}
163 Hamlib Lua language bindings to allow radio control from Perl
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.
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}
176 %description -n perl-%{name}
177 Hamlib Perl language bindings to allow radio control from Perl
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.
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}
190 %description -n python-%{name}
191 Hamlib Python language bindings to allow radio control from Python
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.
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}
204 %description -n tcl-%{name}
205 Hamlib Tcl Language bindings to allow radio control from Tcl scripts.
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.
220 %{__aclocal} -I macros
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}
239 rm -rf $RPM_BUILD_ROOT
242 DESTDIR=$RPM_BUILD_ROOT
244 # obsoleted by pkg-config
245 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libhamlib*.la
247 %{__rm} -f $RPM_BUILD_ROOT%{_infodir}/dir
250 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lua/5.*/Hamliblua.la \
251 %{?with_static_libs:$RPM_BUILD_ROOT%{_libdir}/lua/5.*/Hamliblua.a}
255 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/perltest.pl
256 %{__rm} -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Hamlib/.packlist
260 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/_Hamlib.la \
261 %{?with_static_libs:$RPM_BUILD_ROOT%{py_sitedir}/_Hamlib.a}
266 %{__rm} $RPM_BUILD_ROOT%{_libdir}/tcl*/Hamlib/hamlibtcl.la \
267 %{?with_static_libs:$RPM_BUILD_ROOT%{_libdir}/tcl*/Hamlib/hamlibtcl.a}
271 rm -rf $RPM_BUILD_ROOT
273 %post -p /sbin/postshell
275 -/usr/sbin/fix-info-dir -c %{_infodir}
277 %postun -p /sbin/postshell
279 -/usr/sbin/fix-info-dir -c %{_infodir}
281 %post c++ -p /sbin/ldconfig
282 %postun c++ -p /sbin/ldconfig
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*
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
320 %if %{with static_libs}
322 %defattr(644,root,root,755)
323 %{_libdir}/libhamlib.a
327 %defattr(644,root,root,755)
328 %doc doc/html/{search,*.css,*.html,*.js,*.png}
331 %defattr(644,root,root,755)
332 %attr(755,root,root) %{_libdir}/libhamlib++.so.*.*.*
333 %attr(755,root,root) %ghost %{_libdir}/libhamlib++.so.2
336 %defattr(644,root,root,755)
337 %attr(755,root,root) %{_libdir}/libhamlib++.so
338 %{_includedir}/hamlib/rigclass.h
339 %{_includedir}/hamlib/rotclass.h
341 %if %{with static_libs}
343 %defattr(644,root,root,755)
344 %{_libdir}/libhamlib++.a
348 %files -n lua-%{name}
349 %defattr(644,root,root,755)
350 %attr(755,root,root) %{_libdir}/lua/5.*/Hamliblua.so
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
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]
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