summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6448b0fdb8c9ed5720aa145f717bb7bb9e5f4479 (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
# Maintainer: Gustavo Alvarez <sl1pkn07@gmail.com>

_plug=tivtc
pkgname=avisynth-plugin-${_plug}-git
pkgver=v1.0.26.16.g9c47880
pkgrel=1
pkgdesc="Plugin for Avisynth: ${_plug} (GIT version)"
arch=('x86_64')
url='https://github.com/pinterf/TIVTC'
license=('GPL')
depends=('avisynthplus')
makedepends=('git'
             'cmake'
             )
provides=("avisynth-plugin-${_plug}")
conflicts=("avisynth-plugin-${_plug}")
source=("${_plug}::git+https://github.com/pinterf/TIVTC.git")
sha256sums=('SKIP')

pkgver() {
  cd "${_plug}"
  echo "$(git describe --long --tags | tr - .)"
}

prepare() {
  mkdir -p build

  rm -fr "${_plug}/src/include/"{avs*,avi*}
}

build() {
  cd build

  CXXFLAGS+=" $(pkg-config --cflags avisynth)"

  cmake "../${_plug}/src" \
   -DCMAKE_BUILD_TYPE=Release \
   -DCMAKE_INSTALL_PREFIX=/usr \

  make

  cd ..
  make -C "${srcdir}/${_plug}/RetrieveRanges"
}

package(){
  make -C build DESTDIR="${pkgdir}" install

  install -Dm755 "${_plug}/RetrieveRanges/RetrieveRanges" "${pkgdir}/usr/bin/RetrieveRanges"
  install -Dm644 "${_plug}/RetrieveRanges/RetrieveRanges-ReadMe.txt" "${pkgdir}/usr/share/doc/avisynth/plugins/${_plug}/RetrieveRanges-ReadMe.txt"

  install -Dm644 "${_plug}/Doc_TDeint/tdeint.htm" "${pkgdir}/usr/share/doc/avisynth/plugins/${_plug}/TDeint/tdeint.htm"

  for i in "${_plug}/Doc_TIVTC/"*.txt; do
    install -Dm644 "${i}" "${pkgdir}/usr/share/doc/avisynth/plugins/${_plug}/TIVTC/$(basename "${i}")"
  done

  cd "${_plug}/examples/"
  find . -type f -print0 | while read -d $'\0' i; do
    install -Dm644 "${i}" "${pkgdir}/usr/share/doc/avisynth/plugins/${_plug}/examples/${i}"
  done
}