commit:     fe6903ae55fe18fed5d69c1e8ae5849f122df642
Author:     Nicolas PARLANT <nicolas.parlant <AT> parhuet <DOT> fr>
AuthorDate: Thu Jan 15 05:40:28 2026 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jan 15 19:29:52 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fe6903ae

net-misc/icecast: add 2.5.0

update EAPI 7->8

prepare the ebuild for test, restricted for now (few failures)

add geoip for libmaxmindb
rm kate, removed by upstream
add rdeps app-crypt/rhash, media-libs/libigloo, sys-libs/libxcrypt

filter-lto because of libigloo

fix a typo that made the options inoperative since 2.4.4 (2018)

use icecast-minimal.xml.dist as default configfile
new initd/service with unprivileged user
new logrotate-file updated with right permissions

rm postinst_pkg, logs are created by icecast

it needs to be rekeyworded with libigloo

Closes: https://bugs.gentoo.org/708216
Closes: https://bugs.gentoo.org/968370
Signed-off-by: Nicolas PARLANT <nicolas.parlant <AT> parhuet.fr>
Part-of: https://github.com/gentoo/gentoo/pull/45385
Closes: https://github.com/gentoo/gentoo/pull/45385
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-misc/icecast/Manifest                   |   1 +
 net-misc/icecast/files/icecast.initd-r1     |  21 ++++++
 net-misc/icecast/files/icecast.logrotate-r1 |  10 +++
 net-misc/icecast/files/icecast.service-r1   |  13 ++++
 net-misc/icecast/icecast-2.5.0.ebuild       | 109 ++++++++++++++++++++++++++++
 5 files changed, 154 insertions(+)

diff --git a/net-misc/icecast/Manifest b/net-misc/icecast/Manifest
index ff7441eddc67..b5a95e62e2f2 100644
--- a/net-misc/icecast/Manifest
+++ b/net-misc/icecast/Manifest
@@ -1 +1,2 @@
 DIST icecast-2.4.4.tar.gz 2360592 BLAKE2B 
fd4034749feb4bf38c684ac6d8de572fdebce875843dc1be286264c8fe8d38feb24ea889b07ec79aada34cf16dae46eb21a8c5470f67c08f2dd56dc04c12130f
 SHA512 
e9ffb478cac2570891787455591d881a59185e067bb36f51706a7070cd9d82d80425ec8cf151f5ebb17d1b75654449fc760f8b82a1bb05f020b47ec09e46b4d0
+DIST icecast-2.5.0.tar.gz 1605985 BLAKE2B 
0eb3166c6025b095760694ad5e9c7cac7fef8a1d195896b0848eec20b495663890df9dcfb06475eadecc736394c0884b4b5dd444066d19fd78dfcbe71f694985
 SHA512 
d92ce5d8ae1cd011eaa8c7424adea744f35e5c2d3e8244d362743be1c6bbc8fc44d76d7a212cf1eebe79da9b7d83b2ed5ab8659fb97929af316674b5ddf590b5

diff --git a/net-misc/icecast/files/icecast.initd-r1 
b/net-misc/icecast/files/icecast.initd-r1
new file mode 100644
index 000000000000..d7d857cba293
--- /dev/null
+++ b/net-misc/icecast/files/icecast.initd-r1
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+# Copyright 1999-2026 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_started_commands="reload"
+
+pidfile="/run/icecast.pid"
+command="/usr/bin/icecast"
+command_args="-c /etc/icecast2/icecast.xml"
+command_user="${USER:-icecast}:${GROUP:-icecast}"
+command_background="true"
+
+depend() {
+       need net
+}
+
+reload() {
+       ebegin "Reloading Icecast2 configuration"
+       start-stop-daemon --signal HUP --pidfile ${pidfile}
+       eend $?
+}

