[packages/hamlib] - new; partially based on Fedora package

qboosh qboosh at pld-linux.org
Mon May 13 21:56:24 CEST 2019


commit e4d9f909ad7cdd5ebdf0e46114405f6ac4acc1c4
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon May 13 21:56:54 2019 +0200

    - new; partially based on Fedora package

 hamlib-format.patch       |  11 ++
 hamlib-info.patch         |  14 ++
 hamlib-perl_install.patch |  11 ++
 hamlib-usrp.patch         |  11 ++
 hamlib.spec               | 374 ++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 421 insertions(+)
---
diff --git a/hamlib.spec b/hamlib.spec
new file mode 100644
index 0000000..cfcf1a9
--- /dev/null
+++ b/hamlib.spec
@@ -0,0 +1,374 @@
+#
+# Conditional build:
+%bcond_without	static_libs	# static library
+%bcond_without	usrp		# USRP backend
+%bcond_without	lua		# Lua binding
+%bcond_without	perl		# Perl binding
+%bcond_without	python		# Python binding
+%bcond_without	tcl		# Tcl binding
+
+Summary:	Library to control radio transceivers and receivers
+Summary(pl.UTF-8):	Biblioteka do sterowania nadajnikami i odbiornikami radiowymi
+Name:		hamlib
+Version:	3.3
+Release:	1
+License:	LGPL v2.1+ (library), GPL v2+ (programs)
+Group:		Libraries
+#Source0Download: https://github.com/Hamlib/Hamlib/releases
+Source0:	https://github.com/Hamlib/Hamlib/releases/download/%{version}/%{name}-%{version}.tar.gz
+# Source0-md5:	2faa2894a61ed0ef307740aa6e3b73e4
+Patch0:		%{name}-perl_install.patch
+Patch1:		%{name}-format.patch
+Patch2:		%{name}-info.patch
+Patch3:		%{name}-usrp.patch
+URL:		http://hamlib.org/
+BuildRequires:	autoconf >= 2.67
+BuildRequires:	automake
+BuildRequires:	boost-devel
+BuildRequires:	doxygen
+BuildRequires:	gd-devel
+BuildRequires:	libltdl-devel >= 2:2.2.6b
+BuildRequires:	libstdc++-devel
+BuildRequires:	libtool >= 2:2.2.6b
+%{?with_usrp:BuildRequires:	libusrp-devel >= 0.8}
+BuildRequires:	libusb-devel >= 1.0
+BuildRequires:	libxml2-devel >= 2.0
+%{?with_lua:BuildRequires:	lua52-devel >= 5.2}
+%{?with_perl:BuildRequires:	perl-devel}
+BuildRequires:	pkgconfig
+%{?with_python:BuildRequires:	python-devel >= 2.1}
+BuildRequires:	readline-devel
+%{?with_perl:BuildRequires:	swig-perl >= 1.3.22}
+%{?with_python:BuildRequires:	swig-python >= 1.3.22}
+%{?with_tcl:BuildRequires:	swig-tcl >= 1.3.22}
+%{?with_tcl:BuildRequires:	tcl-devel}
+BuildRequires:	texinfo
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Hamlib provides a standardized programming interface that applications
+can use to send the appropriate commands to a radio.
+
+Also included in the package is a simple radio control program
+'rigctl', which lets one control a radio transceiver or receiver,
+either from command line interface or in a text-oriented interactive
+interface.
+
+%description -l pl.UTF-8
+Hamlib zapewnia ustandaryzowany interfejs programistyczny, który może
+być używany przez aplikacje do wysyłania odpowiednich poleceń do
+radia.
+
+W pakiecie dołączony jest także prosty program do sterowania radiem
+"rigctl", który pozwala sterować nadajnikiem lub odbiornikiem radiowym
+z poziomu linii poleceń lub interaktywnego interfejsu tekstowego.
+
+%package devel
+Summary:	Header files for Hamlib library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki Hamlib
+License:	LGPL v2.1+
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+Requires:	libusb-devel >= 1.0
+
+%description devel
+Development headers for building C applications with Hamlib radio
+control library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe do tworzenia aplikacji w C z użyciem biblioteki
+sterującej radiem Hamlib.
+
+%package static
+Summary:	Static Hamlib library
+Summary(pl.UTF-8):	Statyczna biblioteka Hamlib
+License:	LGPL v2.1+
+Group:		Development/Libraries
+Requires:	%{name}-devel = %{version}-%{release}
+
+%description static
+Static Hamlib library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka Hamlib.
+
+%package doc
+Summary:	Documentation for the Hamlib radio control library
+Summary(pl.UTF-8):	Dokumentacja do biblioteki sterującej radiem Hamlib
+License:	LGPL v2.1+
+Group:		Documentation
+%if "%{_rpmversion}" >= "5"
+BuildArch:	noarch
+%endif
+
+%description doc
+This package provides the developers documentation for the Hamlib
+radio control library API.
+
+%description doc -l pl.UTF-8
+Ten pakiet zawiera dokumentację programistyczną API biblioteki
+sterującej radiem Hamlib.
+
+%package c++
+Summary:	Hamlib radio control library C++ binding
+Summary(pl.UTF-8):	Wiązanie C++ do biblioteki sterującej radiem Hamlib
+License:	LGPL v2.1+
+Group:		Libraries
+Requires:	%{name} = %{version}-%{release}
+
+%description c++
+Hamlib radio control library C++ language binding.
+
+%description c++ -l pl.UTF-8
+Wiązanie C++ do biblioteki sterującej radiem Hamlib.
+
+%package c++-devel
+Summary:	Header files for Hamlib radio control library C++ binding
+Summary(pl.UTF-8):	Pliki nagłówkowe wiązania C++ do biblioteki sterującej radiem Hamblib
+License:	LGPL v2.1+
+Group:		Development/Libraries
+Requires:	%{name}-c++ = %{version}-%{release}
+Requires:	%{name}-devel = %{version}-%{release}
+Requires:	libstdc++-devel
+
+%description c++-devel
+Development headers for building C++ applications with Hamlib radio
+control library.
+
+%description c++-devel -l pl.UTF-8
+Pliki nagłówkowe do tworzenia aplikacji w C++ z użyciem biblioteki
+sterującej radiem Hamlib.
+
+%package c++-static
+Summary:	Static Hamlib C++ library
+Summary(pl.UTF-8):	Statyczna biblioteka C++ Hamlib
+License:	LGPL v2.1+
+Group:		Development/Libraries
+Requires:	%{name}-c++-devel = %{version}-%{release}
+
+%description c++-static
+Static Hamlib C++ library.
+
+%description c++-static -l pl.UTF-8
+Statyczna biblioteka C++ Hamlib.
+
+%package -n lua-%{name}
+Summary:	Hamlib radio control library Lua binding
+Summary(pl.UTF-8):	Wiązanie języka Lua do biblioteki sterującej radiem Hamlib
+Group:		Development/Languages/Perl
+Requires:	%{name} = %{version}-%{release}
+Requires:	lua52-libs >= 5.2
+
+%description -n lua-%{name}
+Hamlib Lua language bindings to allow radio control from Perl
+scripts.
+
+%description -n lua-%{name} -l pl.UTF-8
+Wiązania języka Lua do biblioteki Hamlib, umożliwiające sterowanie
+radiem z poziomu skryptów Lua.
+
+%package -n perl-%{name}
+Summary:	Hamlib radio control library Perl binding
+Summary(pl.UTF-8):	Wiązanie Perla do biblioteki sterującej radiem Hamlib
+Group:		Development/Languages/Perl
+Requires:	%{name} = %{version}-%{release}
+
+%description -n perl-%{name}
+Hamlib Perl language bindings to allow radio control from Perl
+scripts.
+
+%description -n perl-%{name} -l pl.UTF-8
+Wiązania języka Perl do biblioteki Hamlib, umożliwiające sterowanie
+radiem z poziomu skryptów Perla.
+
+%package -n python-%{name}
+Summary:	Hamlib radio control library Python binding
+Summary(pl.UTF-8):	Wiązanie Pythona do biblioteki sterującej radiem Hamlib
+Group:		Libraries/Perl
+Requires:	%{name} = %{version}-%{release}
+
+%description -n python-%{name}
+Hamlib Python language bindings to allow radio control from Python
+scripts.
+
+%description -n python-%{name} -l pl.UTF-8
+Wiązania języka Python do biblioteki Hamlib, umożliwiające sterowanie
+radiem z poziomu skryptów Pythona.
+
+%package -n tcl-%{name}
+Summary:	Hamlib radio control library Tcl binding
+Summary(pl.UTF-8):	Wiązanie Tcl-a do biblioteki sterującej radiem Hamlib
+Group:		Development/Languages/Tcl
+Requires:	%{name} = %{version}-%{release}
+  
+%description -n tcl-%{name}
+Hamlib Tcl Language bindings to allow radio control from Tcl scripts.
+
+%description -n tcl-%{name} -l pl.UTF-8
+Wiązania języka Tcl do biblioteki Hamlib, umożliwiające sterowanie
+radiem z poziomu skryptów Tcl-a.
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+
+%build
+%{__libtoolize}
+%{__aclocal} -I macros
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+%configure \
+	LUA=/usr/bin/lua5.2 \
+	--disable-silent-rules \
+	%{!?with_static_libs:--disable-static} \
+	%{?with_usrp:--enable-usrp} \
+	%{?with_lua:--with-lua-binding} \
+	%{?with_perl:--with-perl-binding} \
+	%{?with_python:--with-python-binding} \
+	%{?with_tcl:--with-tcl-binding}
+
+%{__make}
+
+%{__make} -C doc doc
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+# obsoleted by pkg-config
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libhamlib*.la
+
+%{__rm} -f $RPM_BUILD_ROOT%{_infodir}/dir
+
+%if %{with lua}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/lua/5.*/Hamliblua.la \
+	%{?with_static_libs:$RPM_BUILD_ROOT%{_libdir}/lua/5.*/Hamliblua.a}
+%endif
+
+%if %{with perl}
+%{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/perltest.pl
+%{__rm} -f $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Hamlib/.packlist
+%endif
+
+%if %{with python}
+%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/_Hamlib.la \
+	%{?with_static_libs:$RPM_BUILD_ROOT%{py_sitedir}/_Hamlib.a}
+%py_postclean
+%endif
+
+%if %{with tcl}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/tcl*/Hamlib/hamlibtcl.la \
+	%{?with_static_libs:$RPM_BUILD_ROOT%{_libdir}/tcl*/Hamlib/hamlibtcl.a}
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-p /sbin/postshell
+/sbin/ldconfig
+-/usr/sbin/fix-info-dir -c %{_infodir}
+
+%postun	-p /sbin/postshell
+/sbin/ldconfig
+-/usr/sbin/fix-info-dir -c %{_infodir}
+
+%post	c++ -p /sbin/ldconfig
+%postun	c++ -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS ChangeLog LICENSE NEWS PLAN README THANKS TODO
+%attr(755,root,root) %{_bindir}/rigctl
+%attr(755,root,root) %{_bindir}/rigctld
+%attr(755,root,root) %{_bindir}/rigmem
+%attr(755,root,root) %{_bindir}/rigsmtr
+%attr(755,root,root) %{_bindir}/rigswr
+%attr(755,root,root) %{_bindir}/rotctl
+%attr(755,root,root) %{_bindir}/rotctld
+%attr(755,root,root) %{_libdir}/libhamlib.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libhamlib.so.2
+%{_mandir}/man1/rigctl.1*
+%{_mandir}/man1/rigctld.1*
+%{_mandir}/man1/rigmem.1*
+%{_mandir}/man1/rigsmtr.1*
+%{_mandir}/man1/rigswr.1*
+%{_mandir}/man1/rotctl.1*
+%{_mandir}/man1/rotctld.1*
+%{_mandir}/man7/hamlib.7*
+%{_mandir}/man7/hamlib-primer.7*
+%{_mandir}/man7/hamlib-utilities.7*
+%{_infodir}/hamlib.info*
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libhamlib.so
+%dir %{_includedir}/hamlib
+%{_includedir}/hamlib/rig.h
+%{_includedir}/hamlib/rig_dll.h
+%{_includedir}/hamlib/riglist.h
+%{_includedir}/hamlib/rotator.h
+%{_includedir}/hamlib/rotlist.h
+%{_pkgconfigdir}/hamlib.pc
+%{_aclocaldir}/hamlib.m4
+
+%if %{with static_libs}
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libhamlib.a
+%endif
+
+%files doc
+%defattr(644,root,root,755)
+%doc doc/html/{search,*.css,*.html,*.js,*.png}
+
+%files c++
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libhamlib++.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libhamlib++.so.2
+
+%files c++-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libhamlib++.so
+%{_includedir}/hamlib/rigclass.h
+%{_includedir}/hamlib/rotclass.h
+
+%if %{with static_libs}
+%files c++-static
+%defattr(644,root,root,755)
+%{_libdir}/libhamlib++.a
+%endif
+
+%if %{with lua}
+%files -n lua-%{name}
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/lua/5.*/Hamliblua.so
+%endif
+
+%if %{with perl}
+%files -n perl-%{name}
+%defattr(644,root,root,755)
+%{perl_vendorarch}/Hamlib.pm
+%dir %{perl_vendorarch}/auto/Hamlib
+%attr(755,root,root) %{perl_vendorarch}/auto/Hamlib/Hamlib.so
+%endif
+
+%if %{with python}
+%files -n python-%{name}
+%defattr(644,root,root,755)
+%attr(755,root,root) %{py_sitedir}/_Hamlib.so
+%{py_sitedir}/Hamlib.py[co]
+%endif
+
+%if %{with tcl}
+%files -n tcl-%{name}
+%defattr(644,root,root,755)
+%dir %{_libdir}/tcl8.6/Hamlib
+%attr(755,root,root) %{_libdir}/tcl8.6/Hamlib/hamlibtcl*.so
+%{_libdir}/tcl8.6/Hamlib/pkgIndex.tcl
+%endif
diff --git a/hamlib-format.patch b/hamlib-format.patch
new file mode 100644
index 0000000..e93375f
--- /dev/null
+++ b/hamlib-format.patch
@@ -0,0 +1,11 @@
+--- hamlib-3.3/tests/rotctl_parse.c.orig	2018-08-20 17:30:25.000000000 +0200
++++ hamlib-3.3/tests/rotctl_parse.c	2019-05-08 16:03:25.046301429 +0200
+@@ -1009,7 +1009,7 @@
+             /* The starting position of the source string is the first
+              * character past the initial '\'.
+              */
+-            snprintf(cmd_name, sizeof(cmd_name), parsed_input[0] + 1);
++            snprintf(cmd_name, sizeof(cmd_name), "%s", parsed_input[0] + 1);
+ 
+             /* Sanity check as valid multiple character commands consist of
+              * alpha-numeric characters and the underscore ('_') character.
diff --git a/hamlib-info.patch b/hamlib-info.patch
new file mode 100644
index 0000000..c75994c
--- /dev/null
+++ b/hamlib-info.patch
@@ -0,0 +1,14 @@
+--- hamlib-3.3/doc/hamlib.texi.orig	2018-08-20 17:30:25.000000000 +0200
++++ hamlib-3.3/doc/hamlib.texi	2019-05-08 17:51:34.114480464 +0200
+@@ -24,9 +24,9 @@
+ @end quotation
+ @end copying
+ 
+- at dircategory Software libraries
++ at dircategory Libraries:
+ @direntry
+-* Hamlib: (hamlib).             Ham Radio Control Libraries.
++* Hamlib: (hamlib).			Ham Radio Control Libraries
+ @end direntry
+ 
+ @setchapternewpage odd
diff --git a/hamlib-perl_install.patch b/hamlib-perl_install.patch
new file mode 100644
index 0000000..edc3fe0
--- /dev/null
+++ b/hamlib-perl_install.patch
@@ -0,0 +1,11 @@
+--- a/bindings/Makefile.am
++++ b/bindings/Makefile.am
+@@ -70,7 +70,7 @@ distcheck-perl: Hamlib-pl.mk
+ 	$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -f Hamlib-pl.mk distcheck
+ 
+ install-perl: Hamlib-pl.mk
+-	$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -f Hamlib-pl.mk install_site
++	$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -f Hamlib-pl.mk pure_vendor_install
+ 
+ ## ExtUtils::MakeMaker says uninstall is deprecated and won't remove the files
+ ## anyway, so we'll have to figure out another way to remove the installed files.
diff --git a/hamlib-usrp.patch b/hamlib-usrp.patch
new file mode 100644
index 0000000..384f55b
--- /dev/null
+++ b/hamlib-usrp.patch
@@ -0,0 +1,11 @@
+--- hamlib-3.3/kit/usrp_impl.cc.orig	2018-08-20 17:30:25.000000000 +0200
++++ hamlib-3.3/kit/usrp_impl.cc	2019-05-13 05:31:23.318062894 +0200
+@@ -32,7 +32,7 @@
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <errno.h>
+-#include <usrp_standard.h>
++#include <usrp/usrp_standard.h>
+ 
+ #include "usrp_impl.h"
+ #include "token.h"
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/hamlib.git/commitdiff/e4d9f909ad7cdd5ebdf0e46114405f6ac4acc1c4



More information about the pld-cvs-commit mailing list