32 lines
1 KiB
Text
32 lines
1 KiB
Text
# Maintainer: ArchStrike <team@archstrike.org>
|
|
|
|
buildarch=1
|
|
|
|
pkgname=python2-pyexiftool-git
|
|
pkgver=20141008.r29
|
|
pkgrel=2
|
|
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'
|
|
license=('BSD' 'GPL')
|
|
depends=('perl-image-exiftool')
|
|
makedepends=('git' 'python2-setuptools')
|
|
provides=('python2-pyexiftool')
|
|
source=("${pkgname}::git+https://github.com/smarnach/pyexiftool.git")
|
|
sha512sums=('SKIP')
|
|
|
|
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"
|
|
}
|