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.

119 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.3
  8. PKG_RELEASE:=1
  9. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  10. PKG_SOURCE_URL:=https://downloads.us.xiph.org/releases/libshout/
  11. PKG_HASH:=0d8af55d1141bf90710bcd41a768c9cc5adb251502a0af1dd22c8da215d40dfe
  12. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  13. PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
  14. PKG_LICENSE:=LGPL-2.0-or-later
  15. PKG_LICENSE_FILES:=COPYING
  16. PKG_FIXUP:=autoreconf
  17. PKG_INSTALL:=1
  18. PKG_BUILD_PARALLEL:=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. --without-pic
  67. ifeq ($(BUILD_VARIANT),notheora)
  68. CONFIGURE_ARGS += --disable-theora
  69. endif
  70. ifeq ($(BUILD_VARIANT),nossl)
  71. CONFIGURE_ARGS += --disable-theora --without-openssl
  72. endif
  73. CONFIGURE_VARS += \
  74. VORBIS_CFLAGS="-I$(STAGING_DIR)/usr/include/tremor/" \
  75. VORBIS_LIBS="$(TARGET_LDFLAGS) -lvorbisidec" \
  76. TARGET_CFLAGS += $(FPIC)
  77. PACKAGE_CONFIG_FILE=shout$(if $(findstring $(BUILD_VARIANT),full),-full).pc
  78. define Build/InstallDev
  79. $(INSTALL_DIR) $(1)/usr/include
  80. $(CP) $(PKG_INSTALL_DIR)/usr/include/shout $(1)/usr/include/
  81. $(INSTALL_DIR) $(1)/usr/lib
  82. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libshout.{a,so*} $(1)/usr/lib/
  83. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  84. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/shout.pc $(1)/usr/lib/pkgconfig/$(PACKAGE_CONFIG_FILE)
  85. $(SED) 's| -I/usr/include||' $(1)/usr/lib/pkgconfig/$(PACKAGE_CONFIG_FILE)
  86. endef
  87. define Package/libshout/install
  88. $(INSTALL_DIR) $(1)/usr/lib
  89. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libshout.so.* $(1)/usr/lib/
  90. endef
  91. Package/libshout-full/install=$(Package/libshout/install)
  92. Package/libshout-nossl/install=$(Package/libshout/install)
  93. $(eval $(call BuildPackage,libshout))
  94. $(eval $(call BuildPackage,libshout-nossl))
  95. $(eval $(call BuildPackage,libshout-full))