A new user interface for you! Read more...

File hamlib.spec of Package hamlib

#
# spec file for package hamlib
#
# Copyright (c) 2019 Walter Fey DL8FCL
#
# This file is under MIT license

%define date 20190711
%define soname 4

Name:           hamlib
Version:        4.0_git%{date}
Release:        0
Summary:        Library and simple programs to control transcievers, receivers and rotors
License:        LGPL-2.1 and GPL-2.0
Group:          Productivity/Hamradio/Other
Url:            http://hamlib.sourceforge.net
Source:         %{name}-%{version}.tar.xz

BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  gd-devel
BuildRequires:  libtool
BuildRequires:  libusb-devel
BuildRequires:  lua-devel
BuildRequires:  makeinfo
BuildRequires:  pkgconfig
BuildRequires:  python-devel
BuildRequires:  readline-devel
BuildRequires:  swig

Requires(post):  info
Requires(preun): info

%description
The Ham Radio Control Libraries, Hamlib for short, is a development effort to
provide a consistent interface for programmers wanting to incorporate radio
control in their programs. Hamlib is not a complete user application, rather,
it is a software layer intended to make controlling various radios and other
shack hardware much easier. Hamlib will allow authors of such software as
logging programs, digital communications programs, or those wanting to develop
the ultimate radio control software to concentrate on the user interface and
the basic function of the program rather than radio control.

%package devel
Summary:        Hamlib development libraries
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}

%description devel
Hamlib provides a consistent interface for programmers wanting to incorporate
radio control in their programs. 

%package -n libhamlib++%{soname}
Summary:        Hamlib C++ libraries
Group:          Development/Libraries/Other

%description -n libhamlib++%{soname}
Hamlib provides a consistent interface for programmers wanting to incorporate 
radio control in their programs.

%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
Hamlib provides a consistent interface for programmers wanting to incorporate
radio control in their programs.

%package -n lua-%{name}
Summary:        LUA bindings for Hamlib
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}

%description -n lua-%{name}
Hamlib provides a consistent interface for programmers wanting to incorporate
radio control in their programs.

%package -n python-%{name}
Summary:        Python bindings for Hamlib
Group:          Development/Libraries/Other

%description -n python-%{name}
Hamlib provides a consistent interface for programmers wanting to incorporate
radio control in their programs.

%prep
%setup

%build
autoreconf --force --install
%configure --disable-static \
           --without-perl-binding \
           --without-tcl-binding \
           --with-xml-support \
           --with-lua-binding \
           --with-python-binding

make %{?_smp_mflags}

%install
%make_install
rm %{buildroot}%{_datadir}/doc/hamlib/LICENSE
%fdupes %{buildroot}%{python_sitearch}

%post
/sbin/ldconfig
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
%postun
/sbin/ldconfig
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz

%post -n libhamlib++%{soname} -p /sbin/ldconfig
%postun -n libhamlib++%{soname} -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc AUTHORS LICENSE NEWS 
%{_bindir}/*
%{_mandir}/man1/*
%{_mandir}/man7/*
%{_libdir}/libhamlib.so.*
%{_infodir}/hamlib.info.gz
%{_datadir}/doc/hamlib
%exclude  %{_libdir}/*.la

%files devel
%defattr(-,root,root)
%dir %{_includedir}/hamlib
%{_includedir}/hamlib/*.h
%{_datadir}/aclocal/hamlib.m4
%{_libdir}/pkgconfig/hamlib.pc
%{_libdir}/libhamlib.so

%files -n libhamlib++%{soname}
%defattr(-,root,root)
%{_libdir}/libhamlib++.so.*

%files -n libhamlib++%{soname}-devel
%defattr(-,root,root)
%{_libdir}/libhamlib++.so

%files -n lua-%{name}
%defattr(-,root,root)
%{_libdir}/lua

%files -n python-%{name}
%defattr(-,root,root)
%{python_sitearch}/Hamlib.*
%{python_sitearch}/_Hamlib.*

%changelog