Mattia Verga 4f66b0e
Name:           phd2
b5d96bd
Version:        2.6.6
Mattia Verga d85b25e
Release:        1%{?dist}
Mattia Verga 4f66b0e
Summary:        Telescope guiding software
Mattia Verga 4f66b0e
# Main program files are BSD licensed
Mattia Verga 4f66b0e
# Some components have different licenses:
Mattia Verga 4f66b0e
# QHY camera headers are GPLv2+
Mattia Verga 4f66b0e
# SX camera headers are ICU
Mattia Verga 4f66b0e
# INDI GUI is LGPLv2+
Mattia Verga 4f66b0e
License:        BSD and (GPLv2+ and MIT and LGPLv2+)
Mattia Verga 4f66b0e
URL:            http://openphdguiding.org/
Mattia Verga 4f66b0e
# Download upstream tarball from
Mattia Verga 4f66b0e
# https://github.com/OpenPHDGuiding/%%{name}/archive/v%%{version}.tar.gz
Mattia Verga 4f66b0e
# and then run ./generate-tarball.sh %%{version}
Mattia Verga 4f66b0e
Source0:        %{name}-%{version}-purged.tar.xz
Mattia Verga 4f66b0e
# Script to purge binaries and unneeded files from downloaded sources
Mattia Verga 4f66b0e
Source1:        generate-tarball.sh
Mattia Verga 4f66b0e
Mattia Verga 4f66b0e
# Use C++14 flag
Mattia Verga 4f66b0e
Patch99:        phd2_cflags.patch
Mattia Verga 4f66b0e
b5d96bd
# Disable OpenSSAG
b5d96bd
# https://github.com/OpenPHDGuiding/phd2/pull/758
b5d96bd
Patch100:       phd2_2.6.6_disable_openssag.patch
Mattia Verga 4f66b0e
Mattia Verga 8604d5e
BuildRequires:  cmake3
Mattia Verga 4f66b0e
BuildRequires:  desktop-file-utils
Mattia Verga 4f66b0e
BuildRequires:  dos2unix
Mattia Verga 4f66b0e
BuildRequires:  extra-cmake-modules
Mattia Verga 4f66b0e
BuildRequires:  gettext
Mattia Verga 4f66b0e
BuildRequires:  gtest-devel
Mattia Verga 4f66b0e
BuildRequires:  libappstream-glib
Mattia Verga 4f66b0e
BuildRequires:  libindi-static
Mattia Verga 4f66b0e
BuildRequires:  libnova-devel
Mattia Verga 4f66b0e
BuildRequires:  wxGTK3-devel
Mattia Verga 4f66b0e
Mattia Verga 4f66b0e
BuildRequires:  pkgconfig(cfitsio)
Mattia Verga 4f66b0e
BuildRequires:  pkgconfig(eigen3)
Mattia Verga 4f66b0e
BuildRequires:  pkgconfig(libcurl)
Mattia Verga 4f66b0e
BuildRequires:  pkgconfig(libindi)
Mattia Verga 4f66b0e
BuildRequires:  pkgconfig(libusb-1.0)
Mattia Verga 4f66b0e
BuildRequires:  pkgconfig(zlib)
Mattia Verga 4f66b0e
Mattia Verga c5a1007
Requires:       libindi
Mattia Verga 4f66b0e
Mattia Verga 4f66b0e
Mattia Verga 4f66b0e
%description
Mattia Verga 4f66b0e
PHD2 is telescope guiding software that simplifies the process of tracking
Mattia Verga 4f66b0e
a guide star, letting you concentrate on other aspects of deep-sky imaging
Mattia Verga 4f66b0e
or spectroscopy.
Mattia Verga 4f66b0e
Mattia Verga 4f66b0e
Mattia Verga 4f66b0e
%prep
Mattia Verga 4f66b0e
%autosetup -p1
Mattia Verga 4f66b0e
Mattia Verga 4f66b0e
# Remove spurious executable bit set on icons and docs
Mattia Verga 4f66b0e
find icons -type f -print0 |xargs -0 chmod -x
Mattia Verga 4f66b0e
chmod -x PHD_2.0_Architecture.docx
Mattia Verga 4f66b0e
Mattia Verga 4f66b0e
Mattia Verga 4f66b0e
%build
Mattia Verga 4f66b0e
mkdir -p %{_target_platform}
Mattia Verga 4f66b0e
pushd %{_target_platform}
Mattia Verga 8604d5e
%{cmake3} -DUSE_SYSTEM_CFITSIO=ON \
Mattia Verga 4f66b0e
            -DUSE_SYSTEM_LIBUSB=ON \
