9b7b1a9
Name:           jrnl
60b6696
Version:        2.8.1
40ba7dc
Release:        3%{?dist}
c992fdd
Summary:        A simple journal application for the command line
c992fdd
c992fdd
License:        GPLv3
c992fdd
URL:            https://%{name}.sh
c992fdd
%global forgeurl https://github.com/%{name}-org/%{name}/
c992fdd
Source0:        %{forgeurl}/archive/v%{version}/%{name}-%{version}.tar.gz
9b7b1a9
9b7b1a9
BuildArch:      noarch
9b7b1a9
9b7b1a9
BuildRequires:  python3-devel
c992fdd
BuildRequires:  pyproject-rpm-macros
c992fdd
c992fdd
BuildRequires:  python3dist(pytest)
c992fdd
c992fdd
BuildRequires:  help2man
9b7b1a9
9b7b1a9
%description
c992fdd
%{name} is a simple journal application for the command line.
c992fdd
c992fdd
You can use it to easily create, search, and view journal entries. Journals are
c992fdd
stored as human-readable plain text, and can also be encrypted using AES
c992fdd
encryption.
c992fdd
c992fdd
c992fdd
%package doc
c992fdd
Summary:        Documentation for %{name}
c992fdd
c992fdd
BuildRequires:  mkdocs
c992fdd
c992fdd
%description doc
c992fdd
The %{name}-doc package contains detailed documentation for %{name}.
c992fdd
9b7b1a9
9b7b1a9
%prep
9b7b1a9
%autosetup -n %{name}-%{version}
c992fdd
c992fdd
# Loosen too-strict and fairly arbitrary upstream dependency version
c992fdd
# requirements as needed.
60b6696
%if 0%{?fedora} && 0%{?fedora} <= 35
40ba7dc
sed -r -i \
40ba7dc
    -e 's/^(tzlocal = ")>(2.0, <3.0".*)$/\1>=\2/' \
40ba7dc
    -e 's/(python = ">=3\.7\.0), <3\.10"/\1"/' \
40ba7dc
    pyproject.toml
60b6696
%endif
60b6696
%if 0%{?fedora} && 0%{?fedora} <= 34
60b6696
sed -r -i -e 's/^(pyxdg = ">=0.)27(.0".*)$/\126\2/' pyproject.toml
60b6696
%endif
60b6696
%if 0%{?fedora} && 0%{?fedora} <= 33
c992fdd
sed -r -i \
c992fdd
    -e 's/("poetry>=1.)1"/\10.10"/' \
c992fdd
    -e 's/^(parsedatetime = ">=2.)6(".*)$/\15\2/' \
c992fdd
    pyproject.toml
c992fdd
%endif
c992fdd
c992fdd
# Find non-executable files with shebang lines, and remove them
c992fdd
find %{name}/ -type f ! -perm /0111 |
c992fdd
  while read -r fn
c992fdd
  do
c992fdd
    if head "${fn}" | grep -E '^#!' >/dev/null
c992fdd
    then
c992fdd
      sed -r -i '1{/#!/d}' "${fn}"
c992fdd
    fi
c992fdd
  done
