summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMitch Bigelow2020-06-06 17:58:48 -0400
committerMitch Bigelow2020-06-06 17:58:48 -0400
commita95aa50b2e27c22168c698769c39aee0bb7eb74d (patch)
tree73342b32780222c1b9753e7e71b2f62e6ffb566e
downloadaur-a95aa50b2e27c22168c698769c39aee0bb7eb74d.tar.gz
initial commit
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD58
2 files changed, 78 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..28318754d95
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = waifu2x-ncnn-vulkan
+ pkgdesc = waifu2x converter ncnn version, runs fast on intel / amd / nvidia GPU with vulkan
+ pkgver = 20200606
+ pkgrel = 1
+ url = https://github.com/nihui/waifu2x-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
+ conflicts = waifu2x-ncnn-vulkan-git
+ source = git://github.com/nihui/waifu2x-ncnn-vulkan.git#tag=20200606
+ sha256sums = SKIP
+
+pkgname = waifu2x-ncnn-vulkan
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..610cfde7396
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,58 @@
+# Maintainer: Mitch Bigelow <ipha00@gmail.com>
+#
+
+pkgname=waifu2x-ncnn-vulkan
+pkgver=20200606
+pkgrel=1
+pkgdesc="waifu2x converter ncnn version, runs fast on intel / amd / nvidia GPU with vulkan"
+url="https://github.com/nihui/waifu2x-ncnn-vulkan"
+license=('MIT')
+depends=('vulkan-icd-loader' 'vulkan-driver')
+makedepends=('git' 'cmake' 'glslang' 'vulkan-headers')
+conflicts=('waifu2x-ncnn-vulkan-git')
+# provides=('waifu2x-ncnn-vulkan')
+arch=('i686' 'x86_64')
+source=(
+ "git://github.com/nihui/waifu2x-ncnn-vulkan.git#tag=${pkgver}"
+)
+sha256sums=(
+ 'SKIP'
+)
+
+# pkgver() {
+# cd "${srcdir}/waifu2x-ncnn-vulkan"
+# git describe --long --tags 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+# }
+
+prepare() {
+ cd "${srcdir}/waifu2x-ncnn-vulkan"
+
+ # init ncnn submodule
+ git submodule update --init --recursive
+
+ # Fix default model path
+ sed -i 's|path_t model = PATHSTR("models-cunet")|path_t model = PATHSTR("/usr/share/waifu2x-ncnn-vulkan/models-cunet")|' src/main.cpp
+}
+
+build() {
+ cd "${srcdir}/waifu2x-ncnn-vulkan/src"
+ mkdir -p build
+ cd build
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ ..
+ make
+}
+
+package() {
+
+ cd "${srcdir}/waifu2x-ncnn-vulkan"
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+ install -Dm755 "src/build/waifu2x-ncnn-vulkan" "${pkgdir}/usr/bin/waifu2x-ncnn-vulkan"
+
+ cd "${srcdir}/waifu2x-ncnn-vulkan/models"
+ for f in models-*/*; do
+ install -Dm 644 "$f" ${pkgdir}/usr/share/waifu2x-ncnn-vulkan/"$f"
+ done
+}