[packages/toggl-desktop] up to 7.1.146, uses qt5 now

glen glen at pld-linux.org
Fri Dec 5 14:29:09 CET 2014


commit c499facf220fc2667f4f3619803cc935a4b18ce3
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Fri Dec 5 15:26:36 2014 +0200

    up to 7.1.146, uses qt5 now

 toggl-desktop.spec | 90 +++++++++++++++++++++++++++++++++++++++++-------------
 1 file changed, 69 insertions(+), 21 deletions(-)
---
diff --git a/toggl-desktop.spec b/toggl-desktop.spec
index 0740a31..dfbd01f 100644
--- a/toggl-desktop.spec
+++ b/toggl-desktop.spec
@@ -1,48 +1,96 @@
-%define		qtver	4.6
+# TODO
+# - third party:
+#pocodir=third_party/poco
+#openssldir=third_party/openssl
+#jsoncppdir=third_party/jsoncpp/dist
+
+%define		qtver	5.2
 Summary:	Desktop client for the Toggle time tracking service
 Name:		toggl-desktop
-Version:	2.5.2.0
-Release:	0.1
+Version:	7.1.146
+Release:	0.3
 License:	LGPL v2.1
 Group:		X11/Applications
-# bzr branch lp:toggl-desktop # version from version.cpp
-Source0:	%{name}-%{version}.tar.xz
-# Source0-md5:	94f53c166d109037d0bf753fd7021c48
-URL:		https://launchpad.net/toggl-desktop
-BuildRequires:	QtCore-devel >= %{qtver}
-BuildRequires:	QtCore-devel >= %{qtver}
-BuildRequires:	QtGui-devel >= %{qtver}
-BuildRequires:	QtNetwork-devel >= %{qtver}
-BuildRequires:	QtNetwork-devel >= %{qtver}
-BuildRequires:	QtWebKit-devel >= %{qtver}
-BuildRequires:	qt4-qmake >= %{qtver}
+# https://www.toggl.com/tour/desktop
+Source0:	https://github.com/toggl/toggldesktop/archive/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5:	b83b3e97e8aefd6d9280357a541aa2d1
+URL:		https://github.com/toggl/toggldesktop
+BuildRequires:	Qt5Core-devel >= %{qtver}
+BuildRequires:	Qt5Gui-devel >= %{qtver}
+BuildRequires:	Qt5Network-devel >= %{qtver}
+BuildRequires:	Qt5Network-devel >= %{qtver}
+BuildRequires:	Qt5WebKit-devel >= %{qtver}
+BuildRequires:	poco-devel
+BuildRequires:	qt5-qmake >= %{qtver}
+BuildRequires:	rpmbuild(macros) >= 1.583
 BuildRequires:	tar >= 1:1.22
 BuildRequires:	xorg-lib-libXScrnSaver-devel
 BuildRequires:	xz
-Requires:	QtCore >= %{qtver}
+Requires:	Qt5Core >= %{qtver}
+Requires:	ca-certificates
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+# Unresolved symbols found in: sqlite3_threadsafe
+%define		skip_post_check_so	libTogglDesktopLibrary.so.1.0.0
+
 %description
 Toggl Desktop allows you to run Toggl Timer on the desktop. The
 application supports both the classic Timer and the new Nano.
 
 %prep
-%setup -q -n %{name}
+%setup -q -n toggldesktop-%{version}
+
+%{__sed} -i -e 's,cxx=g++,cxx=$(CXX),' Makefile
+%{__sed} -i -e 's,cflags=-g,cflags=-g $(CXXFLAGS),' Makefile
 
 %build
-qmake-qt4
-%{__make}
+# NOTE: do not redefine CXXFLAGS, as it would ovewrite DEFINES, however
+# CXXFLAGS are from qt5 build time, so they are "optimized" already.
+
+cd src/lib/linux/TogglDesktopLibrary
+qmake-qt5
+cd -
+%{__make} -C src/lib/linux/TogglDesktopLibrary
+	CXX="%{__cxx}" \
+	QMAKE=qmake-qt5 \
+
+%{__make} -j1 \
+	CXX="%{__cxx}" \
+	QMAKE=qmake-qt5 \
+	ui
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%{__make} install \
-	INSTALL_ROOT=$RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_desktopdir}}
+
+install -p src/ui/linux/TogglDesktop/build/release/TogglDesktop \
+	$RPM_BUILD_ROOT%{_bindir}
+
+cp -a src/lib/linux/TogglDesktopLibrary/build/release/* \
+	$RPM_BUILD_ROOT%{_libdir}
+
+cp -a third_party/bugsnag-qt/build/release/* \
+	$RPM_BUILD_ROOT%{_libdir}
+
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libTogglDesktopLibrary.so
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libTogglDesktopLibrary.so.1.0
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libbugsnag-qt.so
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libbugsnag-qt.so.1.0
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
 %files
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/TogglDesktop
+%attr(755,root,root) %{_libdir}/libTogglDesktopLibrary.so.*.*.*
+%ghost %{_libdir}/libTogglDesktopLibrary.so.1
 %{_desktopdir}/TogglDesktop.desktop
-%{_pixmapsdir}/TogglDesktop.png
+%{_iconsdir}/hicolor/*/toggldesktop.png
+
+# third party
+%ghost %{_libdir}/libbugsnag-qt.so.1
+%attr(755,root,root) %{_libdir}/libbugsnag-qt.so.*.*.*
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/toggl-desktop.git/commitdiff/d3643851c0a6c691ef6e2e2dff334242289c56a5



More information about the pld-cvs-commit mailing list