diff --git a/.gitignore b/.gitignore index 2dabbac..17190bd 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ /nheko-0.4.2.tar.gz /matrix-structs-eeb7373.tar.gz /nheko-0.4.3.tar.gz +/nheko-0.5.1.tar.gz diff --git a/gen_libs.sh b/gen_libs.sh deleted file mode 100644 index fdd8c83..0000000 --- a/gen_libs.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -set -e - -echo -n "Setting some constants..." -RESDIR=include -echo " Done." - -echo -n "Downloading header-only libraries..." -mkdir $RESDIR -wget https://github.com/nlohmann/json/releases/download/v3.1.2/json.hpp -O $RESDIR/json.hpp 2> /dev/null -wget https://github.com/mpark/variant/releases/download/v1.3.0/variant.hpp -O $RESDIR/variant.hpp 2> /dev/null -echo " Done." - -echo -n "Generating tarball..." -nf=header_only-$(cat $RESDIR/*.hpp | sha256sum | awk '{print substr ($1, 0, 7)}').tar.gz -tar czf header_only.tar.gz $RESDIR -mv header_only.tar.gz $nf -echo " Done." - -echo -n "Removing temporary files..." -rm -rf $RESDIR -echo " Done." - -echo "Result: $nf" diff --git a/nheko-drop-flags.patch b/nheko-drop-flags.patch deleted file mode 100644 index 8253a1e..0000000 --- a/nheko-drop-flags.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 0328a5760d98aeb854b42cdad4f9bb1d492fb171 Mon Sep 17 00:00:00 2001 -From: Vitaly Zaitsev -Date: Tue, 12 Dec 2017 15:25:45 +0100 -Subject: [PATCH 1/2] Completely remove additional CXXFLAGS. - ---- - cmake/CompilerFlags.cmake | 8 -------- - 1 file changed, 8 deletions(-) - -diff --git a/cmake/CompilerFlags.cmake b/cmake/CompilerFlags.cmake -index f5860a9..d27e009 100644 ---- a/cmake/CompilerFlags.cmake -+++ b/cmake/CompilerFlags.cmake -@@ -1,12 +1,4 @@ - if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU") -- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \ -- -Wall \ -- -Wextra \ -- -Werror \ -- -pipe \ -- -Wno-unused-function \ -- -pedantic \ -- -Wunreachable-code") - - if(CMAKE_CXX_COMPILER_ID MATCHES "GNU") - execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) --- -2.17.0 - diff --git a/nheko-drop-rpath.patch b/nheko-drop-rpath.patch deleted file mode 100644 index 4a31280..0000000 --- a/nheko-drop-rpath.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 73575d75621855e910564cece5166d71ef02d559 Mon Sep 17 00:00:00 2001 -From: Vitaly Zaitsev -Date: Sat, 16 Dec 2017 18:20:43 +0100 -Subject: [PATCH 2/2] Remove rpath. - ---- - CMakeLists.txt | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index fffe0f7..93c1843 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -361,3 +361,4 @@ if(UNIX AND NOT APPLE) - COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) - endif() - endif() -+set_target_properties(nheko PROPERTIES SKIP_BUILD_RPATH TRUE) --- -2.17.0 - diff --git a/nheko-fix-quit.patch b/nheko-fix-quit.patch deleted file mode 100644 index be6fe8d..0000000 --- a/nheko-fix-quit.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 363e3735f13fb5d2f03078bfc7146dd0487bd6ce Mon Sep 17 00:00:00 2001 -From: Konstantinos Sideris -Date: Wed, 11 Jul 2018 20:55:13 +0300 -Subject: [PATCH] Allow close events from the session manager (#353) - ---- - include/MainWindow.h | 2 ++ - src/MainWindow.cc | 14 +++++++++----- - 2 files changed, 11 insertions(+), 5 deletions(-) - -diff --git a/include/MainWindow.h b/include/MainWindow.h -index 3840bd9..9204019 100644 ---- a/include/MainWindow.h -+++ b/include/MainWindow.h -@@ -119,6 +119,8 @@ private slots: - void restoreWindowSize(); - //! Check if there is an open dialog. - bool hasActiveDialogs() const; -+ //! Check if the current page supports the "minimize to tray" functionality. -+ bool pageSupportsTray() const; - - static MainWindow *instance_; - -diff --git a/src/MainWindow.cc b/src/MainWindow.cc -index 37739dc..37b806d 100644 ---- a/src/MainWindow.cc -+++ b/src/MainWindow.cc -@@ -277,11 +277,8 @@ MainWindow::showChatPage() - void - MainWindow::closeEvent(QCloseEvent *event) - { -- // Decide whether or not we should enable tray for the current page. -- bool pageSupportsTray = -- !welcome_page_->isVisible() && !login_page_->isVisible() && !register_page_->isVisible(); -- -- if (isVisible() && pageSupportsTray && userSettings_->isTrayEnabled()) { -+ if (!qApp->isSavingSession() && isVisible() && pageSupportsTray() && -+ userSettings_->isTrayEnabled()) { - event->ignore(); - hide(); - } -@@ -505,3 +502,10 @@ MainWindow::hasActiveDialogs() const - (!createRoomModal_.isNull() && createRoomModal_->isVisible()) || - (!logoutModal_.isNull() && logoutModal_->isVisible()); - } -+ -+bool -+MainWindow::pageSupportsTray() const -+{ -+ return !welcome_page_->isVisible() && !login_page_->isVisible() && -+ !register_page_->isVisible(); -+} diff --git a/nheko.spec b/nheko.spec index d183622..e798b9e 100644 --- a/nheko.spec +++ b/nheko.spec @@ -1,75 +1,47 @@ -# Git revision of lmdbxx... -%global commit1 0b43ca87d8cfabba392dfe884eb1edb83874de02 -%global shortcommit1 %(c=%{commit1}; echo ${c:0:7}) - -# Git revision of matrix-structs... -%global commit2 eeb7373729a1618e2b3838407863342b88b8a0de -%global shortcommit2 %(c=%{commit2}; echo ${c:0:7}) - -# Git revision of tweeny... -%global commit3 b94ce07cfb02a0eb8ac8aaf66137dabdaea857cf -%global shortcommit3 %(c=%{commit3}; echo ${c:0:7}) - -# Due to GCC 7.3.1 regression https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84785 -# build under some Fedora releases using clang. -%if 0%{?fedora} == 27 -%bcond_without clang -%else -%bcond_with clang -%endif - Summary: Desktop client for the Matrix protocol Name: nheko -Version: 0.4.3 -Release: 3%{?dist} +Version: 0.5.1 +Release: 1%{?dist} # Application and 3rd-party modules licensing: -# * S0 - GPLv3+ -- main source; -# * S1 (lmdbxx) - Public Domain -- build-time dependency (header-only); -# * S2 (matrix-structs) - Public Domain -- build-time dependency; -# * S3 (tweeny) - MIT -- build-time dependency (header-only); -# * S4 (json) - MIT -- build-time dependency (header-only); -# * S4 (variant) - Boost 1.0 -- build-time dependency (header-only). +# * S0 - GPLv3+ -- main source. # Bundled resources licensing: # * emojione-android fonts - CC by (v4.0) -- bundled resource; # * OpenSans fonts - Apache (v2.0) -- bundled resource. -License: GPLv3+ and Public Domain and MIT and Boost and ASL 2.0 and CC-BY +License: GPLv3+ and ASL 2.0 and CC-BY URL: https://github.com/mujx/nheko - -# Use ./gen_libs.sh script from repository to generate tarball with header-only libraries... Source0: %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz -Source1: https://github.com/bendiken/lmdbxx/archive/%{commit1}.tar.gz#/lmdbxx-%{shortcommit1}.tar.gz -Source2: https://github.com/mujx/matrix-structs/archive/%{commit2}.tar.gz#/matrix-structs-%{shortcommit2}.tar.gz -Source3: https://github.com/mobius3/tweeny/archive/%{commit3}.tar.gz#/tweeny-%{shortcommit3}.tar.gz -Source4: header_only-f3b7019.tar.gz -Source5: gen_libs.sh - -Patch0: %{name}-drop-flags.patch -Patch1: %{name}-drop-rpath.patch -Patch100: %{name}-fix-quit.patch BuildRequires: cmake(Qt5Svg) +BuildRequires: cmake(Qt5DBus) +BuildRequires: cmake(Qt5Core) BuildRequires: cmake(Qt5Widgets) BuildRequires: cmake(Qt5Network) BuildRequires: cmake(Qt5Multimedia) BuildRequires: cmake(Qt5Concurrent) BuildRequires: cmake(Qt5LinguistTools) +BuildRequires: spdlog-devel >= 0.16 +BuildRequires: matrix-structs-devel +BuildRequires: json-devel >= 3.1.2 +BuildRequires: mpark-variant-devel BuildRequires: desktop-file-utils BuildRequires: libappstream-glib +BuildRequires: mtxclient-devel +BuildRequires: libsodium-devel +BuildRequires: openssl-devel +BuildRequires: libolm-devel +BuildRequires: tweeny-devel +BuildRequires: lmdbxx-devel BuildRequires: ninja-build +BuildRequires: boost-devel BuildRequires: lmdb-devel +BuildRequires: zlib-devel BuildRequires: gcc-c++ -BuildRequires: doxygen BuildRequires: cmake BuildRequires: gcc -%if %{with clang} -BuildRequires: clang -BuildRequires: llvm -%endif - Requires: hicolor-icon-theme %description @@ -77,61 +49,41 @@ The motivation behind the project is to provide a native desktop app for Matrix that feels more like a mainstream chat app. %prep -# Unpacking main tarball with sources... %autosetup -p1 -mkdir {%{_target_platform},.third-party} -sed -i '/GIT_/d' cmake/*.cmake - -# Unpacking third-party modules... -pushd ".third-party" - tar -xf %{SOURCE1} - mv lmdbxx-%{commit1} lmdbxx - tar -xf %{SOURCE2} - mv matrix-structs-%{commit2} matrix_structs - tar -xf %{SOURCE3} - mv tweeny-%{commit3} tweeny - pushd matrix_structs - sed -i 's@add_library(matrix_structs ${SRC})@add_library(matrix_structs STATIC ${SRC})@g' CMakeLists.txt - sed -i '/-Werror/d' CMakeLists.txt - tar -xf %{SOURCE4} - popd -popd +mkdir -p %{_target_platform} +sed -e '/-Wall/d' -e '/-Wextra/d' -e '/-Werror/d' -e '/-pedantic/d' -e '/-pipe/d' -i CMakeLists.txt +echo "set_target_properties(nheko PROPERTIES SKIP_BUILD_RPATH TRUE)" >> CMakeLists.txt +echo "include_directories(%{_includedir}/nlohmann)" >> CMakeLists.txt +echo "include_directories(%{_includedir}/mpark)" >> CMakeLists.txt %build -%if %{with clang} -export CC=clang -export CXX=clang++ -%endif - pushd %{_target_platform} - %cmake -G Ninja -DCMAKE_BUILD_TYPE=Release .. + %cmake -G Ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DUSE_BUNDLED=OFF \ + .. popd %ninja_build -C %{_target_platform} %install -# Installing application... %ninja_install -C %{_target_platform} -# Installing additional locales... -mkdir -p "%{buildroot}%{_datarootdir}/%{name}/translations" -find %{_target_platform} -maxdepth 1 -type f -name "*.qm" -exec install -m 0644 -p '{}' %{buildroot}%{_datarootdir}/%{name}/translations \; -%find_lang %{name} --with-qt - %check appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/%{name}.appdata.xml desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop -%files -f %{name}.lang +%files %doc README.md %license LICENSE %{_bindir}/%{name} -%dir %{_datadir}/%{name} -%dir %{_datadir}/%{name}/translations %{_datadir}/metainfo/%{name}.appdata.xml %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor/*/apps/%{name}.* %changelog +* Thu Jul 26 2018 Vitaly Zaitsev - 0.5.1-1 +- Updated to version 0.5.1. + * Fri Jul 13 2018 Fedora Release Engineering - 0.4.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild diff --git a/sources b/sources index aa29a64..c71b14e 100644 --- a/sources +++ b/sources @@ -1,5 +1 @@ -SHA512 (header_only-f3b7019.tar.gz) = 8dd8a43c9cdb34992f95dd1efa6135759fbb6d0882388a25f2753855fa45b5bbc18ba2f295b5eb3c9bc08c76583a2532ead473191d9951de6d077863ff2d2909 -SHA512 (lmdbxx-0b43ca8.tar.gz) = 025a945288a398b09549c91c98509a57912f8614c14b476e7c8d4fb0dc8fc1288fa1b3a33567cccea474277a1c48b3701f2df31e8a6acc851eb9549a9822f074 -SHA512 (matrix-structs-eeb7373.tar.gz) = ab077a5c183992ff6d659b5f0d9113ae34f1ec1eb8ee42090c2322f49b82e85d71108c7ed48c3ec987fc183854414f220dfa1956ff00842d92be2c9592f4f144 -SHA512 (nheko-0.4.3.tar.gz) = b9ad4131b75af7ee3b79cb89d63313e94f76a6a6672c5c02b264ebec75a2a2525de266d6e4d07482736b714188a5a1eba721802ff951ee4d77f8cbf571758777 -SHA512 (tweeny-b94ce07.tar.gz) = 365d51311e8738f16c8b17e29fa950a1f62622c9f844d847675e36536267091fb554d8a87f89fb1a659defe7ebe30109b7630cc44753079039028d355b60f9db +SHA512 (nheko-0.5.1.tar.gz) = 1cfa961031731ba36a853d92ec3b2318b102cd161f5fdd9538057dd770ff6ad7e3a9cc624030e9f51b3ec2e1924b8c34d76a6e76b9b379d1e1b12fdd3502d79d