Chris Weyl f77c65d
Name:           Zim
ae5cf4a
Version:        0.75.2
ee45600
Release:        %autorelease
Chris Weyl f77c65d
Summary:        Desktop wiki & notekeeper
Chris Weyl f77c65d
557a9d3
# Most source code is GPL-2.0-or-later
557a9d3
# ./zim/plugins/pageindex/generictreemodel,.py is LGPL-2.1-or-later
557a9d3
# Some icons are MIT
557a9d3
License:        GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT
6dde23b
URL:            http://zim-wiki.org/
c1f4e36
Source0:        http://www.zim-wiki.org/downloads/zim-%{version}.tar.gz
3ba1b6d
# Prevent ABRT from triggering on expected errors (rhbz#2213835)
3ba1b6d
Patch:          https://github.com/zim-desktop-wiki/zim-desktop-wiki/pull/2482.patch
0c1114d
# Improve screenshot on Wayland
0c1114d
Patch:          https://github.com/zim-desktop-wiki/zim-desktop-wiki/pull/2431.patch
a17d963
# Avoid unhandled exception (and thus crash report) when cancelling template copy
a17d963
Patch:          https://github.com/zim-desktop-wiki/zim-desktop-wiki/pull/2505.patch
a935d64
# Not needed for multilib
a935d64
ExcludeArch:    %{ix86}
Chris Weyl f77c65d
BuildArch:      noarch
6dde23b
6dde23b
BuildRequires:  desktop-file-utils
cb65d0c
BuildRequires:  python3-devel
cb65d0c
BuildRequires:  python3-gobject
14da932
BuildRequires:  python3-setuptools
334a1d8
BuildRequires:  gtk3, python3-pyxdg
2a41cab
# for tests
785b50e
BuildRequires:  /usr/bin/xvfb-run
785b50e
BuildRequires:  glibc-langpack-en
cb65d0c
334a1d8
Requires:       python3-gobject
cb65d0c
Requires:       gtk3, python3-pyxdg
2a41cab
Recommends:     libappindicator-gtk3
Chris Weyl 0606a8d
Chris Weyl f77c65d
%description
cb65d0c
Zim is a WYSIWYG text editor written in Python which aims to bring the
Chris Weyl f77c65d
concept of a wiki to your desktop. Every page is saved as a text file with
Chris Weyl f77c65d
wiki markup. Pages can contain links to other pages, and are saved
Chris Weyl f77c65d
automatically. Creating a new page is as easy as linking to a non-existing
Chris Weyl 6a35c45
page. Pages are ordered in a hierarchical structure that gives it the look
Chris Weyl 6a35c45
and feel of an outliner. This tool is intended to keep track of TODO lists
6dde23b
or to serve as a personal scratch book.
Chris Weyl f77c65d
Chris Weyl f77c65d
%prep
c1f4e36
%autosetup -p1 -n zim-%{version}
Chris Weyl f77c65d
Chris Weyl f77c65d
%build
cb65d0c
./setup.py build
Chris Weyl f77c65d
Chris Weyl f77c65d
%install
Chris Weyl f77c65d
rm -rf %{buildroot}
cb65d0c
./setup.py install --root=%{buildroot} --skip-build
Chris Weyl f77c65d
6dde23b
%find_lang zim
Chris Weyl f77c65d
759e010
desktop-file-validate %{buildroot}%{_datadir}/applications/zim.desktop
Chris Weyl f77c65d
cb65d0c
%check
785b50e
LANG=en_US.UTF-8 xvfb-run ./test.py
cb65d0c
dc325d6
%if 0%{?rhel} && 0%{?rhel} <= 7
6dde23b
%post
6dde23b
update-desktop-database &> /dev/null || :
6dde23b
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
Rex Dieter fcafa7e
touch --no-create %{_datadir}/mime/packages &> /dev/null || :
6dde23b
6dde23b
%postun
6dde23b
update-desktop-database &> /dev/null || :
6dde23b
if [ $1 -eq 0 ] ; then
6dde23b
    touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
6dde23b
    gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
Rex Dieter fcafa7e
    touch --no-create %{_datadir}/mime/packages &> /dev/null || :
Rex Dieter fcafa7e
    update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
6dde23b
fi
Chris Weyl f77c65d
6dde23b
%posttrans
6dde23b
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
Rex Dieter fcafa7e
update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
dc325d6
%endif
6dde23b
6dde23b
%files -f zim.lang
334a1d8
%license LICENSE
334a1d8
%doc *.md contrib/
Chris Weyl f77c65d
%{_mandir}/man[13]/*.[13]*
Chris Weyl f77c65d
%{_bindir}/*
6dde23b
%{_datadir}/zim/
Chris Weyl f77c65d
%{_datadir}/applications/*
Chris Weyl 4983524
%{_datadir}/mime/packages/zim.xml
0fb9610
%{_datadir}/icons/hicolor/*/apps/*
0fb9610
%{_datadir}/icons/hicolor/*/mimetypes/*
cbeeeaa
# No package in Fedora provides such directories
0fb9610
%{_datadir}/icons/ubuntu-mono-*/
cb65d0c
%{python3_sitelib}/zim-*.egg-info
cb65d0c
%{python3_sitelib}/zim/
f9ef06f
%{_datadir}/metainfo/*
Chris Weyl f77c65d
Chris Weyl f77c65d
%changelog
ee45600
%autochangelog