c992fdd
# Fix any remaining shebangs.
c992fdd
%py3_shebang_fix %{name}
c992fdd
c992fdd
c992fdd
%generate_buildrequires
c992fdd
%pyproject_buildrequires -r
c992fdd
9b7b1a9
9b7b1a9
%build
c992fdd
%pyproject_wheel
c992fdd
c992fdd
# https://github.com/jrnl-org/jrnl/issues/74
c992fdd
help2man --no-info '%{python3} -m %{name}' --output='%{name}.1'
c992fdd
c992fdd
mkdocs build
c992fdd
9b7b1a9
9b7b1a9
%install
c992fdd
%pyproject_install
c992fdd
%pyproject_save_files %{name}
9b7b1a9
c992fdd
install -D -t '%{buildroot}%{_mandir}/man1' -p -m 0644 '%{name}.1'
c992fdd
c992fdd
c992fdd
%check
c992fdd
%pytest
c992fdd
c992fdd
c992fdd
%files -f %{pyproject_files}
00e9454
%license LICENSE.md
9b7b1a9
%{_bindir}/%{name}
c992fdd
%{_mandir}/man1/%{name}.1*
c992fdd
c992fdd
c992fdd
%files doc
c992fdd
%license LICENSE.md
c992fdd
%doc CHANGELOG.md
c992fdd
%doc CODE_OF_CONDUCT.md
c992fdd
%doc CONTRIBUTING.md
c992fdd
%doc README.md
c992fdd
%doc site/
c992fdd
9b7b1a9
9b7b1a9
%changelog
40ba7dc
* Thu Jun 24 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 2.8.1-3
40ba7dc
- Loosen Python version restriction to allow 3.10
40ba7dc
ed218a4
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 2.8.1-2
ed218a4
- Rebuilt for Python 3.10
ed218a4
60b6696
* Sun Apr 25 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 2.8.1-1
60b6696
- New upstream version 2.8.1
60b6696
- No longer need to patch pyxdg requirement on Fedora 35
60b6696
aa695e4
* Sat Apr 10 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 2.8-2
aa695e4
- Drop workarounds for Fedora 32
aa695e4
c992fdd
* Wed Apr 07 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 2.8-1
c992fdd
- New upstream release 2.8 (with license change, MIT to GPLv3)
c992fdd
- Switch URL to HTTPS
c992fdd
- Use GitHub tarball instead of PyPI tarball to get documentation and tests
c992fdd
- Build with pyproject-rpm-macros (no setup.py)
c992fdd
- Adjust spec file whitespace to personal preference
c992fdd
- Update summary and description from upstream
c992fdd
- Add CHANGELOG.md, CODE_OF_CONDUCT.md, CONTRIBUTING.md
c992fdd
- Add a new -doc subpackage and build the HTML documentation
c992fdd
- Run the tests
c992fdd
- Generate and install a man page
c992fdd
8bbf39e
* Wed Feb 10 2021 Fabian Affolter <mail@fabian-affolter.ch> - 2.7-1
5ef0541
- Update to latest upstream release 2.7 (#1907094)
8bbf39e
9b07c30
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.5-2
9b07c30
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
9b07c30
Koji Builder 43baac2
* Sat Nov 28 2020 Fabian Affolter <mail@fabian-affolter.ch> - 2.5-1
8bbf39e
- Update to latest upstream release 2.5 (#1875713)
Koji Builder 43baac2
60fd1da
* Fri Sep 04 2020 Fabian Affolter <mail@fabian-affolter.ch> - 2.4.5-2
60fd1da
- Fix requirement for dependency generator
60fd1da
ad41072
* Sun Aug 23 2020 Fabian Affolter <mail@fabian-affolter.ch> - 2.4.5-1
Koji Builder 43baac2
- Update to latest upstream release 2.4.5 (#1875713)
ad41072
16230b5
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.4-3
16230b5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
16230b5
da11afb
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 2.4-2
da11afb
- Rebuilt for Python 3.9
da11afb
006111e
* Fri May 01 2020 Fabian Affolter <mail@fabian-affolter.ch> - 2.4-1
006111e
- Update to latest upstream release 2.4
006111e
23ee83a
* Sat Mar 28 2020 Fabian Affolter <mail@fabian-affolter.ch> - 2.3-1
Koji Builder 43baac2
- Remove release pinning (#1803355)
23ee83a
- Update to latest upstream release 2.3
23ee83a
cf0fd77
* Thu Feb 06 2020 Fabian Affolter <mail@fabian-affolter.ch> - 2.2-1
Koji Builder 43baac2
- Fix build failure (#1791686)
cf0fd77
- Update to latest upstream release 2.2
cf0fd77
1749144
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.1-2
1749144
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
1749144
c96f76a
* Mon Jan 06 2020 Fabian Affolter <mail@fabian-affolter.ch> - 2.1.1-1
c96f76a
- Update to latest upstream release 2.1.1
c96f76a
fa299b9
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.9.8-4
fa299b9
- Rebuilt for Python 3.8.0rc1 (#1748018)
fa299b9
574a39c
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.9.8-3
574a39c
- Rebuilt for Python 3.8
574a39c
e340d44
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.8-2
e340d44
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
e340d44
9b7b1a9
* Sat May 25 2019 Fabian Affolter <mail@fabian-affolter.ch> - 1.9.8-1
9b7b1a9
- Initial package for Fedora