jobextra/python-pyexiftool/PKGBUILD

43 lines
1.5 KiB
Bash

#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgbase=pyexiftool
_pkgname=PyExifTool
pkgname='python-pyexiftool'
pkgver=0.5.4
pkgrel=02
pkgdesc="Library to communicate with an instance of ExifTool command-line application"
arch=('any')
url="https://github.com/sylikc/${pkgbase}"
makedepends=("python-pip")
_pkgname_prefix="${_pkgname:0:1}"
_pkgname_underscored="${_pkgname//-/_}"
_pkgurl="https://files.pythonhosted.org/packages/py3/$_pkgname_prefix/$_pkgname/$_pkgname_underscored-$pkgver-py3-none-any.whl"
source=("$_pkgurl")
package() {
cd "$srcdir" || exit
PIP_CONFIG_FILE=/dev/null pip install \
--root="$pkgdir" \
--isolated \
--ignore-installed \
--no-deps \
--no-compile \
--no-warn-script-location \
${_pkgname//-/_}-$pkgver-py3-none-any.whl
python -O -m compileall -s "$pkgdir" "$pkgdir/usr/lib/"
mapfile -t direct_url_file < <(find "$pkgdir"/usr/lib -type f -name 'direct_url.json')
rm -rvf "${direct_url_file[@]}" || true
install -Dm644 "${_pkgname//-/_}-$pkgver.dist-info/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
#---- license gpg-key sha256sums ----
license=("GPL3")
sha256sums=(a223852c8899cb118858439b610c820cc5284843f017e42c50d0f13099d6ea15) # PyExifTool-0.5.4-py3-none-any.whl