Blame qownnotes.spec

bb2fc0e
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
bb2fc0e
ExcludeArch: %{ix86}
bb2fc0e
49a3a64
# Git submodules
Packit 08e4318
%global qmarkdowntextedit_commit        6dc71db95691361ff74222276d308f443dde5a69
49a3a64
%global qmarkdowntextedit_shortcommit   %(c=%{qmarkdowntextedit_commit}; echo ${c:0:7})
49a3a64
0f1197a
%global qttoolbareditor_commit          ca0728c9924c6464234f7e477aa9509293d0a324
49a3a64
%global qttoolbareditor_shortcommit     %(c=%{qttoolbareditor_commit}; echo ${c:0:7})
49a3a64
b8e6efc
%global qtcsv_commit                    ae15c33b066fea9373a07bed5dc898c10b45ce2a
49a3a64
%global qtcsv_shortcommit               %(c=%{qtcsv_commit}; echo ${c:0:7})
49a3a64
Packit 9c2076e
%global piwiktracker_commit             955a77443dcf3ecb99bb1b7e73408e2835672b32
abac0f5
%global piwiktracker_shortcommit        %(c=%{piwiktracker_commit}; echo ${c:0:7})
49a3a64
b8e6efc
%global qkeysequencewidget_commit       8cbb54a12f33e41bf7c4795405f4235db1ee8ff1
49a3a64
%global qkeysequencewidget_shortcommit  %(c=%{qkeysequencewidget_commit}; echo ${c:0:7})
49a3a64
Packit 147a4dc
%global md4c_commit                     c64ee9ab326c53962b5bd8cca98c086461bbdd6b
5fed32a
%global md4c_shortcommit                %(c=%{md4c_commit}; echo ${c:0:7})
5fed32a
7fc896f
%global qhotkey_commit                  998c76c21bef8645802804d77e60a7dc8efcaf6f
abac0f5
%global qhotkey_shortcommit             %(c=%{qhotkey_commit}; echo ${c:0:7})
abac0f5
49a3a64
49a3a64
%global appname QOwnNotes
1e734d2
%global url1 https://github.com/pbek
1e734d2
%global forgeurl %{url1}/%{appname}
49a3a64
49a3a64
Name:           qownnotes
Packit 90bf596
Version:        24.3.3
4525746
Release:        %autorelease
49a3a64
Summary:        Plain-text file markdown note taking with Nextcloud integration
49a3a64
1e734d2
%forgemeta
1e734d2
49a3a64
# The entire source code is MIT except bundled libs:
49a3a64
# BSD:          qdarkstyle
49a3a64
#               qkeysequencewidget
49a3a64
#               qmarkdowntextedit
49a3a64
#               singleapplication
49a3a64
#               simplecrypt
679d88b
# MIT:                  piwiktracker
679d88b
#                       md4c
679d88b
# GPL-2.0-only:         versionnumber
679d88b
# GPL-3.0-or-later:     qttoolbareditor
679d88b
# LGPL-2.1-or-later:    fakevim
679d88b
# Apache-2.0:           diff_match_patch
679d88b
License:        MIT and BSD and GPL-2.0-only and GPL-3.0-or-later and LGPL-2.1-or-later and Apache-2.0
49a3a64
URL:            https://www.qownnotes.org
1e734d2
Source0:        %{forgesource}
49a3a64
Source1:        %{url1}/qmarkdowntextedit/archive/%{qmarkdowntextedit_commit}/qmarkdowntextedit-%{qmarkdowntextedit_shortcommit}.tar.gz
49a3a64
Source2:        %{url1}/Qt-Toolbar-Editor/archive/%{qttoolbareditor_commit}/qttoolbareditor-%{qttoolbareditor_shortcommit}.tar.gz
49a3a64
Source3:        %{url1}/qtcsv/archive/%{qtcsv_commit}/qtcsv-%{qtcsv_shortcommit}.tar.gz
abac0f5
Source5:        %{url1}/qt-piwik-tracker/archive/%{piwiktracker_commit}/piwiktracker-%{piwiktracker_shortcommit}.tar.gz
49a3a64
Source6:        %{url1}/qkeysequencewidget/archive/%{qkeysequencewidget_commit}/qkeysequencewidget-%{qkeysequencewidget_shortcommit}.tar.gz
5fed32a
Source7:        https://github.com/%{name}/md4c/archive/%{md4c_commit}/md4c-%{md4c_shortcommit}.tar.gz
abac0f5
Source8:        https://github.com/%{name}/QHotkey/archive/%{qhotkey_commit}/qhotkey-%{qhotkey_shortcommit}.tar.gz
49a3a64
49a3a64
BuildRequires:  cmake3
a647e19
BuildRequires:  desktop-file-utils
a647e19
BuildRequires:  gcc-c++
a647e19
BuildRequires:  libappstream-glib
a647e19
BuildRequires:  make
a647e19
49a3a64
BuildRequires:  cmake(Qt5)
a647e19
BuildRequires:  cmake(Qt5Concurrent)
49a3a64
BuildRequires:  cmake(Qt5Core)
49a3a64
BuildRequires:  cmake(Qt5DBus)
49a3a64
BuildRequires:  cmake(Qt5LinguistTools)
49a3a64
BuildRequires:  cmake(Qt5Multimedia)
49a3a64
BuildRequires:  cmake(Qt5PrintSupport)
49a3a64
BuildRequires:  cmake(Qt5Sql)
49a3a64
BuildRequires:  cmake(Qt5Svg)
49a3a64
BuildRequires:  cmake(Qt5WebSockets)
abac0f5
BuildRequires:  cmake(Qt5X11Extras)
49a3a64
BuildRequires:  cmake(Qt5Xml)
49a3a64
BuildRequires:  cmake(Qt5XmlPatterns)
0e0e8b0
5fed32a
# Switch to 'botan2'
5fed32a
# * https://github.com/pbek/QOwnNotes/issues/1263
0e0e8b0
%if 0%{?fedora} >= 32
5fed32a
BuildRequires:  pkgconfig(botan-2) >= 2.12.0
49a3a64
%endif
0e0e8b0
49a3a64
Requires:       hicolor-icon-theme
49a3a64
Requires:       qt5-qtbase%{?_isa}
3f99e37
0e0e8b0
Recommends:     %{name}-translations = %{version}-%{release}
3f99e37
49a3a64
Provides:       bundled(fakevim) = 0.0.1
5fed32a
Provides:       bundled(md4c) = 0.4.2~git%{md4c_shortcommit}
abac0f5
Provides:       bundled(qhotkey) = 1.3.0~git%{qhotkey_commit}
49a3a64
Provides:       bundled(qkeysequencewidget) = 1.0.1
176746f
Provides:       bundled(qmarkdowntextedit) = 2019.4.0~git%{qmarkdowntextedit_shortcommit}
abac0f5
Provides:       bundled(qt-piwik-tracker) = 0~git%{piwiktracker_shortcommit}
49a3a64
Provides:       bundled(qt-toolbar-editor) = 0~git%{qttoolbareditor_shortcommit}
49a3a64
Provides:       bundled(qtcsv) = 1.2.2
0e0e8b0
0e0e8b0
%if 0%{?fedora} < 32
0e0e8b0
Provides:       bundled(botan) = 2.12.0
49a3a64
%endif
49a3a64
49a3a64
%description
5fed32a
QOwnNotes is the open source notepad with markdown support and todo list manager
5fed32a
for GNU/Linux, Mac OS X and Windows, that works together with the default notes
5fed32a
application of ownCloud and Nextcloud.
49a3a64
49a3a64
You are able to write down your thoughts with QOwnNotes and edit or search for
49a3a64
them later from your mobile device, like with CloudNotes or the
5fed32a
ownCloud/Nextcloud web-service.
49a3a64
49a3a64
The notes are stored as plain text files and are synced with
5fed32a
ownCloud's/Nextcloud's file sync functionality. Of course other software, like
5fed32a
Syncthing or Dropbox can be used too.
49a3a64
49a3a64
I like the concept of having notes accessible in plain text files, like it is
5fed32a
done in the ownCloud/Nextcloud notes apps, to gain a maximum of freedom, but I
5fed32a
was not able to find a decent desktop note taking tool or a text editor, that
49a3a64
handles them well. Out of this need QOwnNotes was born.
49a3a64
49a3a64
49a3a64
%package        translations
0e0e8b0
Summary:        Translations files for %{name}
49a3a64
BuildArch:      noarch
49a3a64
49a3a64
Requires:       %{name} = %{version}-%{release}
49a3a64
49a3a64
%description    translations
49a3a64
Translations files for %{name}.
49a3a64
49a3a64
49a3a64
%prep
1e734d2
%forgeautosetup -p1
a647e19
%autosetup -n %{appname}-%{version} -D -T -a1
a647e19
%autosetup -n %{appname}-%{version} -D -T -a2
a647e19
%autosetup -n %{appname}-%{version} -D -T -a3
a647e19
%autosetup -n %{appname}-%{version} -D -T -a5
a647e19
%autosetup -n %{appname}-%{version} -D -T -a6
a647e19
%autosetup -n %{appname}-%{version} -D -T -a7
a647e19
%autosetup -n %{appname}-%{version} -D -T -a8
49a3a64
49a3a64
mv qmarkdowntextedit-%{qmarkdowntextedit_commit}/*      src/libraries/qmarkdowntextedit/
49a3a64
mv Qt-Toolbar-Editor-%{qttoolbareditor_commit}/*        src/libraries/qttoolbareditor/
49a3a64
mv qtcsv-%{qtcsv_commit}/*                              src/libraries/qtcsv/
abac0f5
mv qt-piwik-tracker-%{piwiktracker_commit}/*            src/libraries/piwiktracker/
49a3a64
mv qkeysequencewidget-%{qkeysequencewidget_commit}/*    src/libraries/qkeysequencewidget/
5fed32a
mv md4c-%{md4c_commit}/*                                src/libraries/md4c/
abac0f5
mv QHotkey-%{qhotkey_commit}/*                          src/libraries/qhotkey/
5fed32a
mkdir -p src/%{_target_platform}
49a3a64
5845b77
49a3a64
%build
abac0f5
# Build translations
abac0f5
# * https://github.com/pbek/QOwnNotes/issues/1744
abac0f5
lrelease-qt5 src/%{appname}.pro
abac0f5
5fed32a
pushd src/%{_target_platform}
b8e6efc
%qmake_qt5                        \
5fed32a
    PREFIX=%{buildroot}%{_prefix} \
5fed32a
    %if 0%{?fedora} >= 32
b8e6efc
    USE_SYSTEM_BOTAN=1            \
5fed32a
    %endif
49a3a64
    ..
49a3a64
popd
5fed32a
%make_build -C src/%{_target_platform}
49a3a64
5845b77
49a3a64
%install
5fed32a
%make_install -C src/%{_target_platform}
5fed32a
install -m 0644 -Dp obs/%{name}.appdata.xml %{buildroot}/%{_metainfodir}/%{name}.appdata.xml
49a3a64
%find_lang %{appname} --with-qt
49a3a64
5845b77
49a3a64
%check
1edc6e6
appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.xml
0e0e8b0
desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
49a3a64
5845b77
49a3a64
%files
49a3a64
%license LICENSE
4a0f05e
%doc README.md CHANGELOG.md
49a3a64
%{_bindir}/%{appname}
49a3a64
%{_datadir}/applications/*.desktop
49a3a64
%{_datadir}/icons/hicolor/*/*/*.png
5fed32a
%{_datadir}/icons/hicolor/scalable/*/*.svg
176746f
%{_metainfodir}/*.xml
49a3a64
49a3a64
%files -f %{appname}.lang translations
fff0ea3
%if 0%{?fedora} <= 34
fff0ea3
%{_datadir}/qt5/translations/%{appname}_ceb.qm
fff0ea3
%{_datadir}/qt5/translations/%{appname}_fil.qm
fff0ea3
%{_datadir}/qt5/translations/%{appname}_hil.qm
fff0ea3
%endif
0e0e8b0
49a3a64
%changelog
4525746
%autochangelog