summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c11c09741e4fffc31050bceb1dbb902e29d3a080 (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: hybridkernel <admin@hzqki.me>
pkgname=smoothie-rs-linux-git
pkgver=Nightly_2024.07.21_06.07.r4.ge0b804e
pkgrel=1
pkgdesc="Linux-Tested version of smoothie-rs"
arch=('x86_64')
url="https://github.com/Hzqkii/smoothie-rs"
license=('GPL3')
depends=('vapoursynth-plugin-mvtools' 
         'vapoursynth-plugin-havsfunc' 
         'vapoursynth' 
         'ffmpeg' 
         'vapoursynth-plugin-svpflow1' 
         'ffms2' 
         'vapoursynth-plugin-svpflow2-bin' 
         'vapoursynth-plugin-mvsfunc' 
         'vapoursynth-plugin-frameblender'
         'vapoursynth-plugin-adjust'
         'vapoursynth-plugin-vsakarin-llvm14-git'
         'python')
optdepends=('vapoursynth-plugin-rife-ncnn-vulkan: RIFE-NCNN Vulkan support')
makedepends=('rust' 'gtk3' 'git')
source=("$pkgname::git+https://github.com/Hzqkii/smoothie-rs.git")
sha256sums=('SKIP')
provides=("smoothie-rs-linux" "smoothie-rs-linux-debug")
conflicts=("smoothie-rs-linux" "smoothie-rs-linux-debug")
pkgver() {
  cd "$srcdir/$pkgname"
  printf "%s" "$(git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g')"
}

build() {
  cd "$srcdir/$pkgname"
  
  cargo build --release
}

package() {
  cd "$srcdir/$pkgname"
  install -Dm755 "target/release/smoothie-rs" "$pkgdir/opt/smoothie-rs/bin/smoothie-rs"
  install -Dm644 "target/scripts/adjust.py" "$pkgdir/opt/smoothie-rs/scripts/adjust.py"
  install -Dm644 "target/scripts/blending.py" "$pkgdir/opt/smoothie-rs/scripts/blending.py"
  install -Dm644 "target/scripts/consts.py" "$pkgdir/opt/smoothie-rs/scripts/consts.py"
  install -Dm644 "target/scripts/filldrops.py" "$pkgdir/opt/smoothie-rs/scripts/filldrops.py"
  install -Dm644 "target/scripts/havsfunc.py" "$pkgdir/opt/smoothie-rs/scripts/havsfunc.py"
  install -Dm644 "target/scripts/weighting.py" "$pkgdir/opt/smoothie-rs/scripts/weighting.py"
  install -Dm644 "target/defaults.ini" "$pkgdir/opt/smoothie-rs/defaults.ini"
  install -Dm644 "target/jamba.vpy" "$pkgdir/opt/smoothie-rs/jamba.vpy"

  install -Dm755 /dev/stdin "$pkgdir/usr/bin/smoothie-rs" <<'EOF'
#!/bin/sh

# Path to the executable
smoothie_rs="/opt/smoothie-rs/bin/smoothie-rs"

# Check if smoothie-rs exists and is executable
if [ ! -x "$smoothie_rs" ]; then
    echo "Error: /opt/smoothie-rs/bin/smoothie-rs is not found or not executable."
    exit 1
fi

# Execute smoothie-rs with all arguments passed to this script
exec "$smoothie_rs" "$@"
EOF
}