Mattia Verga 4f66b0e
Name:           phd2
6a280e5
Version:        2.6.6
6a280e5
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
6a280e5
# Disable OpenSSAG
6a280e5
# https://github.com/OpenPHDGuiding/phd2/pull/758
6a280e5
Patch100:       phd2_2.6.6_disable_openssag.patch
Mattia Verga 4f66b0e
Mattia Verga 4f66b0e
BuildRequires:  cmake
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 195a9fe
BuildRequires:  pkgconfig(libindi) >= 1.5
Mattia Verga 4f66b0e
BuildRequires:  pkgconfig(libusb-1.0)
Mattia Verga 4f66b0e
BuildRequires:  pkgconfig(zlib)
Mattia Verga 4f66b0e
Mattia Verga 4f66b0e
Recommends:     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 4f66b0e
%{cmake} -DUSE_SYSTEM_CFITSIO=ON \
Mattia Verga 4f66b0e
            -DUSE_SYSTEM_LIBUSB=ON \
Mattia Verga 4f66b0e
            -DUSE_SYSTEM_EIGEN3=ON \
Mattia Verga d05674d
            -DUSE_SYSTEM_GTEST=ON \
Mattia Verga d05674d
            -DUSE_SYSTEM_LIBINDI=ON \
Mattia Verga d05674d
            -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 2292766
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
6a280e5
%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
6a280e5
* Sat Mar 30 2019 Mattia Verga <mattia.verga@protonmail.com> - 2.6.6-1
6a280e5
- Upgrade to 2.6.6
6a280e5
- Enable tests on i686
6a280e5
a513215
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.5-4
a513215
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
a513215
04fae7b
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.5-3
04fae7b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
04fae7b
1ad3903
* Sat May 26 2018 Christian Dersch <lupinix@mailbox.org> - 2.6.5-2
1ad3903
- rebuilt for cfitsio 3.450
1ad3903
Mattia Verga d05674d
* Mon May 07 2018 Mattia Verga <mattia.verga@email.it> - 2.6.5-1
Mattia Verga d05674d
- Upgrade to 2.6.5
Mattia Verga d05674d
- Remove obsolete scriptlets
Mattia Verga d05674d
- Use upstream patch to disable third party drivers
Mattia Verga 195a9fe
- Specify libindi to be >= 1.5
Mattia Verga d05674d
1b370aa
* Fri Feb 23 2018 Christian Dersch <lupinix@mailbox.org> - 2.6.4-6
1b370aa
- rebuilt for cfitsio 3.420 (so version bump)
1b370aa
Mattia Verga 2292766
* Tue Feb 13 2018 Mattia Verga <mattia.verga@email.it> - 2.6.4-5
Mattia Verga 2292766
- Enable test output on failures
Mattia Verga 2292766
065db52
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.4-4
065db52
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
065db52
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