1. # Maintainer: josephgbr <rafael.f.f1 at gmail.com>
  2. # Contributor: Themaister <maister at archlinux.us>
  3. # Contributor: Benjamin van der Burgh <benjaminvdb@gmail.com>
  4.  
  5. # Hint: for a cleaner but less informative usage, replace "Debug"
  6. # with "Release" in the line '-DCMAKE_BUILD_TYPE=' below
  7.  
  8. pkgname=pcsx2-svn
  9. pkgver=5620
  10. pkgrel=1
  11. pkgdesc="A Sony PlayStation 2 emulator."
  12. arch=('i686' 'x86_64')
  13. url="http://www.pcsx2.net"
  14. license=('GPL3')
  15. if [[ $CARCH == i686 ]]; then
  16. depends=('bzip2' 'wxgtk' 'nvidia-cg-toolkit' 'glew' 'portaudio'
  17. 'libgl' 'alsa-lib' 'libjpeg-turbo' 'soundtouch'
  18. 'gtk-engines' 'sdl' 'libaio')
  19. makedepends=('cmake' 'subversion' 'sparsehash')
  20. elif [[ $CARCH == x86_64 ]]; then
  21. depends=('lib32-bzip2' 'lib32-wxgtk' 'lib32-nvidia-cg-toolkit'
  22. 'lib32-libgl' 'lib32-glew' 'lib32-libjpeg-turbo'
  23. 'lib32-portaudio' 'lib32-alsa-lib' 'lib32-soundtouch'
  24. 'lib32-gtk-engines' 'lib32-sdl' 'lib32-libaio')
  25. makedepends=('cmake' 'subversion' 'sparsehash' 'gcc-multilib')
  26. fi
  27. provides=('pcsx2')
  28. conflicts=('pcsx2')
  29. options=('!emptydirs' '!strip') # if build type = debug, then
  30. # avoid strip symbols
  31. install="${pkgname}.install"
  32. changelog="ChangeLog"
  33. source=(svn+http://pcsx2.googlecode.com/svn/trunk)
  34. md5sums=('SKIP')
  35.  
  36. pkgver() {
  37. cd $startdir/trunk
  38. svnversion | tr -d [A-z]
  39. }
  40.  
  41. build() {
  42. cd $srcdir/trunk
  43.  
  44. # For ArchLinux 64-bit, install plugins in lib32 folder
  45. _plugindir=/usr/lib/pcsx2
  46. [[ $CARCH == x86_64 ]] && _plugindir=/usr/lib32/pcsx2
  47.  
  48. # Disable plugins as they are only for debug performance
  49. # and might confuse users
  50. mv plugins/GSnull plugins/GSnull-disabled
  51. mv plugins/SPU2null plugins/SPU2null-disabled
  52.  
  53. cmake CMakeLists.txt \
  54. -DCMAKE_BUILD_TYPE="Debug" \
  55. -DPACKAGE_MODE=TRUE \
  56. -DCMAKE_INSTALL_PREFIX="/usr" \
  57. -DPLUGIN_DIR=${_plugindir} \
  58. -DGAMEINDEX_DIR="/usr/share/pcsx2" \
  59. -DGLSL_SHADER_DIR="/usr/share/pcsx2" \
  60. -DBUILD_REPLAY_LOADERS=FALSE \
  61. -DXDG_STD=TRUE
  62. make
  63. }
  64.  
  65. package() {
  66. cd $srcdir/trunk
  67. make DESTDIR="${pkgdir}" install
  68.  
  69. # There are some different licenses embedded, that end up compatible with
  70. # GPLv3. So, making this information in the package. File made for Debian.
  71. install -Dm644 debian-unstable-upstream/copyright \
  72. "${pkgdir}"/usr/share/licenses/pcsx2/copyright
  73. }