File nixnote2.spec of Package nixnote2
#
# spec file for package nixnote2
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: nixnote2
Version: 2.0
Release: 0
Summary: A clone of Evernote for Linux
License: GPL-2.0+
Group: Productivity/Text/Editors
Url: https://github.com/baumgarr/nixnote2
Source: %{name}-%{version}.tar.xz
BuildRequires: cmake
BuildRequires: cmake(Qt5LinguistTools)
BuildRequires: gcc-c++
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(Qt5PrintSupport)
BuildRequires: pkgconfig(Qt5WebKit)
BuildRequires: pkgconfig(Qt5WebKitWidgets)
BuildRequires: pkgconfig(Qt5Sql)
BuildRequires: pkgconfig(Qt5Network)
BuildRequires: pkgconfig(Qt5Xml)
BuildRequires: pkgconfig(Qt5DBus)
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(hunspell)
BuildRequires: pkgconfig(poppler-qt5)
BuildRequires: boost-devel
BuildRequires: opencv-qt5-devel
BuildRequires: libtidy-devel
BuildRequires: update-desktop-files
BuildRequires: fdupes
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
An unofficial client of Evernote for Linux.
%lang_package
%prep
%setup -q
sed -i '/translations\.files/s/\*$/\*.qm/' NixNote2.pro
%build
lrelease-qt5 NixNote2.pro
%qmake5 PREFIX=%{_prefix} NixNote2.pro
make %{?_smp_mflags}
pushd plugins/hunspell
%qmake5 Hunspell.pro
make %{?_smp_mflags}
popd
#pushd plugins/webcam
#%%qmake5 WebCam.pro
#make %%{?_smp_mflags}
#popd
%install
%qmake5_install
install -Dm 0755 plugins/libhunspellplugin.so %{buildroot}%{_libdir}/%{name}/plugins/libhunspellplugin.so
#install -Dm 0755 plugins/libwebcamplugin.so %%{buildroot}%%{_libdir}/%%{name}/plugins/libwebcamplugin.so
install -Dm 0644 images/%{name}.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
install -Dm 0644 man/%{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1
%suse_update_desktop_file -r %{name} Qt Utility TextEditor
%fdupes %{buildroot}%{_datadir}/%{name}
%find_lang %{name} --with-qt
%files
%defattr(-,root,root)
%doc changelog.txt colors.txt copyright gpl.txt license.html README.* shortcuts*.txt theme.ini
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_libdir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%{_mandir}/man?/%{name}.?%{ext_man}
%exclude %{_datadir}/%{name}/translations
%files lang -f %{name}.lang
%defattr(-,root,root)
%dir %{_datadir}/%{name}/translations
%changelog