Advertisement
Guest User

PKGBUILD (ryzom-hg)

a guest
Apr 23rd, 2013
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.43 KB | None | 0 0
  1. # Maintainer:Bjoern Bidar <theodorstormgrade@gmail.com>
  2. #_gui_toolkit=qt # qt or gtk
  3. _build_server=false # set true to build server (default:false)
  4. _build_client=true # set false to don't build client (default:true)
  5. _CMAKE_COMMON_ARGS=('-DWITH_STATIC=OFF' '-DWITH_NEL_TOOLS=OFF' '-DWITH_NEL_TESTS=OFF' '-DWITH_LUA51=ON' '-DWITH_NEL_SAMPLES=OFF' '-DWITH_RYZOM_TOOLS=OFF'.) # cmake arguments for server and client
  6. _CMAKE_SERVER_ARGS=('-DWITH_RYZOM_SERVER=ON' '-DWITH_RYZOM_CLIENT=OFF' '-DWITH_DRIVER_OPENGL=OFF' '-DWITH_DRIVER_OPENAL=OFF' ) # cmake args for building server
  7. _CMAKE_CLIENT_ARGS=( '-DWITH_RYZOM_SERVER=OFF' '-DWITH_RYZOM_CLIENT=ON' ) # cmake args for building client
  8.  
  9. if [ $_build_client = true ] ; then
  10. true && pkgname=( 'ryzom-client-hg' )
  11. fi
  12.  
  13. if [ $_build_server = true ] ; then
  14. true && pkgname=( 'ryzom-client-hg' 'ryzom-server-hg')
  15. fi
  16.  
  17.  
  18. case $_gui_toolkit in
  19. qt) _CMAKE_COMMON_ARGS=( ${_CMAKE_COMMON_ARGS_ARGS[*]} '-DWITH_QT=ON' ) ;;
  20. gtk) _CMAKE_COMMON_ARGS=( ${_CMAKE_COMMON_ARGS_ARGS[*]} '-DWITH_GTK=ON' ) ;;
  21. esac
  22.  
  23.  
  24. _hg_root='https://bitbucket.org/ryzom/ryzomcore'
  25. _hg_name='ryzomcore'
  26.  
  27.  
  28. build() {
  29. if [ -d "$_hg_name" ] ; then # fetch sources
  30. cd "$_hg_name"
  31. hg pull && hg update
  32. cd ..
  33. else
  34. hg clone "$_hg_root"
  35. fi
  36.  
  37. msg2 "hg clone done or server timeout"
  38.  
  39. # cd $_hg_name
  40.  
  41. if [ $_build_client = true ] ; then
  42.  
  43. mkdir -p "$srcdir/build-client"
  44. cd "$srcdir/build-client"
  45. msg "client is $_build_client, building client"
  46. cmake -b "$srcdir/$_hg_name/code" ${_CMAKE_COMMON_ARGS_ARGS[*]} ${_CMAKE_CLIENT_ARGS[*]} -DCMAKE_INSTALL_PREFIX=/usr -DRYZOM_ETC_PREFIX=/etc/ryzom -DRYZOM_SHARE_PREFIX=/usr/share/ryzom -DRYZOM_BIN_PREFIX=/usr/bin -DRYZOM_GAMES_PREFIX=/usr/bin
  47. msg "Starting make, to build client"
  48. make
  49.  
  50. fi
  51.  
  52.  
  53. if [ $_build_server = true ] ; then
  54.  
  55. mkdir -p "$srcdir/build-server"
  56. cd "$srcdir/build-server"
  57. msg "client is $_build_server, building server"
  58. cmake -b "$srcdir/$_hg_name/code" ${_CMAKE_COMMON_ARGS_ARGS[*]} ${_CMAKE_SERVER_ARGS[*]} -DCMAKE_INSTALL_PREFIX=/usr -DRYZOM_ETC_PREFIX=/etc/ryzom -DRYZOM_SHARE_PREFIX=/usr/share/ryzom -DRYZOM_BIN_PREFIX=/usr/bin -DRYZOM_GAMES_PREFIX=/usr/bin
  59. msg "Starting make, to build server"
  60. make
  61.  
  62. fi
  63.  
  64. }
  65. if [ $_build_client = true ] ; then
  66.  
  67. package_ryzom-client-hg() {
  68. pkgdesc="Ryzom is a Free to Play MMORPG . This version is for playing on an official server"
  69. depends=( 'curl' 'freetype2' 'libx11' 'mesa' 'libxxf86vm' 'openal' 'freealut' 'libogg' 'libvorbis' 'libxml2' 'cmake' 'libpng' 'libjpeg' 'rrdtool' 'bison' 'libwww' 'boost' 'cpptest' 'luabind' 'libsquish' 'lua51' 'lua51-sql-mysql' 'ryzom-data' )
  70. cd "$srcdir/build-client"
  71. make DESTDIR="$pkgdir/" install
  72. install -m 644 ${srcdir}/ryzom.desktop ${pkgdir}/usr/share/applications
  73. sed -ie 's/\/usr\/bin\/ryzom_client/ryzom/' ${pkgdir}/usr/share/applications/ryzom.desktop # replace ryzom_client with our script
  74. cp ${srcdir}/ryzom.sh ${pkgdir}/usr/bin/ryzom
  75. chmod +x ${pkgdir}/usr/bin/ryzom
  76. mkdir -p ${pkgdir}/usr/bin
  77.  
  78. }
  79.  
  80. fi
  81.  
  82. if [ $_build_server = true ] ; then
  83.  
  84. package_ryzom-server-hg() {
  85. pkgdesc="Ryzom is a Free to Play MMORPG . This is the version to run a server"
  86. cd "$srcdir/build-server"
  87. make DESTDIR="$pkgdir/" install
  88. # install -m 644 ${srcdir}/ryzom.desktop ${pkgdir}/usr/share/applications
  89. # sed -ie 's/\/usr\/bin\/ryzom_client/ryzom/' ${pkgdir}/usr/share/applications/ryzom.desktop # replace ryzom_client with our script
  90. # cp ${srcdir}/ryzom.sh ${pkgdir}/usr/bin/ryzom
  91. #chmod +x ${pkgdir}/usr/bin/ryzom
  92. mkdir -p ${pkgdir}/usr/bin
  93.  
  94. }
  95.  
  96. fi
  97.  
  98.  
  99.  
  100.  
  101.  
  102. pkgbase=ryzom-hg
  103. pkgver=20130312
  104. pkgrel=1
  105. pkgdesc="Ryzom is a Free to Play MMORPG . This version is for playing on an official server or launch a server"
  106. arch=('i686' 'x86_64')
  107. url="http://www.ryzom.com/"
  108. license=('AGPL3')
  109. depends=('curl' 'freetype2' 'libx11' 'mesa' 'libxxf86vm' 'openal' 'freealut' 'libogg' 'libvorbis' 'libxml2' 'libpng' 'libjpeg' 'rrdtool' 'libwww' 'boost' 'luabind' 'libsquish' 'lua51' 'lua51-sql-mysql')
  110. conflicts=('ryzom-client-latest-hg')
  111. groups=('ryzom')
  112. makedepends=('mercurial' 'cpptest' 'cmake' 'bison')
  113. provides=('ryzom')
  114. source=( 'ryzom.sh' 'ryzom.desktop' )
  115. md5sums=('a5ca7dfae7b9073f78cd1b0b7380755f'
  116. '71d5136d40ec4e76c2ac2b0c9e506aef')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement