QOwnNotes/obs/qownnotes.spec

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

162 lines
4.4 KiB
RPMSpec
Raw Permalink Normal View History

2016-01-02 12:43:33 +01:00
#
2016-07-01 11:18:58 +02:00
# Spec file for package qownnotes for openSUSE Linux, Fedora Linux and CentOS 7
2016-01-02 13:40:38 +01:00
#
# Check for Linux distribution version numbers here:
# https://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto
2016-01-02 12:43:33 +01:00
#
%global lrelease_qt5 /usr/bin/lrelease-qt5
2016-01-02 12:43:33 +01:00
Name: qownnotes
BuildRequires: gcc-c++ fdupes
BuildRequires: pkgconfig(Qt5Svg)
BuildRequires: pkgconfig(Qt5Qml)
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Concurrent)
BuildRequires: pkgconfig(Qt5WebSockets)
BuildRequires: pkgconfig(Qt5X11Extras)
2016-01-02 12:43:33 +01:00
# This is for all Fedora CentOS 7
%if 0%{?fedora} || 0%{?rhel} >= 7 || 0%{?centos} >= 7
2016-01-04 10:06:47 +01:00
BuildRequires: desktop-file-utils
2019-12-03 22:02:35 +05:00
BuildRequires: aspell-devel
BuildRequires: qt5-linguist
Requires: qt5-qtsvg qt5-qtwebsockets qt5-qtx11extras
2016-01-04 10:06:47 +01:00
%else
# This is for all SUSE
BuildRequires: libqt5-qtbase-devel libqt5-qtdeclarative-devel libQt5Svg-devel libQt5X11Extras-devel libqt5-qtwebsockets-devel libqt5-linguist
2019-12-04 18:12:35 +01:00
# no aspell for SLE
%if 0%{?sle_version} == 150000 || 0%{?sle_version} == 150100 && !0%{?is_backports}
#BuildRequires: aspell-devel
%else
2019-12-03 22:02:35 +05:00
BuildRequires: libaspell15
2019-12-04 18:12:35 +01:00
%endif
2016-07-01 11:18:58 +02:00
BuildRequires: update-desktop-files
Requires: libQt5Svg5 libQt5Sql5 libQt5Sql5-sqlite libQt5Gui5 libQt5Network5 libQt5Widgets5 libQt5Xml5 libQt5PrintSupport5 libQt5WebSockets5 libQt5X11Extras5
2016-10-19 07:50:48 +02:00
# try to detect openSUSE Tumbleweed
# the way described in https://en.opensuse.org/Archive:How_to_detect_Tumbleweed didn't seem to work
#%if 0%{suse_version} > 1320
Requires: libQtQuick5
#%else
#Requires: libQt5Declarative5
#%endif
2016-01-04 10:06:47 +01:00
%endif
%if 0%{?suse_version}
Recommends: %{name}-lang
2016-01-04 09:31:47 +01:00
%endif
2016-01-02 12:43:33 +01:00
License: GPL-2.0
Group: System/GUI/Productivity
Summary: Note-taking app and todo list manager with ownCloud/Nextcloud integration
2018-09-09 08:46:11 +02:00
Url: https://www.qownnotes.org/
2016-01-02 12:43:33 +01:00
Version: VERSION-STRING
2016-07-01 11:18:58 +02:00
Release: 1%{?dist}
2016-01-02 12:43:33 +01:00
Source0: %{name}-%{version}.tar.xz
%description
2019-06-17 17:06:11 +02:00
Plain-text file markdown note taking with Nextcloud/ownCloud integration.
2016-01-02 12:43:33 +01:00
2019-06-17 17:06:11 +02:00
You are able to write down your thoughts with QOwnNotes and edit or search for them later from your mobile device (like with CloudNotes or the ownCloud/Nextcloud web-service.
2016-01-02 12:43:33 +01:00
The notes are stored as plain text files and are synced with ownCloud's/Nextcloud's file sync functionality. Of course other software, like Dropbox can be used too.
2016-01-02 12:43:33 +01:00
I like the concept of having notes accessible in plain text files, like it is done in the Nextcloud notes app, to gain a maximum of freedom, but I was not able to find a decent desktop note taking tool or a text editor, that handles them well. Out of this need QOwnNotes was born.
2016-01-02 12:43:33 +01:00
2016-01-04 10:06:47 +01:00
www.qownnotes.org
Author
======
Patrizio Bekerle <patrizio@bekerle.com>
%if 0%{?suse_version}
%lang_package
%endif
2016-01-02 12:43:33 +01:00
2018-05-13 06:45:03 +02:00
# Fedora 27 and above wasn't able to create debug packages
%if 0%{?fedora} >= 27
2017-11-27 16:49:15 +01:00
%global debug_package %{nil}
# prevent RPM build error: Installed (but unpackaged) file(s) found
%define _unpackaged_files_terminate_build 0
2017-11-27 16:49:15 +01:00
%endif
2022-07-14 18:50:05 +02:00
# Fixes: /usr/bin/ld: cannot open linker script file /home/abuild/rpmbuild/BUILD/.package_note-qownnotes-22.7.1-1.1.x86_64.ld: No such file or directory
%if 0%{?fedora} >= 36
%global _package_note_file %{_builddir}/%{name}-%{version}/.package_note-%{name}-%{version}-%{release}.%{_arch}.ld
%endif
2016-01-02 12:43:33 +01:00
%prep
2016-07-01 11:18:58 +02:00
%setup -q
2016-01-02 12:43:33 +01:00
mkdir build
pushd build
%if 0%{?fedora} || 0%{?rhel} >= 7 || 0%{?centos} >= 7
%qmake_qt5 ..
%else
%qmake5 ..
%endif
2016-01-02 12:43:33 +01:00
popd
%build
2016-01-04 10:06:47 +01:00
echo centos_version 0%{?centos_version}
echo rhel_version 0%{?rhel_version}
echo fedora 0%{?fedora}
echo suse_version 0%{?suse_version}
%{lrelease_qt5} QOwnNotes.pro
2016-01-02 12:43:33 +01:00
pushd build
CFLAGS=$RPM_OPT_FLAGS CCFLAGS=$CFLAGS
2016-01-04 11:04:42 +01:00
%if 0%{?fedora} || 0%{?rhel} >= 7 || 0%{?centos} >= 7
2016-01-04 11:04:42 +01:00
make
%else
2016-01-02 12:43:33 +01:00
%make_jobs
2016-01-04 11:04:42 +01:00
%endif
2016-01-02 12:43:33 +01:00
popd
%install
pushd build
export INSTALL_ROOT=%{buildroot}
%make_install
2016-01-02 12:43:33 +01:00
popd
2016-01-04 09:43:49 +01:00
%if 0%{?suse_version}
2018-06-17 09:20:13 +02:00
# see: https://de.opensuse.org/openSUSE:Paketbauvereinbarungen_zu_RPM-Makros
%suse_update_desktop_file -c PBE.QOwnNotes QOwnNotes QOwnNotes QOwnNotes QOwnNotes "Utility;SyncUtility;"
2016-01-04 09:43:49 +01:00
%endif
%find_lang QOwnNotes --with-qt
2016-01-02 12:43:33 +01:00
%fdupes $RPM_BUILD_ROOT/%{_prefix}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
2020-03-10 19:06:28 +01:00
%doc LICENSE README.md CHANGELOG.md shortcuts.md
2016-01-02 12:43:33 +01:00
%{_bindir}/QOwnNotes
%{_datadir}/icons/hicolor/
%{_datadir}/icons/hicolor/scalable/apps/QOwnNotes.svg
%{_datadir}/icons/hicolor/*/apps/*.png
%{_datadir}/applications/PBE.QOwnNotes.desktop
%if 0%{?fedora} || 0%{?rhel} >= 7 || 0%{?centos} >= 7
%{_datadir}/qt5/
%else
%files lang -f QOwnNotes.lang
%{_datadir}/qt5/
%endif
2016-01-02 12:43:33 +01:00
%changelog