noad-0.7.3-r1.ebuild 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. # Copyright 1999-2013 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit autotools eutils toolchain-funcs
  5. DESCRIPTION="Mark commercial Breaks in VDR records"
  6. HOMEPAGE="http://noad.heliohost.org/"
  7. SRC_URI="http://noad.heliohost.org/${P}.tar.bz2"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="amd64 x86"
  11. IUSE="ffmpeg"
  12. RDEPEND="media-gfx/imagemagick
  13. media-libs/libmpeg2:=
  14. ffmpeg? ( virtual/ffmpeg )
  15. !media-plugins/vdr-markad"
  16. DEPEND="${RDEPEND}
  17. virtual/pkgconfig"
  18. src_prepare() {
  19. EPATCH_FORCE=yes EPATCH_SUFFIX=diff EPATCH_SOURCE="${FILESDIR}"/patches-${PV%.*}.x epatch
  20. if has_version '>=media-video/vdr-1.7.15'; then
  21. sed -i -e 's:2001:6419:' -i svdrpc.cpp || die
  22. fi
  23. sed -i -e '/CXXFLAGS.*O3/d' configure.ac || die #426746
  24. sed -i \
  25. -e "s:-lMagick++:$($(tc-getPKG_CONFIG) --libs-only-l Magick++):" \
  26. Makefile.am || die #467134
  27. # FIXME: --with-tools, markpics will compile but showindex won't!
  28. sed -i \
  29. -e '/^noinst_PROGRAMS/s:@TOOLSRC@::' \
  30. -e '/^EXTRA_PROGRAMS/s:showindex::' \
  31. Makefile.am || die
  32. # ld: audiotools.o: undefined reference to symbol 'av_free@@LIBAVUTIL_51'
  33. if use ffmpeg; then
  34. sed -i -e 's:-lavcodec:& -lavutil:' configure.ac || die
  35. fi
  36. eautoreconf
  37. }
  38. src_configure() {
  39. econf \
  40. --with-magick \
  41. --with-mpeginclude=/usr/include/mpeg2dec \
  42. --with-tools \
  43. $(usex ffmpeg '--with-ffmpeg --with-ffmpeginclude=/usr/include' '')
  44. }
  45. src_install() {
  46. dobin noad markpics # showindex
  47. dodoc README INSTALL
  48. # example scripts are installed as dokumentation
  49. dodoc allnewnoad allnoad allnoadnice clearlogos noadifnew stat2html
  50. newconfd "${FILESDIR}"/confd_vdraddon.noad vdraddon.noad
  51. insinto /usr/share/vdr/record
  52. doins "${FILESDIR}"/record-50-noad.sh
  53. insinto /usr/share/vdr/shutdown
  54. doins "${FILESDIR}"/pre-shutdown-15-noad.sh
  55. insinto /etc/vdr/reccmds
  56. doins "${FILESDIR}"/reccmds.noad.conf
  57. exeinto /usr/share/vdr/bin
  58. doexe "${FILESDIR}"/noad-reccmd
  59. }
  60. pkg_postinst() {
  61. elog
  62. elog "To integrate noad in VDR you should do this:"
  63. elog
  64. elog "start and set Parameter in /etc/conf.d/vdraddon.noad"
  65. elog
  66. elog "Note: You can use here all pararmeters for noad,"
  67. elog "please look in the documentation of noad."
  68. }