Rewrite install commands for project restructure to bash
This commit is contained in:
parent
b18cff3ee5
commit
4d29aced79
18
PKGBUILD
18
PKGBUILD
@ -1,14 +1,12 @@
|
||||
# Maintainer: Eric Torres <erictorres4@protonmail.com>
|
||||
pkgname=file-scripts
|
||||
pkgver=1.2.0
|
||||
pkgver=2.0.0
|
||||
pkgrel=1
|
||||
pkgdesc="Various scripts for performing file-related operations such as editing and deleting."
|
||||
arch=(any)
|
||||
license=(GPL3)
|
||||
depends=(bash fd fzf mlocate python python-termcolor)
|
||||
depends=(bash fd fzf)
|
||||
makedepends=(git)
|
||||
makedepends=(git python-setuptools python-sphinx)
|
||||
checkdepends=(python-hypothesis python-pytest)
|
||||
source=("${pkgname}::git+file:///home/etorres/Projects/file-scripts")
|
||||
install=$pkgname.install
|
||||
sha256sums=('SKIP')
|
||||
@ -16,12 +14,8 @@ sha256sums=('SKIP')
|
||||
package() {
|
||||
cd "${srcdir}/${pkgname}"
|
||||
|
||||
for script in bash/bin/*; do
|
||||
install -Dm755 "$script" "$pkgdir/usr/bin/$(basename -s '.sh' "$script")"
|
||||
done
|
||||
|
||||
for libfile in bash/*.sh; do
|
||||
install -Dm644 "$libfile" "$pkgdir/usr/share/file-scripts/$(basename "$libfile")"
|
||||
for script in bin/*; do
|
||||
install -Dm755 "$script" "$pkgdir/usr/bin/$(basename "$script")"
|
||||
done
|
||||
|
||||
# Install zsh completions
|
||||
@ -29,7 +23,3 @@ package() {
|
||||
install -Dm644 "${completion}" "${pkgdir}/usr/share/zsh/site-functions/$(basename "$completion")"
|
||||
done
|
||||
}
|
||||
|
||||
#check() {
|
||||
# pytest
|
||||
#}
|
||||
|
@ -2,16 +2,15 @@ class FileScripts < Formula
|
||||
desc "Various scripts for performing file-related operations"
|
||||
homepage "https://github.com/etorres4/file-scripts"
|
||||
url "https://github.com/etorres4/file-scripts", :using => :git
|
||||
version "1.2.0"
|
||||
version "2.0.0"
|
||||
sha256 "fad7da96c72c8bef81f3ec6a2d1cb13b09fb44e084f98b05ba3a7dfd8b41ae12"
|
||||
|
||||
depends_on "fd"
|
||||
depends_on "fzf"
|
||||
#depends_on "python@3.10"
|
||||
|
||||
def install
|
||||
system Formula["python@3.10"].opt_bin/"python3", *Language::Python.setup_install_args(prefix)
|
||||
system
|
||||
# Install scripts to system
|
||||
bin.install Dir["bin/*"]
|
||||
|
||||
# Install completions to zsh/site-functions
|
||||
zsh_completion.install Dir["zsh/_*"]
|
||||
|
@ -17,25 +17,16 @@
|
||||
|
||||
|
||||
Name: file-scripts
|
||||
Version: 1.2.0
|
||||
Version: 2.0.0
|
||||
Release: 0
|
||||
Summary: Set of scripts for manipulating files
|
||||
License: GPL-3.0-only
|
||||
Group: Productivity/File utilities
|
||||
URL: https://github.com/etorres4/file-scripts
|
||||
Source: %{name}-%{version}.tar.gz
|
||||
BuildRequires: python3 >= 3.7
|
||||
BuildRequires: python3-hypothesis
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-Sphinx
|
||||
BuildRequires: python3-pytest
|
||||
BuildRequires: fdupes
|
||||
Requires: python3 >= 3.7
|
||||
Requires: /usr/bin/bash
|
||||
Requires: fd
|
||||
Requires: fzf
|
||||
Requires: mlocate
|
||||
Requires: python3-termcolor
|
||||
Supplements: zsh
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
@ -52,11 +43,10 @@ Plugins and completions for helper scripts.
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
%{python3_build}
|
||||
|
||||
%install
|
||||
%{python3_install}
|
||||
for script in bin/*; do
|
||||
install -Dm755 "$script" "%{buildroot}/usr/bin/$(basename script)"
|
||||
done
|
||||
|
||||
# Install zsh completion functions
|
||||
ZSHCOMPLETIONDIR="%{buildroot}%{_datadir}/zsh/site-functions"
|
||||
@ -66,15 +56,8 @@ for completion in zsh/*; do
|
||||
install -Dm644 "${completion}" "${ZSHCOMPLETIONDIR}/${completion##*.}"
|
||||
done
|
||||
|
||||
%fdupes %{buildroot}/%{_prefix}
|
||||
|
||||
%check
|
||||
pytest
|
||||
|
||||
#%%files %%{python_files} (bug)
|
||||
%files
|
||||
%attr(0755,-,-) %{_bindir}/*
|
||||
/usr/lib/python3*/*
|
||||
|
||||
%files zsh-plugins
|
||||
%{_datadir}/zsh/
|
||||
|
@ -15,7 +15,7 @@ with open("README", "r") as fh:
|
||||
# ========== Package Setup ==========
|
||||
setuptools.setup(
|
||||
name="file_scripts",
|
||||
version="1.2.0",
|
||||
version="2.0.0",
|
||||
author="Eric Torres",
|
||||
author_email="erictorres4@protonmail.com",
|
||||
description="File-related helper scripts",
|
||||
|
Loading…
x
Reference in New Issue
Block a user