This repository has been archived by the owner on May 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 291
/
Copy pathPKGBUILD
51 lines (42 loc) · 1.71 KB
/
PKGBUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Maintainer: Alexander Epaneshnikov <[email protected]>
# Contributor: Eli Schwartz <[email protected]>
# Contributor: Pierre Neidhardt <[email protected]>
# Contributor: Renato Garcia <[email protected]>
pkgname=trash-cli
pkgver=0.23.2.13.2
pkgrel=2
pkgdesc="Command line trashcan (recycle bin) interface"
arch=('any')
url="https://github.com/andreafrancia/trash-cli"
license=('GPL')
depends=('python-psutil' 'python-six')
makedepends=('python-setuptools' 'python-shtab')
checkdepends=('python-pytest' 'python-flexmock' 'python-parameterized')
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz")
sha256sums=('98123bedccd88a970d78f696b4211669593d21e1e2e64f86f9546bf680a29bf2')
prepare() {
cd "${srcdir}"/${pkgname}-${pkgver}
# don't depend on thirdparty copies of the stdlib
find tests -type f -name "*.py" -exec \
sed -i 's/^import mock$/from unittest import mock/;s/from mock /from unittest.mock /;s/from mock.mock /from unittest.mock /' {} +
}
build() {
cd "${srcdir}"/${pkgname}-${pkgver}
python setup.py build
for cmd in trash-empty trash-list trash-restore trash-put trash; do
./$cmd --print-completion bash > ./$cmd-completion
./$cmd --print-completion zsh > ./_$cmd-completion
done
}
check() {
cd "${srcdir}"/${pkgname}-${pkgver}
python -m pytest
}
package(){
cd "${srcdir}"/${pkgname}-${pkgver}
python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
for cmd in trash-empty trash-list trash-restore trash-put trash; do
install -vDm 644 ./$cmd-completion "$pkgdir/usr/share/bash-completion/completions/$cmd"
install -vDm 644 ./_$cmd-completion "$pkgdir/usr/share/zsh/site-functions/_$cmd"
done
}