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.

118 lines
3.2 KiB

  1. #
  2. # This is free software, licensed under the GNU General Public License v2.
  3. # See /LICENSE for more information.
  4. #
  5. include $(TOPDIR)/rules.mk
  6. PKG_NAME:=libshout
  7. PKG_VERSION:=2.4.1
  8. PKG_RELEASE:=1
  9. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  10. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  11. PKG_SOURCE_URL:=http://downloads.us.xiph.org/releases/libshout/
  12. PKG_HASH:=f3acb8dec26f2dbf6df778888e0e429a4ce9378a9d461b02a7ccbf2991bbf24d
  13. PKG_LICENSE:=LGPL-2.0+
  14. PKG_LICENSE_FILES:=COPYING
  15. PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>, \
  16. Ted Hess <thess@kitschensync.net>
  17. PKG_FIXUP:=autoreconf
  18. PKG_INSTALL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/libshout/default
  21. SECTION:=libs
  22. CATEGORY:=Libraries
  23. TITLE:=Shoutcast client library
  24. URL:=http://www.icecast.org
  25. DEPENDS:= +libvorbisidec +libpthread
  26. endef
  27. define Package/libshout
  28. $(call Package/libshout/default)
  29. TITLE+= (no theora)
  30. DEPENDS+= +libopenssl
  31. VARIANT:=notheora
  32. endef
  33. define Package/libshout-nossl
  34. $(call Package/libshout/default)
  35. TITLE+= (no ssl/theora)
  36. VARIANT:=nossl
  37. endef
  38. define Package/libshout-full
  39. $(call Package/libshout/default)
  40. TITLE+=(full)
  41. DEPENDS+= +libtheora +libopenssl
  42. VARIANT:=full
  43. endef
  44. define Package/libshout/description/default
  45. libshout allows applications to easily communicate and broadcast
  46. to an Icecast streaming media server. It handles the socket connections,
  47. metadata communication, and data streaming for the calling application,
  48. and lets developers focus on feature sets instead of implementation
  49. details.
  50. endef
  51. define Package/libshout/description
  52. $(call Package/libshout/description/default)
  53. .
  54. This package does not have Theora support.
  55. endef
  56. define Package/libshout-nossl/description
  57. $(call Package/libshout/description/default)
  58. .
  59. This package does not have OpenSSL or Theora support.
  60. endef
  61. Package/libshout-full/description=$(Package/libshout/description/default)
  62. CONFIGURE_ARGS += \
  63. --enable-shared \
  64. --enable-static \
  65. --disable-speex
  66. ifeq ($(BUILD_VARIANT),notheora)
  67. CONFIGURE_ARGS += --disable-theora
  68. endif
  69. ifeq ($(BUILD_VARIANT),nossl)
  70. CONFIGURE_ARGS += --disable-theora --with-openssl="no"
  71. endif
  72. CONFIGURE_VARS += \
  73. VORBIS_CFLAGS="-I$(STAGING_DIR)/usr/include/tremor/" \
  74. VORBIS_LIBS="$(TARGET_LDFLAGS) -lvorbisidec" \
  75. TARGET_CFLAGS += $(FPIC) -Wl,-rpath-link="$(STAGING_DIR)/usr/lib"
  76. PACKAGE_CONFIG_FILE=shout$(if $(findstring $(BUILD_VARIANT),full),-full).pc
  77. define Build/InstallDev
  78. $(INSTALL_DIR) $(1)/usr/include
  79. $(CP) $(PKG_INSTALL_DIR)/usr/include/shout $(1)/usr/include/
  80. $(INSTALL_DIR) $(1)/usr/lib
  81. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libshout.{a,so*} $(1)/usr/lib/
  82. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  83. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/shout.pc $(1)/usr/lib/pkgconfig/$(PACKAGE_CONFIG_FILE)
  84. $(SED) 's| -I/usr/include||' $(1)/usr/lib/pkgconfig/$(PACKAGE_CONFIG_FILE)
  85. endef
  86. define Package/libshout/install
  87. $(INSTALL_DIR) $(1)/usr/lib
  88. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libshout.so.* $(1)/usr/lib/
  89. endef
  90. Package/libshout-full/install=$(Package/libshout/install)
  91. Package/libshout-nossl/install=$(Package/libshout/install)
  92. $(eval $(call BuildPackage,libshout))
  93. $(eval $(call BuildPackage,libshout-nossl))
  94. $(eval $(call BuildPackage,libshout-full))