blob: 89b50cf4f8e7b5412aa1e2232292275806e7f411 (
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
|
# Maintainer: Antoine Viallon <antoine-aur@lesviallon.fr>
# Contributor: Mitch Bigelow <ipha00@gmail.com>
pkgname=realsr-ncnn-vulkan-git
pkgver=20220728.r0.gb7f890e
pkgrel=1
pkgdesc="realsr super resolution implemented with ncnn library"
url="https://github.com/nihui/realsr-ncnn-vulkan"
license=('MIT')
depends=('vulkan-icd-loader' 'vulkan-driver')
makedepends=('git' 'cmake' 'glslang' 'vulkan-headers')
conflicts=('realsr-ncnn-vulkan')
provides=('realsr-ncnn-vulkan')
arch=('i686' 'x86_64')
source=(
"git+https://github.com/nihui/realsr-ncnn-vulkan.git"
)
sha256sums=(
'SKIP'
)
pkgver() {
cd "${srcdir}/realsr-ncnn-vulkan"
git describe --long --tags 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
cd "${srcdir}/realsr-ncnn-vulkan"
# init ncnn submodule
git submodule update --init --recursive
# Fix default model path
sed -i 's|path_t model = PATHSTR("models-DF2K_JPEG")|path_t model = PATHSTR("/usr/share/realsr-ncnn-vulkan/models-DF2K_JPEG")|' src/main.cpp
}
build() {
cd "${srcdir}/realsr-ncnn-vulkan/src"
mkdir -p build
cd build
cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
..
make
}
package() {
cd "${srcdir}/realsr-ncnn-vulkan"
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -Dm755 "src/build/realsr-ncnn-vulkan" "${pkgdir}/usr/bin/realsr-ncnn-vulkan"
cd "${srcdir}/realsr-ncnn-vulkan/models"
for f in models-*/*; do
install -Dm 644 "$f" ${pkgdir}/usr/share/realsr-ncnn-vulkan/"$f"
done
}
|