# Maintainer: theflameemperor pkgname=ygopro-koishipro pkgver=2019.4.22 pkgrel=1 _pkgrel=1 name="$pkgver" zipFile=KoishiPro-linux-full-${pkgver}.zip pkgdesc="Link compatable ygopro client with AI" arch=('x86_64') url='https://github.com/purerosefallen/ygopro' license=('GPL2') depends=('mono' 'libevent') makedepends=('patchelf') source=("https://github.com/purerosefallen/ygopro/releases/download/$name/$zipFile") noextract=($zipFile) sha256sums=('77acc955fdfd5e9ad1def7876bb476559a389cc565a2db66be859a01bfad742d') options=('!strip' 'emptydirs') prepare(){ mkdir -p ../usr/bin cp ../koishipro ../usr/bin/ mkdir -p ../usr/share/applications cp ../koishipro.desktop ../usr/share/applications unzip -qq -o $zipFile -d $pkgname patchelf --remove-needed libevent_pthreads-2.0.so.5 ./$pkgname/ygopro patchelf --add-needed libevent_pthreads.so ./$pkgname/ygopro patchelf --remove-needed libevent-2.0.so.5 ./$pkgname/ygopro patchelf --add-needed libevent.so ./$pkgname/ygopro patchelf --set-rpath '$ORIGIN' ./$pkgname/ygopro } package(){ outputDir="$pkgdir/opt/$pkgname" mkdir -p $outputDir cp -r ../usr $pkgdir cp ../YGOPro.png $outputDir/ cp -dR $pkgname/* $outputDir find $outputDir -type d -exec chmod 777 {} \; find $outputDir -type f -exec chmod 777 {} \; rm $outputDir/deck/* }