diff options
author | Fredrick Brennan | 2015-09-22 21:03:33 +0800 |
---|---|---|
committer | Fredrick Brennan | 2015-09-22 21:03:33 +0800 |
commit | ca28467bf7ee0e15f1754659cc8021f6057bb159 (patch) | |
tree | 6cfaae778720ceaecff10472b487768b78fe90d9 /PKGBUILD | |
download | aur-ca28467bf7ee0e15f1754659cc8021f6057bb159.tar.gz |
Initial import
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..c5acea25404f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,64 @@ +# Maintainer: Fredrick Brennan <admin@8chan.co> +pkgname=waifu2x-git +pkgver=r250.ca65c93 +pkgrel=1 +pkgdesc="Image rescaling and noise reduction using the power of convolutional neural networks" +arch=('x86_64') +url="" +license=('MIT') +groups=() +depends=('opencl-headers' 'opencl-mesa') # If you have NVIDIA card, edit the PKGBUILD to use `opencl-nvidia` instead. +makedepends=('git' 'cmake') +optdepends=('cuda: Significantly speeds up operations, but only works with NVIDIA GPU') +provides=('waifu2x' 'waifu2x-converter-cpp') +conflicts=() +replaces=() +backup=() +options=() +install= +source=('git+https://github.com/tanakamura/waifu2x-converter-cpp.git') +noextract=() +md5sums=('SKIP') #generate with 'makepkg -g' +gitreponame="waifu2x-converter-cpp" + +prepare() { + cd $gitreponame + + patch -Np1 -i ../../arch_use_usr_share_for_models.patch +} + +build() { + cd $gitreponame + # + # BUILD HERE + # + cmake . + make -j5 +} + +package() { + ## Waifu2x's Makefile has no `install` + ## Just copy its binary, and some files it require... + installpath='/usr/bin/waifu2x' + sharepath='/usr/share/waifu2x/' + + mkdir -p $pkgdir/usr/bin || true + mkdir -p $pkgdir$sharepath || true + cp $gitreponame/$gitreponame $pkgdir$installpath + cp -r $gitreponame/models_rgb $pkgdir$sharepath + msg "Waifu2x will be installed as $installpath. It has no manpage, reading $installpath -h is probably a good idea." +} + +# From https://wiki.archlinux.org/index.php/VCS_package_guidelines#Git +pkgver() { + cd $gitreponame + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +check() { + cd $gitreponame + msg 'Running Waifu2x'\''s test suite. Depending on your processor and GPU, this may take a while.' + ./runtest +} + +# vim:set ts=2 sw=2 et: |