Blob Blame History Raw
Name:           jrnl
Version:        2.8.4
Release:        %autorelease
Summary:        A simple journal application for the command line

License:        GPLv3
URL:            https://jrnl.sh
%global forgeurl https://github.com/jrnl-org/jrnl/
Source0:        %{forgeurl}/archive/v%{version}/jrnl-%{version}.tar.gz

# Fixed error related to display_format in config file for some values
# https://github.com/jrnl-org/jrnl/pull/1495
# Rebased to apply to the 2.8.4 release.
#
# Fixes:
#
# display_format: pretty and display_format: short lead to crash
# https://github.com/jrnl-org/jrnl/issues/1263
#
# [abrt] jrnl: _display_search_results():
#     jrnl.py:340:_display_search_results:AttributeError: 'NoneType' object has
#     no attribute 'export'
# https://bugzilla.redhat.com/show_bug.cgi?id=2039871
Patch:          jrnl-2.8.4-display_format.patch

BuildArch:      noarch

BuildRequires:  python3-devel

BuildRequires:  help2man

%description
jrnl is a simple journal application for the command line.

You can use it to easily create, search, and view journal entries. Journals are
stored as human-readable plain text, and can also be encrypted using AES
encryption.


%package doc
Summary:        Documentation for jrnl

# The mkdocs-generated HTML documentation is not suitable for packaging; see
# https://bugzilla.redhat.com/show_bug.cgi?id=2006555 for discussion.
#
# We can package the Markdown sources without building them; they are still
# relatively legible as plain text.

%description doc
The jrnl-doc package contains detailed documentation for jrnl.


%prep
%autosetup -n jrnl-%{version} -p1


%generate_buildrequires
%pyproject_buildrequires -x testing


%build
%pyproject_wheel

# https://github.com/jrnl-org/jrnl/issues/74
# https://github.com/jrnl-org/jrnl/issues/1274
help2man --no-info '%{python3} -m jrnl' --output='jrnl.1'


%install
%pyproject_install
%pyproject_save_files jrnl

install -D -t '%{buildroot}%{_mandir}/man1' -p -m 0644 'jrnl.1'


%check
export PYTHONPATH="${PWD}:%{buildroot}%{python3_sitelib}"
%pytest tests/unit
%pytest tests/bdd --gherkin-terminal-reporter


%files -f %{pyproject_files}
%license LICENSE.md
%{_bindir}/jrnl
%{_mandir}/man1/jrnl.1*


%files doc
%license LICENSE.md
%doc CHANGELOG.md
%doc CODE_OF_CONDUCT.md
%doc CONTRIBUTING.md
%doc README.md
%doc docs/


%changelog
%autochangelog