Mattia Verga 4f66b0e
            -DUSE_SYSTEM_EIGEN3=ON \
Mattia Verga d85b25e
            -DUSE_SYSTEM_GTEST=ON \
Mattia Verga d85b25e
            -DUSE_SYSTEM_LIBINDI=ON \
Mattia Verga d85b25e
            -DOPENSOURCE_ONLY=ON ..
Mattia Verga 4f66b0e
Mattia Verga 4f66b0e
%make_build
Mattia Verga 4f66b0e
Mattia Verga 4f66b0e
Mattia Verga 4f66b0e
%install
Mattia Verga 4f66b0e
pushd %{_target_platform}
Mattia Verga 4f66b0e
%make_install
Mattia Verga 4f66b0e
popd
Mattia Verga 4f66b0e
Mattia Verga 4f66b0e
%find_lang %{name}
Mattia Verga 4f66b0e
Mattia Verga 4f66b0e
%check
Mattia Verga d85b25e
env CTEST_OUTPUT_ON_FAILURE=1 make test -C %{_target_platform}
Mattia Verga 4f66b0e
Mattia Verga 4f66b0e
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
Mattia Verga 4f66b0e
appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/%{name}.appdata.xml
Mattia Verga 4f66b0e
Mattia Verga 4f66b0e
Mattia Verga 4f66b0e
%files -f %{name}.lang
b5d96bd
%doc README.txt PHD_2.0_Architecture.docx
Mattia Verga 4f66b0e
%license LICENSE.txt
Mattia Verga 4f66b0e
%{_bindir}/*
Mattia Verga 4f66b0e
%{_datadir}/metainfo/%{name}.appdata.xml
Mattia Verga 4f66b0e
%{_datadir}/applications/%{name}.desktop
Mattia Verga 4f66b0e
%{_datadir}/phd2/
Mattia Verga 4f66b0e
%{_datadir}/pixmaps/*
Mattia Verga 4f66b0e
Mattia Verga 4f66b0e
Mattia Verga 4f66b0e
%changelog
b5d96bd
* Sat Mar 30 2019 Mattia Verga <mattia.verga@protonmail.com> - 2.6.6-1
b5d96bd
- Upgrade to 2.6.6
b5d96bd
- Enable tests on i686
b5d96bd
Mattia Verga d85b25e
* Mon May 07 2018 Mattia Verga <mattia.verga@email.it> - 2.6.5-1
Mattia Verga d85b25e
- Upgrade to 2.6.5
Mattia Verga d85b25e
- Remove obsolete scriptlets
Mattia Verga d85b25e
- Use upstream patch to disable third party drivers
Mattia Verga d85b25e
Mattia Verga c5a1007
* Sat Nov 11 2017 Mattia Verga <mattia.verga@email.it> - 2.6.4-3.1
Mattia Verga c5a1007
- Change weak dependency to standard dependency for EPEL7
Mattia Verga 8604d5e
- Change macros to cmake3 in EPEL
Mattia Verga c5a1007
Mattia Verga 4f66b0e
* Sun Nov 05 2017 Mattia Verga <mattia.verga@email.it> - 2.6.4-3
Mattia Verga 4f66b0e
- Fix spurious exec bits and line endings
Mattia Verga 4f66b0e
- Use more macros
Mattia Verga 4f66b0e
- Purge another unneeded directory from sources
Mattia Verga 4f66b0e
- Use C++14 flag
Mattia Verga 4f66b0e
Mattia Verga 4f66b0e
* Sat Nov 04 2017 Mattia Verga <mattia.verga@email.it> - 2.6.4-2
Mattia Verga 4f66b0e
- Breakdown components licenses
Mattia Verga 4f66b0e
- Add some useful docs
Mattia Verga 4f66b0e
- Add weak dependency to libindi
Mattia Verga 4f66b0e
Mattia Verga 4f66b0e
* Thu Nov 02 2017 Mattia Verga <mattia.verga@email.it> - 2.6.4-1
Mattia Verga 4f66b0e
- Initial packaging