vdr-streamdev-0.6.1.ebuild 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit vdr-plugin-2
  5. VERSION="1580" # every bump, new version !
  6. DESCRIPTION="VDR Plugin: Client/Server and http streaming plugin"
  7. HOMEPAGE="http://projects.vdr-developer.org/projects/plg-streamdev"
  8. SRC_URI="mirror://vdr-developerorg/${VERSION}/${P}.tgz"
  9. LICENSE="GPL-2"
  10. SLOT="0"
  11. KEYWORDS="amd64 x86"
  12. IUSE="client +server"
  13. DEPEND=">=media-video/vdr-1.7.25"
  14. RDEPEND="${DEPEND}"
  15. REQUIRED_USE="|| ( client server )"
  16. # vdr-plugin-2.eclass changes
  17. PO_SUBDIR="client server"
  18. src_prepare() {
  19. # make detection in vdr-plugin-2.eclass for new Makefile handling happy
  20. echo "# SOFILE" >> Makefile
  21. # rm unneeded entry
  22. sed -i Makefile -e "s:-I\$(VDRDIR)/include::"
  23. vdr-plugin-2_src_prepare
  24. for flag in client server; do
  25. if ! use ${flag}; then
  26. sed -i Makefile \
  27. -e '/^.PHONY:/s/'${flag}'//' \
  28. -e '/^.PHONY:/s/'install-${flag}'//' \
  29. -e '/^all:/s/'${flag}'//' \
  30. -e '/^install:/s/'install-${flag}'//'
  31. fi
  32. done
  33. fix_vdr_libsi_include server/livestreamer.c
  34. }
  35. src_install() {
  36. vdr-plugin-2_src_install
  37. if use server; then
  38. insinto /usr/share/vdr/streamdev
  39. doins streamdev-server/externremux.sh
  40. insinto /usr/share/vdr/rcscript
  41. newins "${FILESDIR}"/rc-addon-0.6.0.sh plugin-streamdev-server.sh
  42. newconfd "${FILESDIR}"/confd-0.6.0 vdr.streamdev-server
  43. insinto /etc/vdr/plugins/streamdev-server
  44. newins streamdev-server/streamdevhosts.conf streamdevhosts.conf
  45. fowners vdr:vdr /etc/vdr -R
  46. fi
  47. }
  48. pkg_preinst() {
  49. has_version "<${CATEGORY}/${PN}-0.6.0"
  50. previous_less_than_0_6_0=$?
  51. }
  52. pkg_postinst() {
  53. vdr-plugin-2_pkg_postinst
  54. if [[ -e "${ROOT}"/etc/vdr/plugins/streamdev/streamdevhosts.conf ]]; then
  55. einfo "move config file to new config DIR ${ROOT}/etc/vdr/plugins/streamdev-server/"
  56. mv "${ROOT}"/etc/vdr/plugins/streamdev/streamdevhosts.conf "${ROOT}"/etc/vdr/plugins/streamdev-server/streamdevhosts.conf
  57. fi
  58. if [[ $previous_less_than_0_6_0 = 0 ]]; then
  59. einfo "The server-side setting \"Suspend behaviour\" has been dropped in 0.6.0 in favour"
  60. einfo "of priority based precedence. A priority of 0 and above means that clients"
  61. einfo "have precedence. A negative priority gives precedence to local live TV on the"
  62. einfo "server. So if \"Suspend behaviour\" was previously set to \"Client may suspend\" or"
  63. einfo "\"Never suspended\", you will have to configure a negative priority. If the"
  64. einfo "\"Suspend behaviour\" was set to \"Always suspended\", the default values should do."
  65. einfo ""
  66. einfo "Configure the desired priorities for HTTP and IGMP Multicast streaming in the"
  67. einfo "settings of streamdev-server. If you haven't updated all your streamdev-clients"
  68. einfo "to at least 0.5.2, configure \"Legacy Client Priority\", too."
  69. einfo ""
  70. einfo "In streamdev-client, you should set \"Minimum Priority\" to -99. Adjust \"Live TV"
  71. einfo "Priority\" if necessary."
  72. fi
  73. }