dvbstream-0.7_pre20080516-r1.ebuild 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit toolchain-funcs
  5. DESCRIPTION="RTP multicast stream server and other tools for DVB cards"
  6. HOMEPAGE="https://sourceforge.net/projects/dvbtools"
  7. MY_P="${PN}-snapshot-20080302"
  8. SRC_URI="mirror://gentoo/${MY_P}.tar.bz2"
  9. LICENSE="GPL-2"
  10. SLOT="0"
  11. KEYWORDS="~amd64 ~x86"
  12. IUSE=""
  13. RDEPEND="dev-lang/perl"
  14. DEPEND="virtual/linuxtv-dvb-headers"
  15. S="${WORKDIR}/${PN}"
  16. PATCHES=(
  17. "${FILESDIR}/${P}-update.diff"
  18. "${FILESDIR}/${PN}-0.7_pre20080302-telnet-port-switch.diff"
  19. )
  20. src_prepare() {
  21. default
  22. sed -i Makefile \
  23. -e 's:$(CFLAGS):$(CFLAGS) $(CPPFLAGS):' \
  24. -e '/CFLAGS.*=.*-g -Wall -O2/s:-g -Wall -O2::' \
  25. -e '/CFLAGS.*=/s:CFLAGS:CPPFLAGS:' \
  26. -e 's:-I \.\./DVB/include:-I /usr/include:' \
  27. -e 's:$(CC):$(CC) $(LDFLAGS):g' \
  28. || die 'failed to fix flags in the Makefile'
  29. sed -e 's:\./svdrpsend.pl:dvbstream-send.pl:' \
  30. -i TELNET/*.sh \
  31. || die 'failed to rename the svdrpsend.pl command in scripts'
  32. sed -e 's:^DUMPRTP=.*$:DUMPRTP=dumprtp:' \
  33. -e 's:^TS2ES=.*$:TS2ES=ts2es:' \
  34. -i *.sh \
  35. || die 'failed to set DUMPRTP and TS2ES in scripts'
  36. }
  37. src_compile() {
  38. emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}"
  39. }
  40. src_install() {
  41. dobin dvbstream dumprtp rtpfeed ts_filter
  42. newbin TELNET/svdrpsend.pl dvbstream-send.pl
  43. dodoc README*
  44. newdoc TELNET/README README.telnet
  45. insinto "/usr/share/doc/${PF}/tune"
  46. doins TELNET/*.sh
  47. insinto "/usr/share/doc/${PF}/multicast"
  48. doins *.sh
  49. }