File phd2.spec of Package phd2
#
# spec file for package phd2
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2019-2020 Malcolm J Lewis <malcolmlewis@opensuse.org>
#
# 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/
#
Name: phd2
Version: 2.6.13dev7
Release: 0
Summary: Telescope guiding software
License: BSD-3-Clause AND GPL-2.0-or-later AND MIT AND LGPL-2.0-or-later
Group: Productivity/Scientific/Astronomy
URL: https://openphdguiding.org
# Execute 'osc service disabledrun' and then run ./generate-tarball.sh %%{version}
Source0: %{name}-%{version}-purged.tar.xz
# Script to purge binaries and unneeded files from downloaded sources
Source1: generate-tarball.sh
Patch0: build-fixes.patch
Patch1: add-missing-include.patch
Patch2: set-cxx17-tests.patch
Patch3: fix-indi_gui.patch
BuildRequires: cfitsio-devel
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: gtest
BuildRequires: hicolor-icon-theme
BuildRequires: libnova-devel
BuildRequires: libASICamera2-devel
BuildRequires: libogmacam-devel
BuildRequires: libEAFFocuser-devel
BuildRequires: libEFWFilter-devel
BuildRequires: libUSB2ST4Conv-devel
BuildRequires: libqhyccd-devel
BuildRequires: libPlayerOneCamera-devel
BuildRequires: libtoupcam-devel
BuildRequires: libogmacam-devel
BuildRequires: opencv-devel
BuildRequires: libSVBCameraSDK-devel
BuildRequires: pkgconfig
BuildRequires: update-desktop-files
BuildRequires: wxGTK3-devel >= 3.0
BuildRequires: pkgconfig(cfitsio)
BuildRequires: pkgconfig(eigen3) >= 2.91.0
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(libusb-1.0)
BuildRequires: pkgconfig(zlib)
BuildRequires: indi-devel >= 2.0
%description
Telescope guiding software that simplifies the process of tracking a guide star or,
starting from 2.6.9dev1, multiple stars.
This lets you concentrate on other aspects of deep-sky imaging or spectroscopy.
%lang_package
%prep
%autosetup -p1
# Remove spurious executable bit set on icons and docs
find icons -type f -print0 |xargs -0 chmod -x
find . -iname "*.docx" -delete
%build
%cmake \
-DUSE_SYSTEM_CFITSIO=ON \
-DUSE_SYSTEM_LIBUSB=ON \
-DUSE_SYSTEM_GTEST=ON \
-DUSE_SYSTEM_EIGEN3=ON \
-DUSE_SYSTEM_LIBINDI=ON \
..
%cmake_build
%install
%cmake_install
%suse_update_desktop_file %{name}
%find_lang %{name} %{?no_lang_C}
# remove broken symlinks
rm -f %{buildroot}/%{_prefix}/lib/%{name}/*
%files
%doc README.txt
%license LICENSE.txt
%{_bindir}/phd2
%{_bindir}/phd2.bin
%{_datadir}/applications/phd2.desktop
%dir %{_datadir}/metainfo
%{_datadir}/metainfo/phd2.appdata.xml
%{_datadir}/phd2/
%{_datadir}/pixmaps/phd2.png
%files lang -f %{name}.lang
%changelog