icecast-2.4.3.ebuild 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit autotools systemd user
  5. DESCRIPTION="Opensource alternative to shoutcast that supports mp3, ogg and aac streaming"
  6. HOMEPAGE="http://www.icecast.org/"
  7. SRC_URI="http://downloads.xiph.org/releases/icecast/${P}.tar.gz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="amd64 ppc ppc64 x86 ~x86-fbsd"
  11. IUSE="kate libressl logrotate +speex +ssl +theora +yp"
  12. #Although there is a --with-ogg and --with-orbis configure option, they're
  13. #only useful for specifying paths, not for disabling.
  14. DEPEND="dev-libs/libxslt
  15. dev-libs/libxml2
  16. media-libs/libogg
  17. media-libs/libvorbis
  18. kate? ( media-libs/libkate )
  19. logrotate? ( app-admin/logrotate )
  20. speex? ( media-libs/speex )
  21. theora? ( media-libs/libtheora )
  22. yp? ( net-misc/curl )
  23. ssl? (
  24. !libressl? ( dev-libs/openssl:0= )
  25. libressl? ( dev-libs/libressl:0= )
  26. )"
  27. RDEPEND="${DEPEND}"
  28. pkg_setup() {
  29. enewuser icecast -1 -1 -1 nogroup
  30. }
  31. PATCHES=(
  32. # bug #368539
  33. "${FILESDIR}"/${PN}-2.3.3-libkate.patch
  34. # bug #430434
  35. "${FILESDIR}"/${PN}-2.3.3-fix-xiph_openssl.patch
  36. )
  37. src_prepare() {
  38. default
  39. mv configure.{in,ac} || die
  40. eautoreconf
  41. }
  42. src_configure() {
  43. econf \
  44. --disable-dependency-tracking \
  45. --docdir=/usr/share/doc/${PF} \
  46. --sysconfdir=/etc/icecast2 \
  47. $(use_enable kate) \
  48. $(use_with theora) \
  49. $(use_with speex) \
  50. $(use_with yp curl) \
  51. $(use_with ssl openssl) \
  52. $(use_enable yp)
  53. }
  54. src_install() {
  55. emake DESTDIR="${D}" install
  56. dodoc AUTHORS README TODO HACKING NEWS conf/icecast.xml.dist
  57. docinto html
  58. dodoc doc/*.html
  59. newinitd "${FILESDIR}"/${PN}.initd ${PN}
  60. systemd_dounit "${FILESDIR}"/${PN}.service
  61. insinto /etc/icecast2
  62. doins "${FILESDIR}"/icecast.xml
  63. fperms 600 /etc/icecast2/icecast.xml
  64. if use logrotate; then
  65. dodir /etc/logrotate.d
  66. insopts -m0644
  67. insinto /etc/logrotate.d
  68. newins "${FILESDIR}"/${PN}.logrotate ${PN}
  69. fi
  70. diropts -m0764 -o icecast -g nogroup
  71. dodir /var/log/icecast
  72. keepdir /var/log/icecast
  73. rm -r "${D}"/usr/share/doc/icecast || die
  74. }
  75. pkg_postinst() {
  76. touch "${ROOT}"var/log/icecast/{access,error}.log
  77. chown icecast:nogroup "${ROOT}"var/log/icecast/{access,error}.log
  78. }