summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: cdb4fe8daf085e56281307e4a10c0727865042ed (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
pkgname=mingw-w64-svt-hevc
pkgver=1.5.0
pkgrel=1
pkgdesc="The Scalable Video Technology for HEVC Encoder (SVT-HEVC Encoder) is an HEVC-compliant encoder library core. (mingw-w64)"
arch=('any')
url="https://github.com/OpenVisualCloud/SVT-HEVC"
license=('GPL')
depends=(mingw-w64-crt)
makedepends=('mingw-w64-cmake' 'yasm')
options=('!buildflags' '!strip' 'staticlibs')
source=("https://github.com/OpenVisualCloud/SVT-HEVC/archive/v${pkgver}.tar.gz")
sha256sums=('5331213ce3fe73d5fe2887cf3aabcd8ffde2fafd0e5f09928d412dc8306f3992')

_architectures="x86_64-w64-mingw32"

build() {
  cd "$srcdir/SVT-HEVC-${pkgver}"
  for _arch in ${_architectures}; do
    mkdir -p build-${_arch} && pushd build-${_arch}
    ${_arch}-cmake -DCMAKE_BUILD_TYPE='Release' ..
    make
    popd
  done
}

package() {
  for _arch in ${_architectures}; do
    cd "$srcdir/SVT-HEVC-${pkgver}/build-${_arch}"
    make install DESTDIR="$pkgdir"
    rm "$pkgdir"/usr/${_arch}/bin/*.exe
    ${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
    ${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a
  done
}