cockatrice-20160506-r1.ebuild 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit cmake-utils eutils gnome2-utils
  5. DESCRIPTION="An open-source multiplatform software for playing card games over a network"
  6. HOMEPAGE="https://github.com/Cockatrice/Cockatrice"
  7. SRC_URI="https://github.com/Cockatrice/${PN}/archive/2016-05-06-Release.tar.gz -> ${P}.tar.gz"
  8. S=${WORKDIR}/"Cockatrice-2016-05-06-Release"
  9. LICENSE="GPL-2"
  10. SLOT="0"
  11. KEYWORDS="~amd64 ~x86"
  12. IUSE="dedicated server"
  13. DEPEND="
  14. dev-libs/libgcrypt:0
  15. dev-libs/protobuf
  16. dev-qt/linguist-tools:5
  17. dev-qt/qtconcurrent:5
  18. dev-qt/qtcore:5
  19. dev-qt/qtprintsupport:5
  20. !dedicated? (
  21. dev-qt/qtgui:5
  22. dev-qt/qtmultimedia:5
  23. dev-qt/qtsvg:5
  24. )"
  25. src_configure() {
  26. local mycmakeargs=(
  27. $(usex dedicated "-DWITHOUT_CLIENT=1 -DWITH_SERVER=1" "$(usex server "-DWITH_SERVER=1" "")")
  28. -DICONDIR="/usr/share/icons"
  29. -DDESKTOPDIR="/usr/share/applications"
  30. )
  31. cmake-utils_src_configure
  32. }
  33. src_compile() {
  34. cmake-utils_src_compile
  35. }
  36. src_install() {
  37. cmake-utils_src_install
  38. }
  39. pkg_preinst() {
  40. use dedicated || gnome2_icon_savelist
  41. }
  42. pkg_postinst() {
  43. #FIXME:
  44. elog "zonebg pictures are in ${GAMES_DATADIR}/${PN}/zonebg"
  45. elog "sounds are in ${GAMES_DATADIR}/${PN}/sounds"
  46. elog "you can use those directories in cockatrice settings"
  47. use dedicated || gnome2_icon_cache_update
  48. }
  49. pkg_postrm() {
  50. use dedicated || gnome2_icon_cache_update
  51. }