blob: 82f01e2420b5ea59a85775d142efbc5a59e726e5 (
plain)
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
|
# Maintainer: Vitalii Kuzhdin <vitaliikuzhdin@gmail.com>
_name="sixelcrop"
_pkgname="python-${_name}"
pkgname="${_pkgname}-git"
pkgver=0.1.8.r0.g3fb9c8e
pkgrel=1
pkgdesc="Crop sixel images in sixel-space"
arch=('any')
url="https://github.com/joouha/${_name}"
license=('MIT')
makedepends=('git' 'python-build' 'python-installer' 'python-wheel'
'python-hatchling')
depends=('python>=3.7')
provides=("${_pkgname}=${pkgver%%.r*}")
conflicts=("${_pkgname}")
_pkgsrc="${_name}"
source=("${_pkgsrc}::git+${url}.git")
sha256sums=('SKIP')
pkgver() {
cd "${_name}"
git describe --long --tags --abbrev=7 | sed 's/v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
git -C "${srcdir}/${_pkgsrc}" clean -dfx
}
build() {
cd "${srcdir}/${_pkgsrc}"
python -m build --wheel --no-isolation
}
package() {
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
cd "${srcdir}/${_pkgsrc}"
python -m installer --destdir="${pkgdir}" dist/*.whl
install -Dm644 "README.md" "${pkgdir}/usr/share/doc/${_pkgname}/README.md"
install -d "${pkgdir}/usr/share/licenses/${_pkgname}"
ln -s "${site_packages}/${_name}-${pkgver%%.r*}.dist-info/licenses/LICENSE.txt" \
"${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
}
|