summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD58
2 files changed, 79 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..ad5e1a710a3
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = realsr-ncnn-vulkan-git
+ pkgdesc = realsr super resolution implemented with ncnn library
+ pkgver = 20200606.r0.g1a7c13e
+ pkgrel = 1
+ url = https://github.com/nihui/realsr-ncnn-vulkan
+ arch = i686
+ arch = x86_64
+ license = MIT
+ makedepends = git
+ makedepends = cmake
+ makedepends = glslang
+ makedepends = vulkan-headers
+ depends = vulkan-icd-loader
+ depends = vulkan-driver
+ provides = realsr-ncnn-vulkan
+ conflicts = realsr-ncnn-vulkan
+ source = git://github.com/nihui/realsr-ncnn-vulkan.git
+ sha256sums = SKIP
+
+pkgname = realsr-ncnn-vulkan-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..78d2c98e707
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,58 @@
+# Maintainer: Mitch Bigelow <ipha00@gmail.com>
+#
+
+pkgname=realsr-ncnn-vulkan-git
+pkgver=20200606.r0.g1a7c13e
+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://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
+}