4a2ec95
%global commit          594128de97ad818a3b013f71b1b7dac920afe044
3c3f39c
%global shortcommit     %(c=%{commit}; echo ${c:0:7})
4a2ec95
%global snapshotdate    20190311
3c3f39c
3c3f39c
Name:       quentier
3c3f39c
Summary:    Cross-platform desktop Evernote client
3c3f39c
Version:    0.4.0
4a2ec95
Release:    0.7.%{snapshotdate}.git%{shortcommit}%{?dist}
3c3f39c
3c3f39c
License:    GPLv3
3c3f39c
URL:        https://github.com/d1vanov/quentier
3c3f39c
Source0:    %{url}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
3c3f39c
fbb7777
ExclusiveArch: %{qt5_qtwebengine_arches}
fbb7777
3c3f39c
BuildRequires: cmake
3c3f39c
BuildRequires: cmake(Qt5Core)
3c3f39c
BuildRequires: cmake(Qt5Gui)
3c3f39c
BuildRequires: cmake(Qt5Widgets)
3c3f39c
BuildRequires: cmake(Qt5LinguistTools)
3c3f39c
BuildRequires: cmake(Libquentier-qt5)
3c3f39c
BuildRequires: cmake(QEverCloud-qt5)
3c3f39c
BuildRequires: cmake(Qt5Network)
3c3f39c
BuildRequires: cmake(Qt5PrintSupport)
3c3f39c
BuildRequires: cmake(Qt5Xml)
3c3f39c
BuildRequires: cmake(Qt5Xml)
3c3f39c
BuildRequires: cmake(Qt5Sql)
3c3f39c
BuildRequires: cmake(Qt5Test)
3c3f39c
BuildRequires: cmake(Qt5LinguistTools)
3c3f39c
BuildRequires: cmake(Qt5DBus)
3c3f39c
BuildRequires: cmake(Qt5WebEngine)
3c3f39c
BuildRequires: cmake(Qt5WebEngineCore)
3c3f39c
BuildRequires: cmake(Qt5WebEngineWidgets)
3c3f39c
BuildRequires: cmake(Qt5WebSockets)
3c3f39c
BuildRequires: cmake(Qt5WebChannel)
3c3f39c
BuildRequires: cmake(libxml2)
3c3f39c
BuildRequires: cmake(QEverCloud-qt5)
3c3f39c
BuildRequires: cmake(Qt5Keychain)
3c3f39c
BuildRequires: pkgconfig(hunspell)
3c3f39c
BuildRequires: pkgconfig(openssl)
3c3f39c
BuildRequires: boost-devel
3c3f39c
BuildRequires: libtidy-devel
3c3f39c
BuildRequires: libappstream-glib
3c3f39c
BuildRequires: desktop-file-utils
3c3f39c
3c3f39c
Requires:      hicolor-icon-theme
3c3f39c
Requires:      oxygen-icon-theme
3c3f39c
Requires:      tango-icon-theme
3c3f39c
3c3f39c
3c3f39c
%description
3c3f39c
Quentier is a cross-platform desktop note taking app capable of working as 
3c3f39c
Evernote client. You can also use Quentier for local notes without any 
3c3f39c
connection to Evernote and synchronization.
3c3f39c
3c3f39c
3c3f39c
%prep
3c3f39c
%autosetup -p1 -n %{name}-%{commit}
3c3f39c
3c3f39c
sed -i "/tango.qrc/d; /oxygen.qrc/d" CMakeLists.txt
3c3f39c
sed -i "s/QStringLiteral(\"tango\")/QStringLiteral(\"Tango\")/" src/MainWindow.cpp
3c3f39c
3c3f39c
3c3f39c
%build
3c3f39c
mkdir build && cd build
3c3f39c
%cmake ../  -DQt5_LUPDATE_EXECUTABLE=%{_bindir}/lupdate-qt5 \
3c3f39c
            -DQt5_LRELEASE_EXECUTABLE=%{_bindir}/lrelease-qt5
