d7d2d1f
#global commit 042e1019d31e89ba4acf8fe08bfdc9089bbace0f
d7d2d1f
#global shortcommit %(c=%{commit}; echo ${c:0:7})
fea961a
fea961a
Name:           openambit
d7d2d1f
Version:        0.5
81d6438
Release:        4%{?commit:.git%shortcommit}%{?dist}
fea961a
Summary:        Open software for the Suunto Ambit(2)
fea961a
fea961a
License:        GPLv3+
fea961a
URL:            http://openambit.org/
9fb8380
Source0:        https://github.com/openambitproject/openambit/archive/%{?commit:%commit}%{!?commit:%version}/openambit-%{?commit:%shortcommit}%{!?commit:%version}.tar.gz
fea961a
fea961a
# Unbundle hidapi (see also %%prep)
70f7e60
Patch0:         openambit_unbundle-hidapi.patch
e664967
# Port scripts to python3
e664967
Patch1:         openambit_python3.patch
17c37ca
# Add missing extern declarations (GCC10 FTBFS)
17c37ca
Patch2:         openambit_gcc10.patch
fea961a
fea961a
BuildRequires:  cmake
fea961a
BuildRequires:  desktop-file-utils
cd94d39
BuildRequires:  gcc-c++
fea961a
BuildRequires:  libappstream-glib
cd94d39
BuildRequires:  make
70f7e60
BuildRequires:  qt5-qtbase-devel
70f7e60
BuildRequires:  qt5-qttools-devel
fea961a
BuildRequires:  systemd-devel
fea961a
BuildRequires:  hidapi-devel
e664967
BuildRequires:  python3
70f7e60
BuildRequires:  zlib-devel
010ba85
%if 0%{?with_wireshark:1}
010ba85
BuildRequires:  wireshark-devel
010ba85
%endif
010ba85
fea961a
fea961a
Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
fea961a
Requires:       hicolor-icon-theme
fea961a
fea961a
%description
fea961a
Openambit is application for downloading moves from the Suunto
fea961a
Ambit(2) outdoor watches, and synchronizing them with the
fea961a
movescount website.
fea961a
fea961a
fea961a
%package libs
fea961a
Summary:        Libraries for %{name}
fea961a
# For %%{_sysconfdir}/udev/rules.d/ ownership
fea961a
Requires:       systemd
fea961a
fea961a
%description libs
fea961a
The %{name}-libs package contains libraries for %{name}.
fea961a
fea961a
fea961a
%package        devel
fea961a
Summary:        Development files for %{name}
fea961a
Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
fea961a
fea961a
%description    devel
fea961a
The %{name}-devel package contains libraries and header files for
fea961a
developing applications that use %{name}.
fea961a
fea961a
010ba85
%if 0%{?with_wireshark:1}
fea961a
%package        wireshark
fea961a
Summary:        Wireshark dissector for %{name}
843d301
Requires:       wireshark%{?_isa} >= 1.12.6-3
fea961a
License:        BSD
fea961a
fea961a
%description    wireshark
fea961a
The %{name}-wireshark package contains the Wireshark dissector for %{name},
fea961a
which parses pcap-files made with usbpcap.
010ba85
%endif
fea961a
fea961a
fea961a
%prep
70f7e60
%autosetup -p1 -n %{name}-%{?commit:%commit}%{!?commit:%version}
fea961a
fea961a
# Remove exec permissions since it is installed as %%doc
fea961a
chmod -x tools/movescountXmlDiff.pl
fea961a
fea961a
# Remove bundled hidapi files
fea961a
rm -rf src/libambit/hidapi
fea961a
fea961a
fea961a
%build
70f7e60
%cmake \
70f7e60
  -DCMAKE_INSTALL_UDEVRULESDIR=%{_udevrulesdir} \
010ba85
  -DUSE_QT5=ON \
010ba85
%if 0%{?with_wireshark}
010ba85
  -DBUILD_EXTRAS=ON \
70f7e60
  -DCMAKE_INSTALL_WIRESHARKPLUGINSDIR=%{_libdir}/wireshark/plugins/ \
