updated on Sat Jan 14 00:11:12 UTC 2012
[aur-mirror.git] / pcsx2-svn / PKGBUILD
blobdf4977a4bcd13e0a9f16d736232c09b0ad5bbd86
1 # Maintainer: josephgbr <rafael.f.f1 at gmail.com>
2 # Contributor: Themaister <maister at archlinux.us>
4 # Hint: for a cleaner but less informative usage, replace "Debug"
5 # with "Release" in the line '-DCMAKE_BUILD_TYPE=' below
7 pkgname=pcsx2-svn
8 pkgver=5015
9 pkgrel=1
10 pkgdesc="A PlayStation 2 emulator."
11 arch=('i686' 'x86_64')
12 url="http://www.pcsx2.net"
13 license=('GPL')
14 if [ ${CARCH} == "x86_64" ]; then
15         depends=('lib32-bzip2' 'lib32-wxgtk' 'lib32-nvidia-cg-toolkit'
16                          'lib32-glew' 'lib32-libjpeg-turbo' 'lib32-portaudio'
17                          'lib32-alsa-lib' 'lib32-soundtouch' 'lib32-gtk-engines')       
18         makedepends=('cmake' 'subversion' 'google-sparsehash' 'gcc-multilib')
19 else
20         depends=('bzip2' 'wxgtk' 'nvidia-cg-toolkit' 'glew' 'portaudio'
21                          'alsa-lib' 'libjpeg-turbo' 'soundtouch' 'gtk-engines')
22         makedepends=('cmake' 'subversion' 'google-sparsehash')
24 provides=('pcsx2')
25 conflicts=('pcsx2' 'pcsx2-bin')
26 options=('!emptydirs')
27 install="${pkgname}.install"
28 changelog="${pkgname}.changelog"
29 source=()
30 md5sums=()
32 _svntrunk=http://pcsx2.googlecode.com/svn/trunk
33 _svnmod=pcsx2
35 build() {
36         cd "${srcdir}"
37         
38         msg "Connecting to SVN server...."
39         if [[ -d "${_svnmod}/.svn" ]]; then
40           (cd "${_svnmod}" && svn up -r "${pkgver}")
41         else
42           svn co "${_svntrunk}" --config-dir ./ -r "${pkgver}" "${_svnmod}"
43         fi
44         rm -rf "${srcdir}/${_svnmod}-build"
45         msg "SVN checkout done or server timeout"
47         # For ArchLinux 64-bit, install plugins in lib32 folder
48         _plugindir=/usr/lib/pcsx2
49         [ $CARCH == x86_64 ] && _plugindir=/usr/lib32/pcsx2
51         msg "Starting cmake and build..."
52         svn export "${srcdir}/${_svnmod}" "${srcdir}/${_svnmod}-build"
54         cd "${srcdir}/${_svnmod}-build"
55         cmake CMakeLists.txt \
56                 -DCMAKE_BUILD_TYPE="Debug" \
57                 -DPACKAGE_MODE=TRUE \
58                 -DFORCE_INTERNAL_SDL=TRUE \
59                 -DFORCE_INTERNAL_SOUNDTOUCH=FALSE \
60                 -DCMAKE_INSTALL_PREFIX="/usr" \
61                 -DPLUGIN_DIR=${_plugindir} \
62                 -DGAMEINDEX_DIR="/usr/share/pcsx2" \
63                 -DXDG_STD=TRUE
65         make
68 package() {
69         cd "${srcdir}/${_svnmod}-build"
70         make DESTDIR="${pkgdir}" install        
72         # Workaround. "pcsx2.1" is the correct file name to result
73         # in a correct man page in a archlinux package: "pcsx2.1.gz"
74         [ -f "${pkgdir}/usr/share/man/man1/pcsx2.man" ] && \
75                 mv "${pkgdir}/usr/share/man/man1/pcsx2".{man,1}