From 9fb83808a226384f867baf188f8900fe07888f4a Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Jul 15 2016 21:19:59 +0000 Subject: Update to latest git --- diff --git a/.gitignore b/.gitignore index 7890ec8..69a95e0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /5f2b7840d91121b44a9a16ac6d945b103a94c5a3.tar.gz +/openambit-b44a1d0.tar.gz diff --git a/openambit.spec b/openambit.spec index ed27751..0aa1fac 100644 --- a/openambit.spec +++ b/openambit.spec @@ -1,5 +1,5 @@ -%global commit 5f2b7840d91121b44a9a16ac6d945b103a94c5a3 +%global commit b44a1d0c8134fe793e5f46d646236043b0904b7c %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: openambit @@ -9,18 +9,12 @@ Summary: Open software for the Suunto Ambit(2) License: GPLv3+ URL: http://openambit.org/ -Source0: https://github.com/openambitproject/openambit/archive/%{?commit:%commit}%{!?commit:%version}.tar.gz +Source0: https://github.com/openambitproject/openambit/archive/%{?commit:%commit}%{!?commit:%version}/openambit-%{?commit:%shortcommit}%{!?commit:%version}.tar.gz -# Fix some issues with the desktop file (upstreamed) -Patch0: openambit_desktop-file.patch # Add appdata file -Patch1: openambit_appdata.patch -# Fix -Wstrict-aliasing issues, see https://github.com/openambitproject/openambit/pull/90 -Patch2: openambit_strict-aliasing-fixes.patch -# Fix -Wmaybe-uninitialized, see https://github.com/openambitproject/openambit/pull/91 -Patch3: openambit_fix-maybe-uninitialized.patch +Patch0: openambit_appdata.patch # Unbundle hidapi (see also %%prep) -Patch4: openambit_unbundle-hidapi.patch +Patch1: openambit_unbundle-hidapi.patch BuildRequires: cmake BuildRequires: desktop-file-utils @@ -72,9 +66,6 @@ which parses pcap-files made with usbpcap. %setup -q -n %{name}-%{?commit:%commit}%{!?commit:%version} %patch0 -p1 %patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 # Remove exec permissions since it is installed as %%doc chmod -x tools/movescountXmlDiff.pl @@ -89,15 +80,23 @@ mkdir src/libambit-build ( cd src/libambit-build %cmake -DCMAKE_INSTALL_UDEVRULESDIR=%{_udevrulesdir} ../libambit -make %{?_smp_mflags} +%make_build ) -# openambit +# movescount +mkdir src/movescount-build +( +cd src/movescount-build +%cmake ../movescount +%make_build +) + +# openambit mkdir src/openambit-build ( cd src/openambit-build %cmake ../openambit -make %{?_smp_mflags} +%make_build ) # wireshark dissector @@ -105,12 +104,13 @@ mkdir wireshark_dissector-build ( cd wireshark_dissector-build %cmake ../wireshark_dissector -make %{?_smp_mflags} +%make_build ) %install %make_install -C src/libambit-build +%make_install -C src/movescount-build %make_install -C src/openambit-build install -Dpm 0755 wireshark_dissector-build/ambit.so %{buildroot}%{_libdir}/wireshark/plugins/ambit.so @@ -150,13 +150,16 @@ fi %files libs %license src/libambit/COPYING %{_libdir}/libambit.so.* +%{_libdir}/libmovescount.so.* %{_udevrulesdir}/libambit.rules %files devel %doc src/example/ambitconsole.c %doc tools/* %{_includedir}/libambit.h +%{_includedir}/movescount/ %{_libdir}/libambit.so +%{_libdir}/libmovescount.so %files wireshark %license wireshark_dissector/COPYING @@ -164,8 +167,8 @@ fi %changelog -* Wed Jun 15 2016 Sandro Mani - 0.3-12.git5f2b784 -- Rebuild (wireshark) +* Wed Jun 15 2016 Sandro Mani - 0.3-12.gitb44a1d0 +- Update to latest snapshot * Thu Feb 04 2016 Fedora Release Engineering - 0.3-11.git5f2b784 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild diff --git a/openambit_desktop-file.patch b/openambit_desktop-file.patch deleted file mode 100644 index bf92980..0000000 --- a/openambit_desktop-file.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -rupN openambit-5f2b7840d91121b44a9a16ac6d945b103a94c5a3/src/openambit/deployment/openambit.desktop openambit-5f2b7840d91121b44a9a16ac6d945b103a94c5a3-new/src/openambit/deployment/openambit.desktop ---- openambit-5f2b7840d91121b44a9a16ac6d945b103a94c5a3/src/openambit/deployment/openambit.desktop 2014-12-03 10:46:16.000000000 +0100 -+++ openambit-5f2b7840d91121b44a9a16ac6d945b103a94c5a3-new/src/openambit/deployment/openambit.desktop 2014-12-27 19:10:41.234500885 +0100 -@@ -1,9 +1,9 @@ - [Desktop Entry] --Version=HEAD -+Version=1.0 - Type=Application - Name=Openambit - Comment=Open source synchronization for Suunto Ambit series - TryExec=openambit - Exec=openambit - Icon=openambit --Categories=Utility;Education;Sports -+Categories=Utility;Education;Sports; diff --git a/openambit_fix-maybe-uninitialized.patch b/openambit_fix-maybe-uninitialized.patch deleted file mode 100644 index bdce45c..0000000 --- a/openambit_fix-maybe-uninitialized.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 4b534d7fdc1937929d237ca8382b8b346656e5b4 Mon Sep 17 00:00:00 2001 -From: Sandro Mani -Date: Tue, 27 Jan 2015 11:13:39 +0100 -Subject: [PATCH] Fix -Wmaybe-uninitialized - ---- - src/libambit/device_support.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/libambit/device_support.c b/src/libambit/device_support.c -index 7ffe615..2d589e9 100644 ---- a/src/libambit/device_support.c -+++ b/src/libambit/device_support.c -@@ -79,7 +79,7 @@ bool libambit_device_support_known(uint16_t vendor_id, uint16_t product_id) - - const ambit_known_device_t *libambit_device_support_find(uint16_t vendor_id, uint16_t product_id, const char *model, const uint8_t *fw_version) - { -- ambit_known_device_t *device; -+ ambit_known_device_t *device = NULL; - int i; - - for (i=0; i -Date: Tue, 27 Jan 2015 10:42:16 +0100 -Subject: [PATCH] -Wstrict-aliasing fixes - ---- - src/libambit/device_driver_common.c | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -diff --git a/src/libambit/device_driver_common.c b/src/libambit/device_driver_common.c -index 951ac33..859efb3 100644 ---- a/src/libambit/device_driver_common.c -+++ b/src/libambit/device_driver_common.c -@@ -24,6 +24,7 @@ - #include "debug.h" - - #include -+#include - - /* - * Local definitions -@@ -70,23 +71,25 @@ int libambit_device_driver_date_time_set(ambit_object_t *object, struct tm *tm) - { - uint8_t date_data[8] = { 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00 }; - uint8_t time_data[8]; -+ uint16_t year = htole16(1900 + tm->tm_year); -+ uint16_t sec = htole16(1000*tm->tm_sec); - int ret = -1; - - LOG_INFO("Writing date and time to clock"); - - // Set date -- *(uint16_t*)(&date_data[0]) = htole16(1900 + tm->tm_year); -+ memcpy(&date_data[0], &year, sizeof(uint16_t)); - date_data[2] = 1 + tm->tm_mon; - date_data[3] = tm->tm_mday; - // byte[4-7] unknown (but set to 0x28000000 in moveslink) - - // Set time (+date) -- *(uint16_t*)(&time_data[0]) = htole16(1900 + tm->tm_year); -+ memcpy(&time_data[0], &year, sizeof(uint16_t)); - time_data[2] = 1 + tm->tm_mon; - time_data[3] = tm->tm_mday; - time_data[4] = tm->tm_hour; - time_data[5] = tm->tm_min; -- *(uint16_t*)(&time_data[6]) = htole16(1000*tm->tm_sec); -+ memcpy(&time_data[6], &sec, sizeof(uint16_t)); - - if (libambit_protocol_command(object, ambit_command_date, date_data, sizeof(date_data), NULL, NULL, 0) == 0 && - libambit_protocol_command(object, ambit_command_time, time_data, sizeof(time_data), NULL, NULL, 0) == 0) { --- -2.2.2 - diff --git a/sources b/sources index dc48b25..0ef25fd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -13a901258715d8551e4e707ee58d5f64 5f2b7840d91121b44a9a16ac6d945b103a94c5a3.tar.gz +63011f7c1e7da5e05fc6b4888a2c8df9 openambit-b44a1d0.tar.gz