diff --git a/.gitignore b/.gitignore index 2786763..89e44a3 100644 --- a/.gitignore +++ b/.gitignore @@ -18,5 +18,3 @@ task-1.9.2.tar.gz /task-2.5.1.tar.gz /task-2.5.3.tar.gz /task-2.6.2.tar.gz -/task-3.4.1.tar.gz -/task-3.4.1-vendored.tar.xz diff --git a/create-vendored-tarball.sh b/create-vendored-tarball.sh deleted file mode 100755 index d981ad5..0000000 --- a/create-vendored-tarball.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -# Copyright 2025 Ankur Sinha -# Author: Ankur Sinha -# File : create-vendored-tarball.sh - -if [ 1 -ne $# ] -then - echo "One argument required: version" - exit -1 -fi - - -VERSION="$1" -PACKAGE="task" - -echo "Creating vendored tarball for ${PACKAGE} version ${VERSION}" - -tar -xvf "${PACKAGE}-${VERSION}.tar.gz" -pushd "${PACKAGE}-${VERSION}" - cargo vendor --versioned-dirs - tar -Jcvf ../"${PACKAGE}-${VERSION}-vendored.tar.xz" vendor/ -popd - -echo "Vendored tarball created" -echo "Please remember to upload this using 'fedpkg sources' also" diff --git a/sources b/sources index 4fc4906..93c5c82 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (task-3.4.1.tar.gz) = 5a6479e2afcd5142e88349b792e00fcab4d54f6762db5be00221685a93baa3332a4a410b82f66679c15eff58a43be0e175cea440b2d7befbf4e9b723a695a869 -SHA512 (task-3.4.1-vendored.tar.xz) = 7e64f2b2523441a2a5ae9177fa6d9dc235f1d8bbb5f9706b6c79f674c6aa269b956949ab4266bd3205bd3dc8fefb604b5c2d61e82b2de20c7b15cd1f0ee92589 +SHA512 (task-2.6.2.tar.gz) = 3c592552c1baada09ef4e06cf2266c9897ffae42a75998b70767f2cfbabd2e1de7d1a900f16f3b8eb164ce19637dabd21e246f84732a20a646f39716895cdf98 diff --git a/task.spec b/task.spec index ab7224a..0424d7d 100644 --- a/task.spec +++ b/task.spec @@ -1,73 +1,16 @@ -%global forgeurl https://github.com/GothenburgBitFactory/taskwarrior - Name: task -Version: 3.4.1 +Version: 2.6.2 Release: %autorelease Summary: Taskwarrior - a command-line TODO list manager - -# (Apache-2.0 OR MIT) AND BSD-3-Clause -# 0BSD OR MIT OR Apache-2.0 -# Apache-2.0 -# Apache-2.0 AND ISC -# Apache-2.0 OR BSL-1.0 -# Apache-2.0 OR ISC OR MIT -# Apache-2.0 OR MIT -# Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT -# BSD-2-Clause OR Apache-2.0 OR MIT -# BSD-3-Clause -# ISC -# ISC AND (Apache-2.0 OR ISC) -# ISC AND (Apache-2.0 OR ISC) AND OpenSSL -# MIT -# MIT OR Apache-2.0 -# MIT OR Zlib OR Apache-2.0 -# MPL-2.0 -# Unicode-3.0 -# Unlicense OR MIT -# Zlib - -License: %{shrink: - MIT AND - (Apache-2.0 OR MIT) AND BSD-3-Clause AND - (0BSD OR MIT OR Apache-2.0) AND - Apache-2.0 AND - Apache-2.0 AND ISC AND - (Apache-2.0 OR BSL-1.0) AND - (Apache-2.0 OR ISC OR MIT) AND - (Apache-2.0 OR MIT) AND - (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND - (BSD-2-Clause OR Apache-2.0 OR MIT) AND - BSD-3-Clause AND - ISC AND - ISC AND (Apache-2.0 OR ISC) AND - ISC AND (Apache-2.0 OR ISC) AND OpenSSL AND - MIT AND - (MIT OR Apache-2.0) AND - (MIT OR Zlib OR Apache-2.0) AND - MPL-2.0 AND - Unicode-3.0 AND - (Unlicense OR MIT) AND - Zlib -} +License: MIT URL: https://taskwarrior.org -# use manually released tar because it includes the sub-module -Source0: https://github.com/GothenburgBitFactory/taskwarrior/releases/download/v%{version}/%{name}-%{version}.tar.gz -# generated with script below -Source1: %{name}-%{version}-vendored.tar.xz -# To create a tarball with all crates vendored (like https://src.fedoraproject.org/rpms/loupe/blob/rawhide/f/loupe.spec) -Source2: create-vendored-tarball.sh - -# ix86: leaf removal -# does not build on s390x and ppc64 -ExcludeArch: %{ix86} s390x %{power64} +Source0: %{url}/download/%{name}-%{version}.tar.gz BuildRequires: cmake -BuildRequires: corrosion BuildRequires: gcc-c++ BuildRequires: libuuid-devel - -BuildRequires: cargo-rpm-macros >= 24 +BuildRequires: gnutls-devel %description Taskwarrior is a command-line TODO list manager. It is flexible, fast, @@ -79,77 +22,51 @@ capabilities though, and it becomes a sophisticated data query tool that can help you stay organized, and get through your work. %prep -%autosetup -n %{name}-%{version} -p1 -a1 - -echo "Running cargo prep" -%{cargo_prep -v vendor} - -echo "Checking generated cargo.toml" -cat .cargo/config.toml - -echo "Checking directory contents" -ls -lash -ls -lash vendor/ - -# Fix perms and drop shebangs for scripts that users are meant to copy over to -# use -find scripts/ -type f -exec chmod -x {} ';' -find scripts/ -type f -exec sed -i -e '1{\@^#!.*@d}' {} ';' -sed -i -e '1{\@^#!.*@d}' doc/rc/refresh - -# exclude scripts for updating holiday data -rm -rf ./doc/rc/refresh -rm -rf ./scripts/addons +%autosetup %build -# critical, doesn't work without this -export CARGO_HOME=%{_builddir}/%{name}-%{version}/.cargo -%cmake -%cmake_build -j1 - -%cargo_license_summary -%{cargo_license} > LICENSE.dependencies -%cargo_vendor_manifest +%cmake -DTASK_RCDIR=share/%{name} +%cmake_build %install -export CARGO_HOME=%{_builddir}/%{name}-%{version}/.cargo %cmake_install # Move shell completion stuff to the right place -install -p -m 0755 -d $RPM_BUILD_ROOT/%{bash_completions_dir}/ -install -D -p -m 0644 $RPM_BUILD_ROOT/%{_pkgdocdir}/scripts/bash/%{name}.sh $RPM_BUILD_ROOT%{bash_completions_dir}/%{name} +mkdir -p %{buildroot}%{_datadir}/zsh/site-functions/ +install -Dpm0644 scripts/zsh/_%{name} %{buildroot}%{_datadir}/zsh/site-functions/_%{name} +mkdir -p %{buildroot}%{_datadir}/bash-completion/completions/ +install -Dpm0644 scripts/bash/%{name}.sh %{buildroot}%{_datadir}/bash-completion/completions/%{name} +mkdir -p %{buildroot}%{_datadir}/fish/completions/ +install -Dpm0644 scripts/fish/%{name}.fish %{buildroot}%{_datadir}/fish/completions/%{name}.fish -install -p -m 0755 -d $RPM_BUILD_ROOT/%{fish_completions_dir}/ -install -D -p -m 0644 $RPM_BUILD_ROOT/%{_pkgdocdir}/scripts/fish/%{name}.fish $RPM_BUILD_ROOT%{fish_completions_dir}/%{name}.fish +# Fix perms and drop shebangs +# that's only docs and it's written in README about permissings +find scripts/ -type f -exec chmod -x {} ';' +find scripts/ -type f -exec sed -i -e '1{\@^#!.*@d}' {} ';' -# move bits to expected locations: keep this similar to task2 -install -p -m 0755 -d $RPM_BUILD_ROOT/%{_datadir}/%{name} -install -p -m 0644 $RPM_BUILD_ROOT/%{_pkgdocdir}/rc/* -t $RPM_BUILD_ROOT/%{_datadir}/%{name}/ - -# clean up -rm -rfv $RPM_BUILD_ROOT/%{_pkgdocdir}/rc -rm -fv $RPM_BUILD_ROOT/%{_pkgdocdir}/INSTALL -rm -fv $RPM_BUILD_ROOT/%{_pkgdocdir}/LICENSE -rm -frv $RPM_BUILD_ROOT/%{_pkgdocdir}/scripts/{bash,fish} +rm -vrf %{buildroot}%{_datadir}/doc/%{name}/ %files %license LICENSE -%license LICENSE.dependencies -%license cargo-vendor.txt +%doc NEWS doc/ref/%{name}-ref.pdf +%doc scripts/vim/ scripts/hooks/ %{_bindir}/%{name} +# We don't want to have refresh script there +%exclude %{_datadir}/%{name}/refresh +%{_datadir}/%{name}/ %{_mandir}/man1/%{name}.1* %{_mandir}/man5/%{name}rc.5* %{_mandir}/man5/%{name}-color.5* %{_mandir}/man5/%{name}-sync.5* %dir %{_datadir}/zsh/ -%dir %{zsh_completions_dir} -%{zsh_completions_dir}/_%{name} -%dir %{bash_completions_dir} -%{bash_completions_dir}/%{name} -%dir %{fish_completions_dir} -%{fish_completions_dir}/%{name}.fish -%{_datadir}/%{name} -%{_pkgdocdir} +%dir %{_datadir}/zsh/site-functions/ +%{_datadir}/zsh/site-functions/_%{name} +%dir %{_datadir}/bash-completion/ +%dir %{_datadir}/bash-completion/completions/ +%{_datadir}/bash-completion/completions/%{name} +%dir %{_datadir}/fish/ +%dir %{_datadir}/fish/completions/ +%{_datadir}/fish/completions/%{name}.fish %changelog %autochangelog