You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

96 lines
2.7 KiB

  1. #
  2. # Copyright (C) 2006-2011 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=icecast
  9. PKG_VERSION:=2.4.3
  10. PKG_RELEASE:=2
  11. PKG_LICENSE:=GPL-2.0
  12. PKG_MAINTAINER:=André Gaul <andre@gaul.io>
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  14. PKG_SOURCE_URL:=http://downloads.xiph.org/releases/icecast/
  15. PKG_MD5SUM:=83d7d34dbe22f0f8fc119d2c9839efc0
  16. PKG_FIXUP:=autoreconf
  17. include $(INCLUDE_DIR)/package.mk
  18. TREMOR_BUILD_DIR=$(PKG_BUILD_DIR)/libvorbisidec-1.2.0-dave
  19. TREMOR_DIR=$(TREMOR_BUILD_DIR)/ipkg-install/usr
  20. define Package/icecast
  21. SECTION:=multimedia
  22. CATEGORY:=Multimedia
  23. DEPENDS:=+libcurl +libxml2 +libxslt +libogg +libopenssl
  24. TITLE:=A streaming media server for Ogg/Vorbis and MP3 audio streams
  25. USERID:=icecast=87:icecast=87
  26. URL:=http://www.icecast.org/
  27. endef
  28. define Package/icecast/description
  29. Icecast is a streaming media server which currently supports Ogg
  30. Vorbis and MP3 audio streams. It can be used to create an Internet
  31. radio station or a privately running jukebox and many things in
  32. between. It is very versatile in that new formats can be added
  33. relatively easily and supports open standards for commuincation and
  34. interaction.
  35. endef
  36. define Build/Prepare
  37. $(Build/Prepare/Default)
  38. $(SUBMAKE) -f libvorbisidec.mk \
  39. BUILD_DIR="$(PKG_BUILD_DIR)" \
  40. V=99 \
  41. prepare
  42. endef
  43. define Build/Configure
  44. $(MAKE) -f libvorbisidec.mk \
  45. BUILD_DIR="$(PKG_BUILD_DIR)" \
  46. V=99 \
  47. compile
  48. $(SED) 's,-lvorbis ,$(TREMOR_DIR)/lib/libvorbisidec.a -logg ,g' $(PKG_BUILD_DIR)/configure
  49. $(call Build/Configure/Default, \
  50. --enable-yp \
  51. --with-curl="yes" \
  52. --with-curl-config="$(STAGING_DIR)/usr/bin/curl-config" \
  53. --with-ogg="$(STAGING_DIR)/usr" \
  54. --with-speex="no" \
  55. --with-theora="no" \
  56. --with-vorbis="$(TREMOR_DIR)" \
  57. --with-xslt-config="$(STAGING_DIR)/usr/bin/xslt-config" \
  58. , \
  59. CPPFLAGS="-I$(TREMOR_DIR)/include -I$(STAGING_DIR)/usr/include/libxml2 $(TARGET_CPPFLAGS)" \
  60. )
  61. endef
  62. define Build/Compile
  63. $(MAKE) -C $(PKG_BUILD_DIR) \
  64. DESTDIR="$(PKG_INSTALL_DIR)" \
  65. INCLUDES="-I$(PKG_BUILD_DIR)/src -I$(TREMOR_DIR)/include" \
  66. all install
  67. endef
  68. define Package/icecast/install
  69. $(INSTALL_DIR) $(1)/etc
  70. $(CP) $(PKG_INSTALL_DIR)/etc/icecast.xml $(1)/etc/
  71. $(INSTALL_DIR) $(1)/etc/init.d
  72. $(INSTALL_BIN) ./files/icecast.init $(1)/etc/init.d/icecast
  73. $(INSTALL_DIR) $(1)/usr/bin
  74. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/icecast $(1)/usr/bin/
  75. $(INSTALL_DIR) $(1)/usr/share/icecast
  76. $(CP) $(PKG_INSTALL_DIR)/usr/share/icecast/admin $(1)/usr/share/icecast/
  77. $(CP) $(PKG_INSTALL_DIR)/usr/share/icecast/web $(1)/usr/share/icecast/
  78. endef
  79. define Package/icecast/conffiles
  80. /etc/icecast.xml
  81. endef
  82. $(eval $(call BuildPackage,icecast))