hamlib/hamlib.spec

157 lines
4.6 KiB
RPMSpec
Raw Normal View History

#
# spec file for package hamlib
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define soname 2
Name: hamlib
Version: 3.1
Release: 0
Summary: Run-time library to control radio transcievers and receivers
License: LGPL-2.1
Group: Productivity/Hamradio/Other
Url: http://hamlib.sourceforge.net
#Git-Clone: https://git.code.sf.net/p/hamlib/code
Source: http://downloads.sourceforge.net/project/%{name}/%{name}/%{version}/%{name}-%{version}.tar.gz
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: lua-devel
BuildRequires: makeinfo
BuildRequires: pkgconfig
BuildRequires: python-devel
BuildRequires: readline-devel
BuildRequires: swig
BuildRequires: pkgconfig(gdlib)
BuildRequires: pkgconfig(libusb-1.0)
Requires(post): info
Requires(preun): info
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%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 lua
Summary: LUA bindings for Hamlib
Group: Development/Libraries/Other
Requires: %{name} = %{version}
%description lua
Hamlib provides a consistent interface for programmers wanting to incorporate
radio control in their programs.
%package -n python-Hamlib
Summary: Python bindings for Hamlib
Group: Development/Libraries/Other
%description -n python-Hamlib
Hamlib provides a consistent interface for programmers wanting to incorporate
radio control in their programs.
%prep
%setup -q
%build
autoreconf -fiv
%configure --without-perl-binding \
--without-tcl-binding \
--with-xml-support \
--with-lua-binding \
--with-python-binding
make %{?_smp_mflags}
%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print
mkdir -p %{buildroot}%{_docdir}
mv %{buildroot}/%{_datadir}/doc/%{name} %{buildroot}%{_docdir}
%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/*
%{_libdir}/libhamlib.so.*
%{_infodir}/hamlib.info%{ext_info}
%{_docdir}/hamlib
%files devel
%defattr(-,root,root)
%dir %{_includedir}/hamlib
%{_includedir}/hamlib/*.h
%{_datadir}/aclocal/hamlib.m4
%{_libdir}/pkgconfig/hamlib.pc
%{_libdir}/libhamlib.so
%{_libdir}/libhamlib++.so
%{_libdir}/libhamlib.a
%{_libdir}/libhamlib++.a
%files -n libhamlib++%{soname}
%defattr(-,root,root)
%{_libdir}/libhamlib++.so.*
%files lua
%defattr(-,root,root)
%{_libdir}/lua
%exclude %{_libdir}/lua/5.2/Hamliblua.a
%files -n python-Hamlib
%defattr(-,root,root)
%{python_sitearch}/Hamlib.*
%{python_sitearch}/_Hamlib.*
%exclude %{python_sitearch}/_Hamlib.a
%changelog