ut2004-ded-3369.3-r1.ebuild 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit games
  5. BONUSPACK_P="dedicatedserver3339-bonuspack.zip"
  6. PATCH_P="ut2004-lnxpatch${PV%.*}-2.tar.bz2"
  7. DESCRIPTION="Unreal Tournament 2004 Linux Dedicated Server"
  8. HOMEPAGE="http://www.unrealtournament.com/"
  9. SRC_URI="mirror://3dgamers/unrealtourn2k4/${BONUSPACK_P}
  10. http://files.chaoticdreams.org/UT2004/DedicatedServer3339-BonusPack.zip -> ${BONUSPACK_P}
  11. http://downloads.unrealadmin.org/UT2004/Server/${BONUSPACK_P}
  12. http://sonic-lux.net/data/mirror/ut2004/${BONUSPACK_P}
  13. mirror://3dgamers/unrealtourn2k4/${PATCH_P}
  14. http://downloads.unrealadmin.org/UT2004/Patches/Linux/${PATCH_P}
  15. http://sonic-lux.net/data/mirror/ut2004/${PATCH_P}
  16. mirror://gentoo/ut2004-v${PV/./-}-linux-dedicated.7z"
  17. LICENSE="ut2003"
  18. SLOT="0"
  19. KEYWORDS="amd64 x86"
  20. IUSE=""
  21. RESTRICT="mirror strip"
  22. DEPEND="app-arch/unzip
  23. app-arch/p7zip"
  24. RDEPEND="sys-libs/glibc
  25. !games-fps/ut2004[dedicated]
  26. games-fps/ut2004-bonuspack-ece
  27. games-fps/ut2004-bonuspack-mega"
  28. S=${WORKDIR}
  29. dir=${GAMES_PREFIX_OPT}/${PN}
  30. src_prepare() {
  31. cp -rf UT2004-Patch/* . || die
  32. rm -rf System/{ucc-bin*,ut2004-bin*,*.dll,*.exe} UT2004-Patch
  33. if use amd64 ; then
  34. mv -f ut2004-ucc-bin-09192008/ucc-bin-linux-amd64 System/ucc-bin || die
  35. else
  36. mv -f ut2004-ucc-bin-09192008/ucc-bin System/ || die
  37. fi
  38. rm -rf ut2004-ucc-bin-09192008
  39. # Owned by ut2004-bonuspack-ece
  40. rm -f Animations/{MetalGuardAnim,ONSBPAnimations,NecrisAnim,MechaSkaarjAnims}.ukx
  41. rm -f Help/BonusPackReadme.txt
  42. rm -f Maps/{ONS-Adara,ONS-IslandHop,ONS-Tricky,ONS-Urban}.ut2
  43. rm -f Sounds/{CicadaSnds,DistantBooms,ONSBPSounds}.uax
  44. rm -f StaticMeshes/{HourAdara,BenMesh02,BenTropicalSM01,ONS-BPJW1,PC_UrbanStatic}.usx
  45. rm -f System/{ONS-IslandHop,ONS-Tricky,ONS-Adara,ONS-Urban,OnslaughtBP}.int
  46. rm -f System/xaplayersl3.upl
  47. rm -f Textures/{ONSBPTextures,BonusParticles,HourAdaraTexor,BenTex02,BenTropical01,PC_UrbanTex,AW-2k4XP,ONSBP_DestroyedVehicles,UT2004ECEPlayerSkins,CicadaTex,Construction_S}.utx
  48. # Owned by ut2004-bonuspack-mega
  49. rm -f System/{Manifest.ini,Manifest.int,Packages.md5}
  50. }
  51. src_install() {
  52. einfo "This will take a while... go get a pizza or something"
  53. games_make_wrapper ${PN} "./ucc-bin server" "${dir}"/System
  54. insinto "${dir}"
  55. doins -r *
  56. fperms +x "${dir}"/System/ucc-bin
  57. sed \
  58. -e "s:@USER@:${GAMES_USER_DED}:" \
  59. -e "s:@GROUP@:${GAMES_GROUP}:" \
  60. -e "s:@HOME@:${GAMES_PREFIX}:" \
  61. "${FILESDIR}"/${PN}.confd > "${T}"/${PN}.confd || die
  62. newconfd "${T}"/${PN}.confd ${PN}
  63. sed \
  64. -e "s:@DIR@:${GAMES_BINDIR}:g" \
  65. "${FILESDIR}"/${PN}.initd > "${T}"/${PN}.initd || die
  66. newinitd "${T}"/${PN}.initd ${PN}
  67. prepgamesdirs
  68. }
  69. pkg_postinst() {
  70. games_pkg_postinst
  71. ewarn "You should take the time to edit the default server INI."
  72. ewarn "Consult the INI Reference at http://www.unrealadmin.org/"
  73. ewarn "for assistance in adjusting the following file:"
  74. ewarn "${dir}/System/Default.ini"
  75. ewarn
  76. ewarn "To have your server authenticate properly to the"
  77. ewarn "central server, you MUST visit the following site"
  78. ewarn "and request a key. This is not required if you"
  79. ewarn "want an unfindable private server. [DoUplink=False]"
  80. ewarn
  81. ewarn "http://unreal.epicgames.com/ut2004server/cdkey.php"
  82. }