File file-scripts.spec of Package file-scripts
#
# spec file for package file-scripts
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: file-scripts
Version: 2.0.1
Release: 0
Summary: Set of scripts for manipulating files
License: GPL-3.0-only
Group: Productivity/File utilities
URL: https://git.its-et.me/etorres/file-scripts
Source: %{name}-%{version}.tar.gz
Requires: /usr/bin/bash
Requires: fd
Requires: fzf
BuildArch: noarch
%description
A collection of various helper scripts and some shell completions to speed up terminal workflow.
%package zsh-plugins
Summary: Zsh addons for helper scripts
Group: System/Shells
Supplements: %{name}
Requires: %{name} = %{version}
Requires: /usr/bin/zsh
%description zsh-plugins
Plugins and completions for helper scripts.
%prep
%setup -q
%build
%install
for script in bin/*; do
install -Dm755 "$script" "%{buildroot}/usr/bin/${script##*/}"
done
# Install zsh completions
zcompdir=%{buildroot}%{_datadir}/zsh/site-functions
mkdir -p "${zcompdir}"
for completion in zsh/*; do
install -Dm644 "${completion}" ${zcompdir}/${completion##*/}
done
%files
%attr(0755,-,-) %{_bindir}/*
%files zsh-plugins
%{_datadir}/zsh
%{_datadir}/zsh/site-functions
%{_datadir}/zsh/site-functions/*
%changelog