upgpkg: ocaml-ctypes 0.20.2-1
[arch-packages.git] / exiv2 / trunk / PKGBUILD
blobc29698f47a38db8ed5fb36cdbc2cc5584573d595
1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Contributor: tobias <tobias@arhlinux.org>
4 pkgname=exiv2
5 pkgver=0.27.6
6 pkgrel=1
7 pkgdesc="Exif, Iptc and XMP metadata manipulation library and tools"
8 url="https://exiv2.org"
9 arch=('x86_64')
10 license=('GPL2')
11 depends=('gcc-libs' 'zlib' 'expat' 'libexpat.so' 'gettext' 'curl' 'libcurl.so')
12 makedepends=('cmake' 'gtest' 'ninja')
13 checkdepends=('python')
14 provides=('libexiv2.so')
15 source=(https://github.com/Exiv2/exiv2/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz)
16 sha512sums=('7d7121770a9394efd31acb74709583e587351fc48c485a2f684cacce4ed19a2d07a6cb1cea986c16bf64851fd53b22a7277c1e1ae1a6cd69a5761afae3c5c731')
17 b2sums=('ce80a1f4252b7d12a3fb9b6e17d81703a02dfaf58cb096b5b6d65146e3c6470b7d1120430f2802b679e1648c1eac74a05381b2cf21d054758086b9ac0eacc556')
19 build() {
20   cd ${pkgname}-${pkgver}
21   cmake -B build \
22     -GNinja \
23     -DCMAKE_INSTALL_PREFIX=/usr \
24     -DCMAKE_CXX_FLAGS="$CXXFLAGS -ffat-lto-objects" \
25     -DCMAKE_SKIP_RPATH=ON \
26     -DEXIV2_BUILD_SAMPLES=ON \
27     -DEXIV2_BUILD_UNIT_TESTS=ON \
28     -DEXIV2_ENABLE_VIDEO=ON \
29     -DEXIV2_ENABLE_NLS=ON \
30     -DEXIV2_ENABLE_XMP=ON \
31     -DEXIV2_ENABLE_CURL=ON \
32     -DEXIV2_ENABLE_WEBREADY=ON \
33     -DEXIV2_ENABLE_BMFF=ON
34   ninja -C build
37 check() {
38   cd ${pkgname}-${pkgver}
39   LD_LIBRARY_PATH="$PWD"/build/lib \
40   ninja -C build test
43 package() {
44   cd ${pkgname}-${pkgver}
45   # remove samples instal which are only needed for unit tests
46   sed '/samples\/cmake_install.cmake/d' -i build/cmake_install.cmake
47   DESTDIR="${pkgdir}" ninja -C build install
50 # vim: ts=2 sw=2 et: