jobextra/python2-pyexiftool/PKGBUILD

40 lines
1.3 KiB
Bash

#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# Maintainer: ArchStrike <team@archstrike.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=python2-pyexiftool-git
pkgver=20141008.r29
pkgrel=02
pkgdesc="A Python library to communicate with an instance of Phil Harvey's excellent ExifTool command-line application."
arch=('any')
url='https://github.com/smarnach/pyexiftool'
depends=('perl-image-exiftool')
makedepends=('git' 'python2-setuptools')
provides=('python2-pyexiftool')
source=("${pkgname}::git+https://github.com/smarnach/pyexiftool.git")
pkgver() {
cd "${pkgname}"
printf "%s.r%s" "$(git show -s --format=%ci master | sed 's/\ .*//g;s/-//g')" "$(git rev-list --count HEAD)"
}
prepare(){
grep -iRl 'python' "${pkgname}" | xargs sed -i 's|#!.*/usr/bin/python|#!/usr/bin/python2|;s|#!.*/usr/bin/env python$|#!/usr/bin/env python2|'
}
package() {
cd "${pkgname}"
python2 setup.py install --root="$pkgdir" --optimize=1
install -Dm644 COPYING.BSD "$pkgdir/usr/share/licenses/$pkgname/COPYING.BSD"
install -Dm644 COPYING.GPL "$pkgdir/usr/share/licenses/$pkgname/COPYING.GPL"
}
#---- license gpg-key sha256sums ----
license=('BSD' 'GPL')
sha256sums=(SKIP)