From bc74b173d7f1f510f99355724a82e76069a661f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Gaul?= Date: Fri, 25 Jul 2014 12:45:45 +0200 Subject: [PATCH 1/5] [icecast] import from old packages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: André Gaul --- multimedia/icecast/Makefile | 91 ++++++++++ multimedia/icecast/libvorbisidec.mk | 41 +++++ .../patches/001-icecast-2.3.0-tremor.patch | 155 ++++++++++++++++++ .../patches/010-fix_libcurl_test_crap.patch | 11 ++ 4 files changed, 298 insertions(+) create mode 100644 multimedia/icecast/Makefile create mode 100644 multimedia/icecast/libvorbisidec.mk create mode 100644 multimedia/icecast/patches/001-icecast-2.3.0-tremor.patch create mode 100644 multimedia/icecast/patches/010-fix_libcurl_test_crap.patch diff --git a/multimedia/icecast/Makefile b/multimedia/icecast/Makefile new file mode 100644 index 000000000..e9f290426 --- /dev/null +++ b/multimedia/icecast/Makefile @@ -0,0 +1,91 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=icecast +PKG_VERSION:=2.3.2 +PKG_RELEASE:=4 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://downloads.us.xiph.org/releases/icecast/ +PKG_MD5SUM:=ff516b3ccd2bcc31e68f460cd316093f + +PKG_FIXUP:=autoreconf + +include $(INCLUDE_DIR)/package.mk + +TREMOR_BUILD_DIR=$(PKG_BUILD_DIR)/libvorbisidec-1.2.0-dave +TREMOR_DIR=$(TREMOR_BUILD_DIR)/ipkg-install/usr + +define Package/icecast + SECTION:=multimedia + CATEGORY:=Multimedia + DEPENDS:=+libcurl +libxml2 +libxslt +libogg +libopenssl + TITLE:=A streaming media server for Ogg/Vorbis and MP3 audio streams + URL:=http://www.icecast.org/ +endef + +define Package/icecast/description + Icecast is a streaming media server which currently supports Ogg + Vorbis and MP3 audio streams. It can be used to create an Internet + radio station or a privately running jukebox and many things in + between. It is very versatile in that new formats can be added + relatively easily and supports open standards for commuincation and + interaction. +endef + +define Build/Prepare + $(Build/Prepare/Default) + $(SUBMAKE) -f libvorbisidec.mk \ + BUILD_DIR="$(PKG_BUILD_DIR)" \ + V=99 \ + prepare +endef + +define Build/Configure + $(MAKE) -f libvorbisidec.mk \ + BUILD_DIR="$(PKG_BUILD_DIR)" \ + V=99 \ + compile + $(SED) 's,-lvorbis ,$(TREMOR_DIR)/lib/libvorbisidec.a -logg ,g' $(PKG_BUILD_DIR)/configure + $(call Build/Configure/Default, \ + --enable-yp \ + --with-curl="yes" \ + --with-curl-config="$(STAGING_DIR)/usr/bin/curl-config" \ + --with-ogg="$(STAGING_DIR)/usr" \ + --with-speex="no" \ + --with-theora="no" \ + --with-vorbis="$(TREMOR_DIR)" \ + --with-xslt-config="$(STAGING_DIR)/usr/bin/xslt-config" \ + , \ + CPPFLAGS="-I$(TREMOR_DIR)/include -I$(STAGING_DIR)/usr/include/libxml2 $(TARGET_CPPFLAGS)" \ + ) +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + INCLUDES="-I$(PKG_BUILD_DIR)/src -I$(TREMOR_DIR)/include" \ + all install +endef + +define Package/icecast/install + $(INSTALL_DIR) $(1)/etc + $(CP) $(PKG_INSTALL_DIR)/etc/icecast.xml $(1)/etc/ + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/icecast $(1)/usr/bin/ + $(INSTALL_DIR) $(1)/usr/share/icecast + $(CP) $(PKG_INSTALL_DIR)/usr/share/icecast/admin $(1)/usr/share/icecast/ + $(CP) $(PKG_INSTALL_DIR)/usr/share/icecast/web $(1)/usr/share/icecast/ +endef + +define Package/icecast/conffiles +/etc/icecast.xml +endef + +$(eval $(call BuildPackage,icecast)) diff --git a/multimedia/icecast/libvorbisidec.mk b/multimedia/icecast/libvorbisidec.mk new file mode 100644 index 000000000..eda6e7620 --- /dev/null +++ b/multimedia/icecast/libvorbisidec.mk @@ -0,0 +1,41 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=icecast-libvorbisidec +PKG_VERSION:=1.2.0-dave +PKG_RELEASE:=1 + +PKG_SOURCE:=libvorbisidec-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://users.tpg.com.au/davico/openwrt/ +PKG_MD5SUM:=cb8e51aab92ef164f8e0e8853f7164fa + +PKG_BUILD_DIR:=$(BUILD_DIR)/libvorbisidec-$(PKG_VERSION) +PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install +PATCH_DIR=./patches-libvorbisidec + +include $(INCLUDE_DIR)/package.mk + +define Build/Configure + $(call Build/Configure/Default, \ + --disable-shared \ + --enable-static \ + ) +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + all install +endef + +define Build/InstallDev + true +endef + +$(eval $(call Build/DefaultTargets)) diff --git a/multimedia/icecast/patches/001-icecast-2.3.0-tremor.patch b/multimedia/icecast/patches/001-icecast-2.3.0-tremor.patch new file mode 100644 index 000000000..6fa6f0822 --- /dev/null +++ b/multimedia/icecast/patches/001-icecast-2.3.0-tremor.patch @@ -0,0 +1,155 @@ +--- a/src/format_flac.c ++++ b/src/format_flac.c +@@ -18,7 +18,7 @@ + #endif + + #include +-#include ++#include + #include + + typedef struct source_tag source_t; +--- a/src/format_midi.c ++++ b/src/format_midi.c +@@ -18,7 +18,7 @@ + #endif + + #include +-#include ++#include + #include + + typedef struct source_tag source_t; +--- a/src/format_ogg.c ++++ b/src/format_ogg.c +@@ -24,7 +24,7 @@ + #include + #include + +-#include ++#include + + #include "refbuf.h" + #include "source.h" +--- a/src/format_ogg.h ++++ b/src/format_ogg.h +@@ -18,7 +18,7 @@ + #ifndef __FORMAT_OGG_H__ + #define __FORMAT_OGG_H__ + +-#include ++#include + #include "refbuf.h" + #include "format.h" + +--- a/src/format_speex.c ++++ b/src/format_speex.c +@@ -18,7 +18,7 @@ + #endif + + #include +-#include ++#include + #include + + typedef struct source_tag source_t; +--- a/src/format_theora.c ++++ b/src/format_theora.c +@@ -18,7 +18,7 @@ + #endif + + #include +-#include ++#include + #include + + typedef struct source_tag source_t; +--- a/src/format_vorbis.c ++++ b/src/format_vorbis.c +@@ -18,8 +18,8 @@ + #endif + + #include +-#include +-#include ++#include ++#include + #include + #include + +--- a/src/source.c ++++ b/src/source.c +@@ -19,7 +19,7 @@ + #include + #include + #include +-#include ++#include + #include + + #ifndef _WIN32 +--- a/src/format_kate.c ++++ b/src/format_kate.c +@@ -19,7 +19,7 @@ + + #include + #include +-#include ++#include + #ifdef HAVE_KATE + #include + #endif +--- a/m4/vorbis.m4 ++++ b/m4/vorbis.m4 +@@ -38,9 +38,9 @@ if test "x$vorbis_prefix" != "x$ogg_pref + ]) + fi + +-VORBIS_LIBS="-lvorbis" +-VORBISFILE_LIBS="-lvorbisfile" +-VORBISENC_LIBS="-lvorbisenc" ++VORBIS_LIBS="-lvorbisidec" ++VORBISFILE_LIBS="-lvorbisidec" ++VORBISENC_LIBS="-lvorbisidec" + + xt_save_LIBS="$LIBS" + xt_save_LDFLAGS="$LDFLAGS" +@@ -58,18 +58,6 @@ AC_TRY_LINK_FUNC(ogg_stream_init, [xt_li + ) + ]) + +-if test "x$xt_lib_vorbis" = "xok"; then +-# +-# Now check if the installed Vorbis is sufficiently new. +-# +-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ +-#include +-#include +- ], [ +-struct ovectl_ratemanage_arg a; +-])],,[xt_lib_vorbis="old version found"]) +-AC_MSG_RESULT([$xt_lib_vorbis]) +-fi + CPPFLAGS="$xt_save_CPPFLAGS" + LIBS="$xt_save_LIBS" + LDFLAGS="$xt_save_LDFLAGS" +--- a/m4/ogg.m4 ++++ b/m4/ogg.m4 +@@ -29,7 +29,7 @@ XIPH_GCC_WARNING([-I$ogg_prefix/include] + ]) + AC_CACHE_CHECK([for libogg], xt_cv_lib_ogg, + [dnl +-OGG_LIBS="-logg" ++OGG_LIBS="-lvorbisidec" + + # + # check if the installed Ogg is sufficiently new. +@@ -42,7 +42,7 @@ LIBS="$LIBS $OGG_LIBS" + LDFLAGS="$LDFLAGS $OGG_LDFLAGS" + AC_TRY_LINK_FUNC(ogg_sync_init, + [ xt_cv_lib_ogg=ok ], +- [ AC_TRY_LINK([#include ],, ++ [ AC_TRY_LINK([#include ],, + [ xt_cv_lib_ogg="pre v1.0, needs updating" ], + [ xt_cv_lib_ogg="not found" ]) + ]) diff --git a/multimedia/icecast/patches/010-fix_libcurl_test_crap.patch b/multimedia/icecast/patches/010-fix_libcurl_test_crap.patch new file mode 100644 index 000000000..8da6e33b6 --- /dev/null +++ b/multimedia/icecast/patches/010-fix_libcurl_test_crap.patch @@ -0,0 +1,11 @@ +--- a/m4/xiph_curl.m4 ++++ b/m4/xiph_curl.m4 +@@ -52,7 +52,7 @@ AC_CHECK_HEADERS([curl/curl.h],, curl_ok + AC_MSG_CHECKING(for libcurl) + if test "$curl_ok" = "yes" + then +- AC_RUN_IFELSE(AC_LANG_SOURCE([ ++ AC_COMPILE_IFELSE(AC_LANG_SOURCE([ + #include + int main() + { From 369d05aeb13e72b9cac050364e323cdf4e47e0b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Gaul?= Date: Fri, 25 Jul 2014 14:43:03 +0200 Subject: [PATCH 2/5] [icecast] upgrade to 2.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: André Gaul --- multimedia/icecast/Makefile | 6 +++--- ...st-2.3.0-tremor.patch => 001-icecast-2.4.0-tremor.patch} | 0 2 files changed, 3 insertions(+), 3 deletions(-) rename multimedia/icecast/patches/{001-icecast-2.3.0-tremor.patch => 001-icecast-2.4.0-tremor.patch} (100%) diff --git a/multimedia/icecast/Makefile b/multimedia/icecast/Makefile index e9f290426..0dfab0238 100644 --- a/multimedia/icecast/Makefile +++ b/multimedia/icecast/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=icecast -PKG_VERSION:=2.3.2 -PKG_RELEASE:=4 +PKG_VERSION:=2.4.0 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://downloads.us.xiph.org/releases/icecast/ -PKG_MD5SUM:=ff516b3ccd2bcc31e68f460cd316093f +PKG_MD5SUM:=bb00bfc0d6d2dde24974641085602b81 PKG_FIXUP:=autoreconf diff --git a/multimedia/icecast/patches/001-icecast-2.3.0-tremor.patch b/multimedia/icecast/patches/001-icecast-2.4.0-tremor.patch similarity index 100% rename from multimedia/icecast/patches/001-icecast-2.3.0-tremor.patch rename to multimedia/icecast/patches/001-icecast-2.4.0-tremor.patch From edd031bca3d471cc1eb527fba90b517afa374459 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Gaul?= Date: Fri, 25 Jul 2014 17:17:29 +0200 Subject: [PATCH 3/5] [icecast] add minimalistic init script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: André Gaul --- multimedia/icecast/Makefile | 2 ++ multimedia/icecast/files/icecast.init | 14 ++++++++++++++ 2 files changed, 16 insertions(+) create mode 100755 multimedia/icecast/files/icecast.init diff --git a/multimedia/icecast/Makefile b/multimedia/icecast/Makefile index 0dfab0238..f70311298 100644 --- a/multimedia/icecast/Makefile +++ b/multimedia/icecast/Makefile @@ -77,6 +77,8 @@ endef define Package/icecast/install $(INSTALL_DIR) $(1)/etc $(CP) $(PKG_INSTALL_DIR)/etc/icecast.xml $(1)/etc/ + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/icecast.init $(1)/etc/init.d/icecast $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/icecast $(1)/usr/bin/ $(INSTALL_DIR) $(1)/usr/share/icecast diff --git a/multimedia/icecast/files/icecast.init b/multimedia/icecast/files/icecast.init new file mode 100755 index 000000000..11f9f5299 --- /dev/null +++ b/multimedia/icecast/files/icecast.init @@ -0,0 +1,14 @@ +#!/bin/sh /etc/rc.common +# Example script +# Copyright (C) 2014 OpenWrt.org + +START=99 +STOP=15 + +start() { + service_start /usr/bin/icecast -c /etc/icecast.xml -b +} + +stop() { + service_stop /usr/bin/icecast +} From ad4f81a2f5528d2b227bb3c00b4ab72449e2e836 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Gaul?= Date: Fri, 25 Jul 2014 19:31:28 +0200 Subject: [PATCH 4/5] [icecast] add maintainer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: André Gaul --- multimedia/icecast/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/multimedia/icecast/Makefile b/multimedia/icecast/Makefile index f70311298..f883eeefb 100644 --- a/multimedia/icecast/Makefile +++ b/multimedia/icecast/Makefile @@ -10,6 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=icecast PKG_VERSION:=2.4.0 PKG_RELEASE:=1 +PKG_MAINTAINER:=André Gaul PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://downloads.us.xiph.org/releases/icecast/ From 66b13d6ca7b01feac076a0371b4a680cd5cf50ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Gaul?= Date: Mon, 28 Jul 2014 09:47:29 +0200 Subject: [PATCH 5/5] [icecast] use procd for init script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: André Gaul --- multimedia/icecast/files/icecast.init | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/multimedia/icecast/files/icecast.init b/multimedia/icecast/files/icecast.init index 11f9f5299..355e4b716 100755 --- a/multimedia/icecast/files/icecast.init +++ b/multimedia/icecast/files/icecast.init @@ -2,13 +2,13 @@ # Example script # Copyright (C) 2014 OpenWrt.org +USE_PROCD=1 START=99 STOP=15 -start() { - service_start /usr/bin/icecast -c /etc/icecast.xml -b -} - -stop() { - service_stop /usr/bin/icecast +start_service() { + procd_open_instance + procd_set_param command /usr/bin/icecast -c /etc/icecast.xml + procd_set_param respawn + procd_close_instance }