File gpstk.spec of Package gpstk

#
# spec file for package gpstk
#
# Copyright (c) 2019 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 https://bugs.opensuse.org/
#

%define libver 8_0
Name:           gpstk
Version:        8.0.0
Release:        0
Summary:        The GPS Toolkit
License:        LGPL-3.0-only
Group:          Development/Libraries/C and C++
Url:            http://www.gpstk.org/
Source:         https://codeload.github.com/SGL-UT/GPSTk/tar.gz/v%{version}#/%{name}-%{version}.tar.gz
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%package devel
Summary:        Development files for GPSTk
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}

%package -n lib%{name}%{libver}
Summary:        Library files for GPSTk
Group:          System/Libraries

%description
Algorithms and frameworks supporting the development of processing
and analysis applications in navigation and global positioning.

%description devel
This package contains the development files for the GPS Toolkit.

%description -n lib%{name}%{libver}
This package contains the library files for the GPS Toolkit.

%prep
%setup -q -n GPSTk-%{version}

%build
chmod 644 *.md
%cmake \
    -DCMAKE_INSTALL_DATADIR=%{_libdir}/ \
    -DUSE_RPATH=OFF
%cmake_build

%install
%cmake_install

%post -n lib%{name}%{libver} -p /sbin/ldconfig

%postun -n lib%{name}%{libver} -p /sbin/ldconfig

%files
%defattr(-,root,root)
%license COPYING.md COPYING.LESSER.md
%doc ChangeLog.md AUTHORS.md LICENSE.md README.md RELNOTES.md DOCUMENTATION.md
%{_bindir}/*

%files -n lib%{name}%{libver}
%defattr(-,root,root)
%{_libdir}/*.so.*

%files devel
%defattr(-,root,root)
%license COPYING.md COPYING.LESSER.md
%doc ChangeLog.md AUTHORS.md LICENSE.md README.md RELNOTES.md DOCUMENTATION.md
%doc examples
%{_includedir}/%{name}
%{_libdir}/*.so
%{_libdir}/cmake/*

%changelog
openSUSE Build Service is sponsored by