summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7588c73c4d954ce80e0343e2e9d5432441fadf60 (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Maintainer: Karl-Felix Glatzer <karl.glatzer@gmx.de>
# Contributor: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Sergej Pupykin <arch+pub@sergej.pp.ru>
# Contributor: EVorster <evorster@gmail.com>
# Contributor: Martchus <martchus@gmx.net>

pkgname=mingw-w64-vid.stab
pkgver=1.1.1
pkgrel=1
pkgdesc='Video stabilization library (mingw-w64)'
arch=(any)
url=http://public.hronopik.de/vid.stab
license=(GPL)
depends=(mingw-w64-crt)
makedepends=(mingw-w64-gcc mingw-w64-cmake git)
options=(!strip !buildflags staticlibs)
_tag=90c76aca2cb06c3ff6f7476a7cd6851b39436656
source=(git+https://github.com/georgmartius/vid.stab.git#tag=${_tag})
b2sums=(SKIP)
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"

pkgver() {
  cd vid.stab
  git describe --tags | sed 's/^v//'
}

build() {
  for _arch in ${_architectures}; do
    mkdir -p "${srcdir}"/build-${_arch} && cd "${srcdir}"/build-${_arch}

    # build shared libs
    ${_arch}-cmake "${srcdir}/vid.stab" \
      -DCMAKE_INSTALL_PREFIX="/usr/${_arch}" \
      -DBUILD_SHARED_LIBS:BOOL=ON
    make

    # build static libs
    ${_arch}-cmake "${srcdir}/vid.stab" \
      -DCMAKE_INSTALL_PREFIX="/usr/${_arch}" \
      -DBUILD_SHARED_LIBS:BOOL=OFF
    make
  done
}

package() {
  for _arch in ${_architectures}; do
    cd "${srcdir}"/build-${_arch}

    # install shared libs
    ${_arch}-cmake "${srcdir}/vid.stab" \
      -DCMAKE_INSTALL_PREFIX="/usr/${_arch}" \
      -DBUILD_SHARED_LIBS:BOOL=ON
    make DESTDIR="${pkgdir}" install

    # install static libs
    ${_arch}-cmake "${srcdir}/vid.stab" \
      -DCMAKE_INSTALL_PREFIX="/usr/${_arch}" \
      -DBUILD_SHARED_LIBS:BOOL=OFF
    make DESTDIR="${pkgdir}" install

    ${_arch}-strip --strip-unneeded "${pkgdir}"/usr/${_arch}/bin/*.dll
    ${_arch}-strip -g "${pkgdir}"/usr/${_arch}/lib/*.a
  done
}

# vim: ts=2 sw=2 et: