Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Contributor: Yamashita Ren
- # Contributor: Fredrick Brennan <admin@8chan.co>
- # Contributor: Julien Machiels
- pkgname=waifu2x-converter-cpp-cuda-git
- _gitname=${pkgname%-cuda-git}
- pkgver=r363.939ea68
- pkgrel=1
- pkgdesc="Image rescaling and noise reduction using the power of convolutional neural networks, with CUDA support"
- arch=('i686' 'x86_64')
- url="https://github.com/tanakamura/waifu2x-converter-cpp"
- license=('MIT')
- depends=('cuda' 'opencl-headers' 'opencl-nvidia' 'opencv')
- makedepends=('cmake' 'git')
- provides=('waifu2x' 'waifu2x-converter-cpp')
- conflicts=('waifu2x-git')
- source=('git+https://github.com/tanakamura/waifu2x-converter-cpp.git')
- md5sums=('SKIP')
- pkgver() {
- cd ${_gitname}
- printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
- }
- prepare() {
- sed -i "s/waifu2x-converter-cpp/waifu2x/g" ${_gitname}/CMakeLists.txt
- }
- build() {
- cd ${_gitname}
- cmake -D CUDA_TOOLKIT_ROOT_DIR=/opt/cuda/ -D INSTALL_MODELS=true -D CMAKE_INSTALL_PREFIX=/usr .
- make
- }
- package() {
- install -D ../waifu2x.1.gz $pkgdir/usr/share/man/man1/waifu2x.1.gz
- make DESTDIR=$pkgdir install -C${_gitname}
- }
- check() {
- cd ${_gitname}
- msg 'Running Waifu2x'\''s test suite. Since you are using CUDA, this shouldn'\''t take a while.'
- ./runtest
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement