nheko/nheko.spec

114 lines
3.7 KiB
RPMSpec
Raw Normal View History

2018-02-02 13:35:59 +00:00
# Git revision of lmdbxx...
%global commit1 0b43ca87d8cfabba392dfe884eb1edb83874de02
%global shortcommit1 %(c=%{commit1}; echo ${c:0:7})
# Git revision of matrix-structs...
2018-03-05 10:26:26 +00:00
%global commit2 a84b37215ead77620dcddc0789c4b9b443757a17
2018-02-02 13:35:59 +00:00
%global shortcommit2 %(c=%{commit2}; echo ${c:0:7})
Summary: Desktop client for the Matrix protocol
Name: nheko
2018-03-05 10:26:26 +00:00
Version: 0.2.0
Release: 1%{?dist}
2018-02-02 13:35:59 +00:00
# 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 (json) - MIT -- build-time dependency (header-only);
# * S3 (variant) - Boost 1.0 -- build-time dependency (header-only).
# 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
URL: https://github.com/mujx/nheko
# Use ./gen_libs.sh script from repository to generate tarball with header-only libraries...
2018-03-05 10:26:26 +00:00
Source0: %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
2018-02-02 13:35:59 +00:00
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: header_only.tar.gz
Source4: gen_libs.sh
2018-03-05 10:26:26 +00:00
Patch0: %{name}-drop-flags.patch
Patch1: %{name}-drop-rpath.patch
2018-02-02 13:35:59 +00:00
BuildRequires: cmake(Qt5Widgets)
BuildRequires: cmake(Qt5Network)
BuildRequires: cmake(Qt5Multimedia)
BuildRequires: cmake(Qt5Concurrent)
BuildRequires: cmake(Qt5LinguistTools)
BuildRequires: desktop-file-utils
BuildRequires: libappstream-glib
BuildRequires: ninja-build
BuildRequires: lmdb-devel
2018-03-05 10:26:26 +00:00
BuildRequires: doxygen
2018-02-02 13:35:59 +00:00
BuildRequires: gcc-c++
BuildRequires: cmake
BuildRequires: gcc
Requires: hicolor-icon-theme
%description
The motivation behind the project is to provide a native desktop app
2018-02-16 15:27:26 +00:00
for Matrix that feels more like a mainstream chat app.
2018-02-02 13:35:59 +00:00
%prep
# Unpacking main tarball with sources...
2018-03-05 10:26:26 +00:00
%autosetup -p1
mkdir {%{_target_platform},.third-party}
sed -i '/GIT_/d' cmake/*.cmake
2018-02-02 13:35:59 +00:00
2018-03-05 10:26:26 +00:00
# Unpacking third-party modules...
pushd ".third-party"
2018-02-02 13:35:59 +00:00
tar -xf %{SOURCE1}
mv lmdbxx-%{commit1} lmdbxx
tar -xf %{SOURCE2}
2018-03-05 10:26:26 +00:00
mv matrix-structs-%{commit2} matrix_structs
pushd matrix_structs
2018-02-02 13:35:59 +00:00
sed -i 's@add_library(${LIBRARY_NAME} ${SRC})@add_library(${LIBRARY_NAME} STATIC ${SRC})@g' CMakeLists.txt
tar -xf %{SOURCE3}
popd
popd
%build
pushd %{_target_platform}
%cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ..
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
%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
2018-03-05 10:26:26 +00:00
* Mon Mar 05 2018 Vitaly Zaitsev <vitaly@easycoding.org> - 0.2.0-1
- Updated to version 0.2.0.
2018-02-02 13:35:59 +00:00
* Thu Dec 28 2017 Vitaly Zaitsev <vitaly@easycoding.org> - 0.1.0-1
- Updated to version 0.1.0.
* Mon Sep 25 2017 Vitaly Zaitsev <vitaly@easycoding.org> - 0-1.20170924git9def76a
- Initial SPEC release.