Advertisement
Guest User

Untitled

a guest
Oct 28th, 2015
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. # Contributor: Yamashita Ren
  2. # Contributor: Fredrick Brennan <admin@8chan.co>
  3. # Contributor: Julien Machiels
  4.  
  5. pkgname=waifu2x-converter-cpp-cuda-git
  6. _gitname=${pkgname%-cuda-git}
  7. pkgver=r363.939ea68
  8. pkgrel=1
  9. pkgdesc="Image rescaling and noise reduction using the power of convolutional neural networks, with CUDA support"
  10. arch=('i686' 'x86_64')
  11. url="https://github.com/tanakamura/waifu2x-converter-cpp"
  12. license=('MIT')
  13. depends=('cuda' 'opencl-headers' 'opencl-nvidia' 'opencv')
  14. makedepends=('cmake' 'git')
  15. provides=('waifu2x' 'waifu2x-converter-cpp')
  16. conflicts=('waifu2x-git')
  17. source=('git+https://github.com/tanakamura/waifu2x-converter-cpp.git')
  18. md5sums=('SKIP')
  19.  
  20. pkgver() {
  21. cd ${_gitname}
  22. printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  23. }
  24.  
  25. prepare() {
  26. sed -i "s/waifu2x-converter-cpp/waifu2x/g" ${_gitname}/CMakeLists.txt
  27. }
  28.  
  29. build() {
  30. cd ${_gitname}
  31. cmake -D CUDA_TOOLKIT_ROOT_DIR=/opt/cuda/ -D INSTALL_MODELS=true -D CMAKE_INSTALL_PREFIX=/usr .
  32. make
  33. }
  34.  
  35. package() {
  36. install -D ../waifu2x.1.gz $pkgdir/usr/share/man/man1/waifu2x.1.gz
  37. make DESTDIR=$pkgdir install -C${_gitname}
  38. }
  39.  
  40. check() {
  41. cd ${_gitname}
  42. msg 'Running Waifu2x'\''s test suite. Since you are using CUDA, this shouldn'\''t take a while.'
  43. ./runtest
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement