syncplay-1.4.0.ebuild 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. PYTHON_COMPAT=( python2_7 )
  5. inherit python-r1
  6. MY_PV=${PV/_rc/-RC}
  7. DESCRIPTION="Client/server to synchronize media playback"
  8. HOMEPAGE="http://syncplay.pl"
  9. SRC_URI="https://github.com/Syncplay/syncplay/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
  10. LICENSE="Apache-2.0"
  11. SLOT="0"
  12. KEYWORDS="~amd64 ~x86"
  13. IUSE="+client +server gui vlc"
  14. REQUIRED_USE="vlc? ( client )
  15. gui? ( client )
  16. ${PYTHON_REQUIRED_USE}"
  17. DEPEND=""
  18. RDEPEND="${PYTHON_DEPS}
  19. || (
  20. >=dev-python/twisted-16.0.0[${PYTHON_USEDEP}]
  21. dev-python/twisted-core[${PYTHON_USEDEP}]
  22. )
  23. gui? ( dev-python/pyside[${PYTHON_USEDEP}] )
  24. vlc? ( media-video/vlc[lua] )"
  25. S="${WORKDIR}/${PN}-${MY_PV}"
  26. src_prepare() {
  27. default
  28. if ! use gui; then
  29. sed -i 's/"noGui": False,/"noGui": True,/' \
  30. syncplay/ui/ConfigurationGetter.py \
  31. || die "Failed to patch ConfigurationGetter.py"
  32. fi
  33. }
  34. src_compile() {
  35. :
  36. }
  37. src_install() {
  38. local MY_MAKEOPTS=( DESTDIR="${D}" PREFIX=/usr )
  39. use client && \
  40. emake "${MY_MAKEOPTS[@]}" VLC_SUPPORT=$(usex vlc true false) install-client
  41. use server && \
  42. emake "${MY_MAKEOPTS[@]}" install-server
  43. }
  44. pkg_postinst() {
  45. if use client; then
  46. einfo "Syncplay supports the following players:"
  47. einfo "media-video/mpv, media-video/mplayer2, media-video/vlc"
  48. fi
  49. }