summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b1c59260ed0bbf4e03df13ee4b5d5c5b50161f94 (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
# Maintainer : Chris Elston chris.elston@blueyonder.co.uk
# Contributor : Artem Klevtsov a.a.klevtsov@gmail.com

_pkgname=python3-exiv2
pkgname=python-exiv2
pkgver=0.4.0
pkgrel=1
pkgdesc="py3exiv2 is a Python3 binding to exiv2, the C++ library for manipulation of EXIF, IPTC and XMP image metadata."
url="https://launchpad.net/py3exiv2"
arch=('i686' 'x86_64')
depends=('python>=3.7' 'boost-libs' 'exiv2')
makedepends=('boost')
license=('GPL3')
source=("http://www.py3exiv2.tuxfamily.org/releases/${_pkgname}-${pkgver}.tar.gz")
md5sums=('2ac170a5a51685b12670a3d080e1866a')

build() {
    cd "${srcdir}/${_pkgname}-${pkgver}"
    mkdir -p build
    g++ -o build/exiv2wrapper.os -c -fPIC -I/usr/include/python3.7m src/exiv2wrapper.cpp
    g++ -o build/exiv2wrapper_python.os -c -fPIC -I/usr/include/python3.7m src/exiv2wrapper_python.cpp
    g++ -o build/libexiv2python.so -shared build/exiv2wrapper.os build/exiv2wrapper_python.os -lboost_python3 -lexiv2
}

package() {
    cd "${srcdir}/${_pkgname}-${pkgver}"
    mkdir -p "${pkgdir}/usr/lib/python3.7/site-packages/pyexiv2"
    install -D -m755 build/libexiv2python.so "${pkgdir}/usr/lib/python3.7/site-packages/libexiv2python.so"
    install -D -m644 src/pyexiv2/__init__.py "${pkgdir}/usr/lib/python3.7/site-packages/pyexiv2/__init__.py"
    install -D -m644 src/pyexiv2/exif.py "${pkgdir}/usr/lib/python3.7/site-packages/pyexiv2/exif.py"
    install -D -m644 src/pyexiv2/iptc.py "${pkgdir}/usr/lib/python3.7/site-packages/pyexiv2/iptc.py"
    install -D -m644 src/pyexiv2/metadata.py "${pkgdir}/usr/lib/python3.7/site-packages/pyexiv2/metadata.py"
    install -D -m644 src/pyexiv2/preview.py "${pkgdir}/usr/lib/python3.7/site-packages/pyexiv2/preview.py"
    install -D -m644 src/pyexiv2/utils.py "${pkgdir}/usr/lib/python3.7/site-packages/pyexiv2/utils.py"
    install -D -m644 src/pyexiv2/xmp.py "${pkgdir}/usr/lib/python3.7/site-packages/pyexiv2/xmp.py"
}