File hamlib.spec of Package hamlib
#
# spec file for package hamlib
#
# Copyright (c) 2025 Walter Fey DL8FCL
#
# This file is under MIT license
%define soname 4
Name: hamlib
Version: 4.7~git20250609
Release: 0
Summary: Library and basic applications to control transcievers, receivers and rotors
License: LGPL-2.1-only and GPL-2.0-only
Group: Productivity/Hamradio/Other
Url: https://hamlib.github.io/
Source: %{name}-%{version}.tar.xz
Patch0: %{name}-perl_install.diff
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: perl
BuildRequires: pkgconfig
BuildRequires: readline-devel
BuildRequires: swig
BuildRequires: pkgconfig(gdlib)
BuildRequires: pkgconfig(libusb-1.0)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(lua)
BuildRequires: pkgconfig(python3)
BuildRequires: pkgconfig(tcl)
%description
The Ham Radio Control Library – Hamlib, for short – is a project to provide
programs with a consistent Application Programming Interface (API) for
controlling the myriad of radios and rotators available to amateur radio
and communications users.
%package devel
Summary: Hamlib development libraries
Group: Development/Libraries/Other
Requires: %{name} = %{version}
%description devel
The Ham Radio Control Library – Hamlib, for short – is a project to provide
programs with a consistent Application Programming Interface (API) for
controlling the myriad of radios and rotators available to amateur radio
and communications users.
%package -n libhamlib++%{soname}
Summary: Hamlib C++ libraries
Group: Development/Libraries/Other
%description -n libhamlib++%{soname}
The Ham Radio Control Library – Hamlib, for short – is a project to provide
programs with a consistent Application Programming Interface (API) for
controlling the myriad of radios and rotators available to amateur radio
and communications users.
%package -n libhamlib++%{soname}-devel
Summary: Hamlib C++ development libraries
Group: Development/Libraries/Other
Requires: hamlib-devel = %{version}
Requires: libhamlib++%{soname} = %{version}
%description -n libhamlib++%{soname}-devel
The Ham Radio Control Library – Hamlib, for short – is a project to provide
programs with a consistent Application Programming Interface (API) for
controlling the myriad of radios and rotators available to amateur radio
and communications users.
%package -n lua-%{name}
Summary: LUA bindings for Hamlib
Group: Development/Libraries/Other
Requires: %{name} = %{version}
%description -n lua-%{name}
The Ham Radio Control Library – Hamlib, for short – is a project to provide
programs with a consistent Application Programming Interface (API) for
controlling the myriad of radios and rotators available to amateur radio
and communications users.
%package -n python3-%{name}
Summary: Python bindings for Hamlib
Group: Development/Libraries/Other
%description -n python3-%{name}
The Ham Radio Control Library – Hamlib, for short – is a project to provide
programs with a consistent Application Programming Interface (API) for
controlling the myriad of radios and rotators available to amateur radio
and communications users.
%package -n perl-%{name}
Summary: Perl bindings for Hamlib
Group: Development/Libraries/Other
%requires_eq perl-base
%description -n perl-%{name}
The Ham Radio Control Library – Hamlib, for short – is a project to provide
programs with a consistent Application Programming Interface (API) for
controlling the myriad of radios and rotators available to amateur radio
and communications users.
%package -n tcl-%{name}
Summary: Tcl bindings for Hamlib
Group: Development/Libraries/Other
%requires_eq tcl
%description -n tcl-%{name}
The Ham Radio Control Library – Hamlib, for short – is a project to provide
programs with a consistent Application Programming Interface (API) for
controlling the myriad of radios and rotators available to amateur radio
and communications users.
%prep
%autosetup -p1
%build
autoreconf -i -f
%configure --with-perl-binding \
--with-tcl-binding \
--with-lua-binding \
--with-python-binding PYTHON_VERSION='3' \
--with-xml-support
%make_build
%install
%make_install
rm %{buildroot}%{_datadir}/doc/hamlib/COPYING
rm %{buildroot}%{perl_vendorarch}/auto/Hamlib/.packlist
find %{buildroot} -name \*.la -exec rm -f {} ';'
find %{buildroot} -name \*.a -exec rm -f {} ';'
%fdupes %{buildroot}%{python3_sitearch}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%post -n libhamlib++%{soname} -p /sbin/ldconfig
%postun -n libhamlib++%{soname} -p /sbin/ldconfig
%files
%doc AUTHORS NEWS README.multicast
%license COPYING
%{_bindir}/*
%{_mandir}/man1/*
%{_mandir}/man7/*
%{_libdir}/libhamlib.so.*
%{_datadir}/doc/hamlib
%files devel
%dir %{_includedir}/hamlib
%{_includedir}/hamlib/*.h
%{_datadir}/aclocal/hamlib.m4
%{_libdir}/pkgconfig/hamlib.pc
%{_libdir}/libhamlib.so
%files -n libhamlib++%{soname}
%{_libdir}/libhamlib++.so.*
%files -n libhamlib++%{soname}-devel
%{_libdir}/libhamlib++.so
%files -n lua-%{name}
%{_libdir}/lua
%files -n python3-%{name}
%{python3_sitearch}/Hamlib.*
%{python3_sitearch}/_Hamlib.*
%{python3_sitearch}/__pycache__/Hamlib.cpython*.pyc
%files -n perl-%{name}
%{perl_vendorarch}/*
%files -n tcl-%{name}
%{_libdir}/tcl*
%changelog