void-packages/srcpkgs/python-exifread/template

40 lines
1.0 KiB
Bash

# Template file for 'python-exifread'
pkgname=python-exifread
version=2.2.0
revision=1
archs=noarch
wrksrc="exif-py-${version}"
build_style="python-module"
pycompile_module="exifread"
hostmakedepends="python-setuptools python3-setuptools"
depends="python"
short_desc="Python module to extract Exif metadata (Python2)"
maintainer="Peter Bui <pbui@github.bx612.space>"
license="BSD"
homepage="https://github.com/ianare/exif-py"
distfiles="https://github.com/ianare/exif-py/archive/${version}.tar.gz"
checksum=55b8dbdfa1c55da50a0b989cbcd591bb996f36adff27cc207b350b25d76d2828
alternatives="EXIF:EXIF.py:/usr/bin/EXIF.py2"
pre_build() {
# Upstream didn't update version in this file
sed -i "s/2.1.2/${version}/" exifread/__init__.py
}
post_install() {
vlicense LICENSE.txt
}
python3-exifread_package() {
archs=noarch
depends="python3"
pycompile_module="exifread"
short_desc="${short_desc/Python2/Python3}"
alternatives="EXIF:EXIF.py:/usr/bin/EXIF.py3"
pkg_install() {
vmove usr/bin/EXIF.py3
vmove usr/lib/python3*
vlicense LICENSE.txt
}
}