diff --git a/.gitignore b/.gitignore index 966b221..0706042 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,6 @@ /vit-2.2.0.tar.gz /vit-2.3.0.tar.gz /vit-2.3.1.tar.gz +/vit-2.3.2.tar.gz +/vit-2.3.3.tar.gz +/vit-2.3.4.tar.gz diff --git a/.packit.yaml b/.packit.yaml index 3611b61..0f2991e 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -1,8 +1,13 @@ upstream_project_url: https://github.com/scottkosty/vit copy_upstream_release_description: false +upstream_tag_template: v{version} jobs: - job: pull_from_upstream trigger: release + dist_git_branches: + - fedora-rawhide + - job: koji_build + trigger: commit dist_git_branches: - fedora-all diff --git a/README.packit b/README.packit new file mode 100644 index 0000000..1d61730 --- /dev/null +++ b/README.packit @@ -0,0 +1,3 @@ +This repository is maintained by packit. +https://packit.dev/ +The file was generated using packit 1.15.1.post1.dev4+g9380a86a0. diff --git a/sources b/sources index c7cc17e..eb18df6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vit-2.3.1.tar.gz) = bf05e6995d0e684538531618ef163b2bec8fe4e0699dab425399ec2256d5c152b68df22773a7e216a9a1cb33a1d334a0e18f47dcb6b9ef80e2c0f6272f2471ac +SHA512 (vit-2.3.4.tar.gz) = 76682a39dad16f2921f16066d1ab0e4f7253b545a78bf357716895e1118f8dfba8dfad7d125f33f952f754238afe3fee54f76375d18e80a6b9b8e7c0fba05325 diff --git a/vit.spec b/vit.spec index 1ed61dc..7ee60b5 100644 --- a/vit.spec +++ b/vit.spec @@ -1,18 +1,24 @@ Name: vit -Version: 2.3.1 +%global forgeurl https://github.com/scottkosty/%{name} +Version: 2.3.4 Release: %autorelease Summary: Visual Interactive Taskwarrior full-screen terminal interface +%forgemeta +# spdx License: MIT -URL: https://github.com/scottkosty/%{name} -Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz +URL: %forgeurl +Source0: %forgesource BuildArch: noarch BuildRequires: python3-devel BuildRequires: help2man -BuildRequires: task -Requires: task + +# use the newest task release +BuildRequires: (task >= 3 or task2) +# either of these will do, depends on the user +Requires: (task >= 3 or task2) %{?python_provide:%python_provide python3-vit} @@ -30,7 +36,7 @@ Features: %prep -%autosetup +%forgesetup rm -rf vit.egg-info # Comment out to remove /usr/bin/env shebangs @@ -48,7 +54,7 @@ find vit/ -type f -name "*.py" -exec sed -i '/^#![ ]*\/usr\/bin\/env.*$/ d' {} %pyproject_save_files vit # Install bashcompletion -install -m 0644 -p -D -t $RPM_BUILD_ROOT/%{_datadir}/bash-completion/completions/vit/ scripts/bash/%{name}.bash_completion +install -m 0644 -p -D -T scripts/bash/%{name}.bash_completion $RPM_BUILD_ROOT/%{bash_completions_dir}/vit # generate man pages for binary in "vit" @@ -61,11 +67,29 @@ done %check LC_ALL=C PYTHONPATH=. %{__python3} -m unittest +# https://docs.fedoraproject.org/en-US/packaging-guidelines/Directory_Replacement/ +%pretrans -p + +path = "%{bash_completions_dir}/vit" +st = posix.stat(path) +if st and st.type == "directory" then + status = os.rename(path, path .. ".rpmmoved") + if not status then + suffix = 0 + while not status do + suffix = suffix + 1 + status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix) + end + os.rename(path, path .. ".rpmmoved") + end +end + %files -f %{pyproject_files} %doc README.md CUSTOMIZE.md COLOR.md DEVELOPMENT.md UPGRADE.md %{_bindir}/%{name} -%{_datadir}/bash-completion/completions/%{name} +%{bash_completions_dir}/%{name} %{_mandir}/man1/vit* +%ghost %{bash_completions_dir}/%{name}.rpmmoved %changelog %autochangelog