Gentoo Linux Overlay
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

tvheadend-9999.ebuild 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. # $Id$
  4. EAPI=5
  5. inherit eutils git-r3 linux-info systemd toolchain-funcs user
  6. DESCRIPTION="Tvheadend is a TV streaming server and digital video recorder"
  7. HOMEPAGE="https://tvheadend.org/"
  8. EGIT_REPO_URI="git://github.com/tvheadend/tvheadend.git"
  9. #EGIT_COMMIT="cf800cb7ee190833695e739ac7cde5dc174c6d6f"
  10. LICENSE="GPL-3"
  11. SLOT="0"
  12. KEYWORDS="~amd64 ~x86"
  13. IUSE="avahi +capmt +constcw +cwc dbus +dvb ffmpeg hdhomerun libav +imagecache inotify +iptv +satip +timeshift uriparser xmltv zlib"
  14. RDEPEND="dev-libs/openssl:=
  15. virtual/libiconv
  16. avahi? ( net-dns/avahi )
  17. dbus? ( sys-apps/dbus )
  18. ffmpeg? (
  19. !libav? ( media-video/ffmpeg:0= )
  20. libav? ( media-video/libav:= )
  21. )
  22. hdhomerun? ( media-libs/libhdhomerun )
  23. uriparser? ( dev-libs/uriparser )
  24. zlib? ( sys-libs/zlib )"
  25. DEPEND="${RDEPEND}
  26. dvb? ( virtual/linuxtv-dvb-headers )
  27. capmt? ( virtual/linuxtv-dvb-headers )
  28. virtual/pkgconfig"
  29. RDEPEND+="
  30. xmltv? ( media-tv/xmltv )"
  31. CONFIG_CHECK="~INOTIFY_USER"
  32. DOCS=( README.md )
  33. pkg_setup() {
  34. enewuser tvheadend -1 -1 /dev/null video
  35. }
  36. src_prepare() {
  37. # remove '-Werror' wrt bug #438424
  38. sed -e 's:-Werror::' -i Makefile || die 'sed failed!'
  39. }
  40. src_configure() {
  41. econf --prefix="${EPREFIX}"/usr \
  42. --datadir="${EPREFIX}"/usr/share \
  43. --disable-hdhomerun_static \
  44. --disable-ffmpeg_static \
  45. --disable-ccache \
  46. --disable-dvbscan \
  47. $(use_enable avahi) \
  48. $(use_enable capmt) \
  49. $(use_enable constcw) \
  50. $(use_enable cwc) \
  51. $(use_enable dbus) \
  52. $(use_enable dvb linuxdvb) \
  53. $(use_enable ffmpeg libav) \
  54. $(use_enable hdhomerun hdhomerun_client) \
  55. $(use_enable imagecache) \
  56. $(use_enable inotify) \
  57. $(use_enable iptv) \
  58. $(use_enable satip satip_server) \
  59. $(use_enable satip satip_client) \
  60. $(use_enable timeshift) \
  61. $(use_enable uriparser) \
  62. $(use_enable zlib)
  63. }
  64. src_compile() {
  65. emake CC="$(tc-getCC)"
  66. }
  67. src_install() {
  68. default
  69. newinitd "${FILESDIR}/tvheadend.initd" tvheadend
  70. newconfd "${FILESDIR}/tvheadend.confd" tvheadend
  71. systemd_dounit "${FILESDIR}/tvheadend.service"
  72. dodir /etc/tvheadend
  73. fperms 0700 /etc/tvheadend
  74. fowners tvheadend:video /etc/tvheadend
  75. }
  76. pkg_postinst() {
  77. elog "The Tvheadend web interface can be reached at:"
  78. elog "http://localhost:9981/"
  79. elog
  80. elog "Make sure that you change the default username"
  81. elog "and password via the Configuration / Access control"
  82. elog "tab in the web interface."
  83. }