File libquentier.spec of Package libquentier-development
%if 0%{?fedora_version} >= 40
%global _vpath_builddir .
%endif
# OpenSUSE Leap by default ships with gcc which is too old to build
# libquentier, so require gcc-13
%if 0%{?sle_version} == 150600 && 0%{?is_opensuse} && 0%{?gcc_version} < 13
%define with_gcc 13
%endif
%define lname libqt5quentier0
Name: libquentier
Summary: Set of Qt/C++ APIs for feature rich desktop clients for Evernote service
Version: 0.8.0
Release: 1%{?dist}
Group: Development/Libraries/C and C++
%if 0%{?fedora_version}
License: GPLv3 or LGPLv3
%else
License: GPL-3.0-only or LGPL-3.0-only
%endif
URL: https://github.com/d1vanov/libquentier
Source: %{name}-%{version}.tar.gz
BuildRequires: gcc%{?with_gcc}-c++
BuildRequires: cmake
BuildRequires: cmake(Qt5Core)
BuildRequires: cmake(Qt5Gui)
BuildRequires: cmake(Qt5Widgets)
BuildRequires: cmake(Qt5Network)
BuildRequires: cmake(Qt5PrintSupport)
BuildRequires: cmake(Qt5Xml)
BuildRequires: cmake(Qt5Xml)
BuildRequires: cmake(Qt5Sql)
BuildRequires: cmake(Qt5Test)
BuildRequires: cmake(Qt5LinguistTools)
BuildRequires: cmake(Qt5DBus)
BuildRequires: cmake(Qt5WebEngine)
BuildRequires: cmake(Qt5WebEngineCore)
BuildRequires: cmake(Qt5WebEngineWidgets)
BuildRequires: cmake(Qt5WebSockets)
BuildRequires: cmake(Qt5WebChannel)
BuildRequires: cmake(QEverCloud-qt5)
BuildRequires: cmake(Qt5Keychain)
BuildRequires: coreutils
BuildRequires: pkgconfig(hunspell)
BuildRequires: pkgconfig(openssl)
BuildRequires: libxml2-devel
BuildRequires: boost-devel
BuildRequires: libtidy-devel
BuildRequires: doxygen
BuildRequires: graphviz
BuildRequires: gtest
BuildRequires: gmock
%if 0%{?fedora_version}
BuildRequires: gmock-devel
BuildRequires: gtest-devel
BuildRequires: xorg-x11-server-Xvfb
%else
%if 0%{?suse_version} > 1500
BuildRequires: libtidy58
%else
BuildRequires: libtidy5
%endif
BuildRequires: xvfb-run
BuildRequires: libQt5Sql5-sqlite
Requires: libQt5Sql5-sqlite
%endif
%description
This library presents a set of Qt/C++ APIs useful for applications working as
feature rich desktop clients for Evernote service. The most important and
useful components of the library are the following:
- Local storage - persistence of data downloaded from Evernote service in
a local SQLite database
- Synchronization - the logics of exchanging new and/or modified data
with Evernote service
- Note editor - the UI component capable for notes displaying and editing
The library is based on the lower level functionality provided by QEverCloud
library. It also serves as the functional core of Quentier application.
%package -n %{lname}
Summary: Set of Qt/C++ APIs for feature rich desktop clients for Evernote service
Group: Development/Libraries/C and C++
%if 0%{?suse_version}
Recommends: %lname-lang
%endif
%description -n %{lname}
This library presents a set of Qt/C++ APIs useful for applications working as
feature rich desktop clients for Evernote service. The most important and
useful components of the library are the following:
- Local storage - persistence of data downloaded from Evernote service in
a local SQLite database
- Synchronization - the logics of exchanging new and/or modified data
with Evernote service
- Note editor - the UI component capable for notes displaying and editing
The library is based on the lower level functionality provided by QEverCloud
library. It also serves as the functional core of Quentier application.
%package devel
Summary: Development files for %{name}
Requires: %{lname} = %{version}-%{release}
%description devel
Files for developing applications that use %{name}.
%package doc
Summary: Documentation for %{name}
%description doc
%{summary}.
%if 0%{?suse_version}
%lang_package -n %lname
%endif
%prep
%setup -q
%build
%if 0%{?fedora_version}
mkdir build && cd build
%else
%define _qt5_libdir %{_libdir}
%define _qt5_docdir %{_docdir}
%endif
%if 0%{?suse_version}
sed -i '1s/1.71/1.66/g' $(pwd)/cmake/modules/LibquentierFindBoost.cmake
sed -i '48s/${QTKEYCHAIN_LIBRARIES}/Qt5Keychain::Qt5Keychain/g' $(pwd)/cmake/modules/LibquentierFindDependencies.cmake
%endif
%if 0%{?with_gcc}
export CXX=g++-%{with_gcc}
export CC=gcc-%{with_gcc}
%endif
%if 0%{?fedora_version} >= 40
%cmake ../ -DCMAKE_INSTALL_LIBDIR=%{_qt5_libdir} \
-DQt5_LUPDATE_EXECUTABLE=%{_bindir}/lupdate-qt5 \
-DQt5_LRELEASE_EXECUTABLE=%{_bindir}/lrelease-qt5 \
-DUSE_LD_GOLD=NO \
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=$(pwd)/bin \
-DLIB_QUENTIER_BUILD_INFO="OpenSUSE build service, unstable. $(date --utc '+%Y-%m-%d %H:%M') UTC"
%else
%cmake ../ -DCMAKE_INSTALL_LIBDIR=%{_qt5_libdir} \
-DQt5_LUPDATE_EXECUTABLE=%{_bindir}/lupdate-qt5 \
-DQt5_LRELEASE_EXECUTABLE=%{_bindir}/lrelease-qt5 \
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=$(pwd)/bin \
-DLIB_QUENTIER_BUILD_INFO="OpenSUSE build service, unstable. $(date --utc '+%Y-%m-%d %H:%M') UTC" \
-DCMAKE_SHARED_LINKER_FLAGS_INIT="-ldl"
%endif
%if 0%{?sle_version} == 120300 && 0%{?is_opensuse}
make
%else
%make_build
%endif
make lupdate
make lrelease
make doc
%install
cd build
%make_install
mkdir -p %{buildroot}%{_qt5_docdir}/%{name}
cp -aR doc/html/* %{buildroot}%{_qt5_docdir}/%{name}
%post -n %{lname} -p /sbin/ldconfig
%postun -n %{lname} -p /sbin/ldconfig
%check
# For some reason xvfb-run fails to initialize GLX only on OpenSUSE Leap so skipping the check on it
%if 0%{?sle_version} == 150600 && 0%{?is_opensuse}
%else
cd build
LD_LIBRARY_PATH=$(pwd) xvfb-run ./bin/test_libquentier -platform minimal
LD_LIBRARY_PATH=$(pwd) ./bin/libqt5quentier_enml_unit_tests
LD_LIBRARY_PATH=$(pwd) ./bin/libqt5quentier_threading_unit_tests
LD_LIBRARY_PATH=$(pwd) ./bin/libqt5quentier_utility_unit_tests
LD_LIBRARY_PATH=$(pwd) ./bin/libqt5quentier_local_storage_sql_unit_tests
LD_LIBRARY_PATH=$(pwd) ./bin/libqt5quentier_synchronization_unit_tests
LD_LIBRARY_PATH=$(pwd) SYNC_INTEGRATIONAL_TESTS_USE_NETWORK_TRANSPORT_LAYER=0 \
xvfb-run ./bin/libqt5quentier_synchronization_integrational_tests -platform minimal
%endif
%files -n %{lname}
%defattr(-,root,root)
%doc CONTRIBUTING.md README.md
%license COPYING.LESSER COPYING.txt
%{_qt5_libdir}/libqt5quentier.so.*
%if 0%{?fedora_version}
%dir %{_datadir}/libquentier
%dir %{_datadir}/libquentier/translations
%{_datadir}/libquentier/translations/*.qm
%endif
%files devel
%defattr(-,root,root)
%{_includedir}/quentier
%{_qt5_libdir}/libqt5quentier.so
%{_qt5_libdir}/cmake/Libquentier-qt5/
%files doc
%defattr(-,root,root)
%doc CONTRIBUTING.md README.md
%license COPYING.LESSER COPYING.txt
%{_qt5_docdir}/%{name}
%if 0%{?suse_version}
%files -n %lname-lang
%defattr(-,root,root)
%dir %{_datadir}/libquentier
%dir %{_datadir}/libquentier/translations
%{_datadir}/libquentier/translations/*.qm
%endif
%changelog
* Sun Jan 26 2025 Dmitry Ivanov <dm.vl.ivanov@gmail.com> - 0.8.0-1
- Rewrite local storage and synchronization engine
* Sun Dec 23 2018 Dmitry Ivanov <dm.vl.ivanov@gmail.com> - 0.5.0-1
- Change the layout of note attachments local storage
* Mon Mar 12 2018 Dmitry Ivanov <dm.vl.ivanov@gmail.com> - 0.4.0-1
- Adaptation for OpenSUSE build service
* Mon Mar 05 2018 Robert-André Mauchin <zebob.m@gmail.com> - 0.4.0-0.3.20180301git4ce8e3b
- Master snapshot 4ce8e3b76bd9bedd75fe8cb398ddf2a91556b59a
* Tue Feb 27 2018 Robert-André Mauchin <zebob.m@gmail.com> - 0.4.0-0.2.20180226git5db522e
- Master snapshot 5db522e5257001f65fdcae6bc8f49956ed264623
* Fri Feb 02 2018 Robert-André Mauchin <zebob.m@gmail.com> - 0.4.0-0.1.20180130git45bb65b
- Initial RPM release.
# just some comment to trigger rebuild