Merge branch 'master' of github.com:etorres4/file-scripts

This commit is contained in:
Eric Torres 2021-12-21 00:30:37 -08:00
commit 07604923d1
2 changed files with 12 additions and 22 deletions

View File

@ -22,21 +22,10 @@ package() {
python setup.py build python setup.py build
python setup.py --root="$pkgdir" install python setup.py --root="$pkgdir" install
## Install /etc/config files
#install -dm755 "${pkgdir}/etc/helper-scripts"
#for config in config/*; do
# install -m644 "${config}" "${pkgdir}/etc/helper-scripts/${config##*/}"
#done
## Install zsh completions ## Install zsh completions
#for completion in zsh/completions/*; do #for completion in zsh; do
# install -m644 "${completion}" "${pkgdir}/usr/share/zsh/site-functions/${plugin##*.}" # install -m644 "${completion}" "${pkgdir}/usr/share/zsh/site-functions/${plugin##*.}"
#done #done
## Install zsh plugins
#for plugin in zsh/plugins/*; do
# install -m644 "${plugin}" "${pkgdir}/usr/share/zsh/plugins/helper-scripts/${plugin##*/}"
#done
} }
check() { check() {

View File

@ -23,8 +23,11 @@ Summary: Eric's helper scripts
License: GPL-3.0-only License: GPL-3.0-only
Group: Productivity/File utilities Group: Productivity/File utilities
Source: %{name}-%{version}.tar.gz Source: %{name}-%{version}.tar.gz
BuildRequires: python3
BuildRequires: python3-setuptools
BuildRequires: python3-Sphinx
Requires: %{_bindir}/python3 Requires: %{_bindir}/python3
Requires:: fd Requires: fd
Recommends: fzf Recommends: fzf
Supplements: bash Supplements: bash
Supplements: zsh Supplements: zsh
@ -45,28 +48,26 @@ Plugins and completions for helper scripts.
%setup -q %setup -q
%build %build
%{python3_build}
%install %install
%{python_install} %{python3_install}
# Install zsh plugins
ZSHPLUGINDIR='%{buildroot}%{_datadir}/zsh/plugins/helper-scripts'
mkdir -p "${ZSHPLUGINDIR}"
cp zsh/plugins/* "${ZSHPLUGINDIR}"
# Install zsh completion functions # Install zsh completion functions
ZSHCOMPLETIONDIR="%{buildroot}%{_datadir}/zsh/site-functions" ZSHCOMPLETIONDIR="%{buildroot}%{_datadir}/zsh/site-functions"
mkdir -p "${ZSHCOMPLETIONDIR}" mkdir -p "${ZSHCOMPLETIONDIR}"
cp zsh/completions/* "${ZSHCOMPLETIONDIR}" for completion in zsh/*; do
install -Dm644 "${completion}" "${ZSHCOMPLETIONDIR}/${completion##*.}"
done
%check %check
# %files %%{python_files} (bug)
%files %files
%attr(0755,-,-) %{_bindir}/* %attr(0755,-,-) %{_bindir}/*
/usr/lib/python3*/*
%files zsh-plugins %files zsh-plugins
%{_datadir}/zsh/plugins/helper-scripts/*
%{_datadir}/zsh/site-functions/* %{_datadir}/zsh/site-functions/*
%changelog %changelog