Blob Blame History Raw
# As of 2021-08-11, mkdocs and many of its dependencies are orphaned.
%bcond_with mkdocs

Name:           jrnl
Version:        2.8.3
Release:        %autorelease
Summary:        A simple journal application for the command line

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

BuildArch:      noarch

BuildRequires:  python3-devel

BuildRequires:  help2man

%{name} 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

%package doc
Summary:        Documentation for %{name}

%if %{with mkdocs}
BuildRequires:  mkdocs

%description doc
The %{name}-doc package contains detailed documentation for %{name}.

%autosetup -n %{name}-%{version}

%pyproject_buildrequires -x testing


help2man --no-info '%{python3} -m %{name}' --output='%{name}.1'

%if %{with mkdocs}
mkdocs build

%pyproject_save_files %{name}

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

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

%files -f %{pyproject_files}

%files doc
%if %{with mkdocs}
%doc site/
%doc docs/