3c3f39c
%make_build
3c3f39c
make lupdate
3c3f39c
make lrelease
3c3f39c
3c3f39c
3c3f39c
%install
3c3f39c
pushd build
3c3f39c
%make_install
3c3f39c
popd
3c3f39c
3c3f39c
rm -rf %{buildroot}%{_datadir}/icons/hicolor/1024x1024
3c3f39c
3c3f39c
for size in "16x16" "22x22" "32x32" ; do
3c3f39c
    for icon in "actions/mail-send.png" \
3c3f39c
                "actions/checkbox.png" \
3c3f39c
                "actions/format-list-ordered.png" \
3c3f39c
                "actions/format-list-unordered.png" \
3c3f39c
                "actions/tools-check-spelling.png" \
3c3f39c
                "actions/insert-horizontal-rule.png" \
3c3f39c
                "actions/format-text-color.png" \
3c3f39c
                "actions/fill-color.png" \
3c3f39c
                "actions/insert-table.png" \
3c3f39c
                "mimetypes/application-pdf.png" \
3c3f39c
                "mimetypes/application-enex.png" ; do
3c3f39c
        install -Dpm 0644 resource/icons/themes/tango/$size/$icon %buildroot%{_datadir}/icons/Tango/$size/$icon
3c3f39c
    done
3c3f39c
done
3c3f39c
for size in "16x16" "22x22" "32x32" ; do
3c3f39c
    install -Dpm 0644 resource/icons/themes/oxygen/$size/mimetypes/application-enex.png %buildroot%{_datadir}/icons/oxygen/$size/mimetypes/application-enex.png
3c3f39c
done
3c3f39c
3c3f39c
3c3f39c
%check
3c3f39c
desktop-file-validate %{buildroot}%{_datadir}/applications/org.quentier.Quentier.desktop
a267d3f
appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/org.quentier.Quentier.appdata.xml
3c3f39c
3c3f39c
3c3f39c
%files
3c3f39c
%doc CONTRIBUTING.md CodingStyle.md README.md
3c3f39c
%license COPYING
3c3f39c
%{_bindir}/%{name}
3c3f39c
%{_datadir}/applications/org.quentier.Quentier.desktop
3c3f39c
%{_datadir}/icons/hicolor/*/apps/%{name}*.png
3c3f39c
%{_datadir}/icons/oxygen/
3c3f39c
%{_datadir}/icons/Tango/
a267d3f
%{_metainfodir}/org.quentier.Quentier.appdata.xml
3c3f39c
%dir %{_datadir}/quentier
3c3f39c
%{_datadir}/quentier/translations
3c3f39c
3c3f39c
3c3f39c
%changelog
4a2ec95
* Mon Mar 11 2019 Robert-André Mauchin <zebob.m@gmail.com> - 0.4.0-0.7.20190311git594128d
4a2ec95
- Bump to 594128de97ad818a3b013f71b1b7dac920afe044
4a2ec95
9fdab41
* Mon Sep 03 2018 Robert-André Mauchin <zebob.m@gmail.com> - 0.4.0-0.6.20180903git5342a4f
9fdab41
- Bump to 5342a4f72a7f0f9d1b77391c8ec7bedf41a3613c
9fdab41
96f463b
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.0-0.5.20180622.git5a92775
96f463b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
96f463b
a267d3f
* Fri Jun 22 2018 Robert-André Mauchin <zebob.m@gmail.com> - 0.4.0-0.4.20180622git5a92775
a267d3f
- Bump to 5a9277504a6a68da0a490f755e036561270094c7
a267d3f
60ab29d
* Thu Mar 08 2018 Robert-André Mauchin <zebob.m@gmail.com> - 0.4.0-0.3.20180301git8226e31
a267d3f
- Bump to 8226e3174607c2ef0ed3e32e57fe09484e6d2c0e
3c3f39c
60ab29d
* Tue Feb 27 2018 Robert-André Mauchin <zebob.m@gmail.com> - 0.4.0-0.2.20180227gite72d0e4
a267d3f
- Bump to e72d0e45d908b4246dba79939db01931504e9d0a
3c3f39c
60ab29d
* Fri Feb 02 2018 Robert-André Mauchin <zebob.m@gmail.com> - 0.4.0-0.1.20180128git442947d
3c3f39c
- Initial RPM release.