010ba85
%endif
f872e94
%cmake_build
fea961a
fea961a
fea961a
%install
f872e94
%cmake_install
a2968a3
%{_bindir}/appstream-util validate-relax --nonet %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml
fea961a
%{_bindir}/desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
fea961a
f872e94
c4e03be
%ldconfig_scriptlets libs
fea961a
f872e94
fea961a
%files
fea961a
%license src/openambit/COPYING
fea961a
%{_bindir}/%{name}
fea961a
%{_datadir}/appdata/%{name}.appdata.xml
fea961a
%{_datadir}/applications/%{name}.desktop
fea961a
%{_datadir}/icons/hicolor/64x64/apps/%{name}.png
fea961a
fea961a
%files libs
fea961a
%license src/libambit/COPYING
fea961a
%{_libdir}/libambit.so.*
9fb8380
%{_libdir}/libmovescount.so.*
d75cac7
%{_udevrulesdir}/libambit.rules
fea961a
fea961a
%files devel
fea961a
%doc src/example/ambitconsole.c
fea961a
%doc tools/*
fea961a
%{_includedir}/libambit.h
9fb8380
%{_includedir}/movescount/
fea961a
%{_libdir}/libambit.so
9fb8380
%{_libdir}/libmovescount.so
fea961a
010ba85
%if 0%{?with_wireshark:1}
fea961a
%files wireshark
fea961a
%license wireshark_dissector/COPYING
8b1091d
%{_libdir}/wireshark/plugins/ambit.so
010ba85
%endif
fea961a
fea961a
fea961a
%changelog
81d6438
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-4
81d6438
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
81d6438
fd2f98b
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-3
fd2f98b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
fd2f98b
2c84bd2
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-2
2c84bd2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
2c84bd2
d7d2d1f
* Mon Dec 30 2019 Sandro Mani <manisandro@gmail.com> - 0.5-1
d7d2d1f
- Update to 0.5
d7d2d1f
d7d2d1f
* Tue Aug 13 2019 Sandro Mani <manisandro@gmail.com> - 0.4-12.git042e101
102cda5
- Update to git 042e101
102cda5
65a7322
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-11
65a7322
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
65a7322
8f32695
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-10
8f32695
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
8f32695
688f1d0
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-9
688f1d0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
688f1d0
cf609c4
* Mon Mar 19 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.4-8
cf609c4
- Update Python 2 dependency declarations to new packaging standards
cf609c4
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
cf609c4
cd94d39
* Mon Feb 19 2018 Sandro Mani <manisandro@gmail.com> - 0.4-7
cd94d39
- Add missing BR: gcc-c++, make
cd94d39
ac9de47
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-6
ac9de47
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
ac9de47
a946f17
* Thu Jan 18 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.4-5
a946f17
- Remove obsolete scriptlets
a946f17
71f54cd
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-4
71f54cd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
71f54cd
a1e75df
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-3
a1e75df
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
a1e75df
da78715
* Tue Jul 11 2017 Sandro Mani <manisandro@gmail.com> - 0.4-2
da78715
- Rebuild (wireshark)
da78715
70f7e60
* Tue Apr 25 2017 Sandro Mani <manisandro@gmail.com> - 0.4-1
70f7e60
- Update to 0.4
70f7e60
679add9
* Wed Feb 15 2017 Sandro Mani <manisandro@gmail.com> - 0.3-15.gitb44a1d0
679add9
- BR: python
679add9
7799b2e
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3-14.gitb44a1d0
7799b2e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
7799b2e
3dfba41
* Sat Nov 19 2016 Peter Robinson <pbrobinson@fedoraproject.org> 0.3-13.gitb44a1d0
3dfba41
- rebuild (wireshark)
3dfba41
9fb8380
* Wed Jun 15 2016 Sandro Mani <manisandro@gmail.com> - 0.3-12.gitb44a1d0
9fb8380
- Update to latest snapshot
4e35735
d94d520
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.3-11.git5f2b784
d94d520
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
d94d520
9624655
* Sat Jan 16 2016 Sandro Mani <manisandro@gmail.com> - 0.3-10.git5f2b784
9624655
- Rebuild (wireshark)
9624655
8b1091d
* Wed Jul 01 2015 Sandro Mani <manisandro@gmail.com> - 0.3-9.git5f2b784
8b1091d
- Install the wireshark plugin in %%{_libdir}/wireshark/plugins
8b1091d
843d301
* Mon Jun 29 2015 Sandro Mani <manisandro@gmail.com> - 0.3-8.git5f2b784
843d301
- Install the wireshark plugin in %%{_libdir}/wireshark/plugins/current
843d301
707a036
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-7.git5f2b784
707a036
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
707a036
d001a30
* Tue Jun 02 2015 Sandro Mani <manisandro@gmail.com> - 0.3-6.git5f2b784
d001a30
- Fix location where udev rules are installed
d001a30
520230e
* Fri May 15 2015 Sandro Mani <manisandro@gmail.com> - 0.3-5.git5f2b784
520230e
- Rebuild (wireshark)
520230e
c45e35f
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 0.3-4.git5f2b784
c45e35f
- Rebuilt for GCC 5 C++11 ABI change
c45e35f
bc821f5
* Sun Mar 08 2015 Sandro Mani <manisandro@gmail.com> - 0.3-3.git5f2b784
bc821f5
- Rebuild (wireshark)
bc821f5
fea961a
* Tue Jan 27 2015 Sandro Mani <manisandro@gmail.com> - 0.3-2.git5f2b784
fea961a
- Bump wireshark version
fea961a
- Fix License
fea961a
- Add openambit_strict-aliasing-fixes.patch
fea961a
- Add openambit_fix-maybe-uninitialized.patch
fea961a
- Unbundle hidapi
fea961a
fea961a
* Sat Dec 27 2014 Sandro Mani <manisandro@gmail.com> - 0.3-1.git5f2b784
fea961a
- Initial package