diff --git a/net-misc/icecast/files/icecast.logrotate-r1 
b/net-misc/icecast/files/icecast.logrotate-r1
new file mode 100644
index 000000000000..4bffb808bda5
--- /dev/null
+++ b/net-misc/icecast/files/icecast.logrotate-r1
@@ -0,0 +1,10 @@
+/var/log/icecast/*log {
+       su icecast icecast
+       missingok
+       notifempty
+       sharedscripts
+       postrotate
+       test -e /run/openrc/softlevel && /etc/init.d/icecast reload > /dev/null 
2>&1 || true
+       test -e /run/systemd/system && systemctl reload icecast.service > 
/dev/null 2>&1 || true
+       endscript
+}

diff --git a/net-misc/icecast/files/icecast.service-r1 
b/net-misc/icecast/files/icecast.service-r1
new file mode 100644
index 000000000000..01acd6fb5049
--- /dev/null
+++ b/net-misc/icecast/files/icecast.service-r1
@@ -0,0 +1,13 @@
+[Unit]
+Description=An opensource alternative to shoutcast
+After=network.target
+ 
+[Service]
+User=icecast
+Group=icecast
+ExecStart=/usr/bin/icecast -c /etc/icecast2/icecast.xml
+ExecReload=/usr/bin/kill -HUP $MAINPID
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target

diff --git a/net-misc/icecast/icecast-2.5.0.ebuild 
b/net-misc/icecast/icecast-2.5.0.ebuild
new file mode 100644
index 000000000000..233f4aafcb93
--- /dev/null
+++ b/net-misc/icecast/icecast-2.5.0.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools eapi9-ver flag-o-matic systemd
+
+DESCRIPTION="Opensource alternative to shoutcast that supports mp3, ogg and 
aac streaming"
+HOMEPAGE="https://www.icecast.org/";
+SRC_URI="https://downloads.xiph.org/releases/icecast/${P}.tar.gz";
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="geoip +speex selinux +ssl test +theora +yp"
+# TODO: few tests fail
+RESTRICT="test"
+
+#Although there is a --with-ogg and --with-vorbis configure option, they're
+#only useful for specifying paths, not for disabling.
+DEPEND="
+       acct-group/icecast
+       acct-user/icecast
+       app-crypt/rhash:=
+       >=dev-libs/libigloo-0.9.5
+       dev-libs/libxml2:=
+       dev-libs/libxslt
+       media-libs/libogg
+       media-libs/libvorbis
+       virtual/libcrypt:=
+       geoip? ( >=dev-libs/libmaxminddb-1.3.2:= )
+       speex? ( media-libs/speex )
+       ssl? ( dev-libs/openssl:0= )
+       theora? ( media-libs/libtheora:= )
+       yp? ( net-misc/curl )
+"
+RDEPEND="
+       ${DEPEND}
+       selinux? ( sec-policy/selinux-icecast )
+"
+BDEPEND="
+       virtual/pkgconfig
+       test? ( media-video/ffmpeg )
+"
+
+src_prepare() {
+       default
+
+       # fix clang
+       eautoconf
+}
+
+src_configure() {
+       # lto-mismatch, see libigloo
+       filter-lto
+
+       local myeconfargs=(
+               --localstatedir="${EPREFIX}/var"
+               --sysconfdir=/etc/icecast2
+               $(use_with geoip maxminddb)
+               $(use_with speex)
+               $(use_with ssl openssl)
+               $(use_with theora)
+               $(use_enable yp)
+               $(use_with yp curl)
+       )
+       econf "${myeconfargs[@]}"
+}
+
+src_test() {
+       emake -j1 check
+}
+
+src_install() {
+       local HTML_DOCS=( doc/. )
+
+       default
+
+       dodoc conf/*.xml.dist
+       # clean doc
+       find "${ED}"/usr/share/doc/${PF} -name "Makefile*" -delete || die
+       rm -r "${ED}"/usr/share/doc/icecast || die
+       rm -r "${ED}"/usr/share/icecast/doc || die
+
+       newinitd "${FILESDIR}"/${PN}.initd-r1 ${PN}
+       systemd_newunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service
+
+       insinto /etc/icecast2
+       insopts -m0640 -g icecast
+       newins conf/icecast_minimal.xml.dist icecast.xml
+
+       dodir /etc/logrotate.d
+       insopts -m0644
+       insinto /etc/logrotate.d
+       newins "${FILESDIR}"/${PN}.logrotate-r1 ${PN}.logrotate
+
+       diropts -m0764 -o icecast -g icecast
+       dodir /var/log/icecast
+       keepdir /var/log/icecast
+}
+
+pkg_postinst() {
+       if ver_replacing -lt 2.5.0; then
+               ewarn "Daemon is now launched with unprivileged icecast:icecast 
by OpenRC/systemd."
+               ewarn "To prevent permission conflicts, please check existing 
files/dir:"
+               ewarn "    ${EROOT}/etc/icecast2/icecast.xml"
+               ewarn "    ${EROOT}/var/log/icecast"
+       fi
+}

Reply via email to