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.

120 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_CPE_ID:=cpe:/a:libshout:libshout
  17. PKG_FIXUP:=autoreconf
  18. PKG_INSTALL:=1
  19. PKG_BUILD_PARALLEL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/libshout/default
  22. SECTION:=libs
  23. CATEGORY:=Libraries
  24. TITLE:=Shoutcast client library
  25. URL:=http://www.icecast.org
  26. DEPENDS:= +libvorbisidec +libpthread
  27. endef
  28. define Package/libshout
  29. $(call Package/libshout/default)
  30. TITLE+= (no theora)
  31. DEPENDS+= +libopenssl
  32. VARIANT:=notheora
  33. endef
  34. define Package/libshout-nossl
  35. $(call Package/libshout/default)
  36. TITLE+= (no ssl/theora)
  37. VARIANT:=nossl
  38. endef
  39. define Package/libshout-full
  40. $(call Package/libshout/default)
  41. TITLE+=(full)
  42. DEPENDS+= +libtheora +libopenssl
  43. VARIANT:=full
  44. endef
  45. define Package/libshout/description/default
  46. libshout allows applications to easily communicate and broadcast
  47. to an Icecast streaming media server. It handles the socket connections,
  48. metadata communication, and data streaming for the calling application,
  49. and lets developers focus on feature sets instead of implementation
  50. details.
  51. endef
  52. define Package/libshout/description
  53. $(call Package/libshout/description/default)
  54. .
  55. This package does not have Theora support.
  56. endef
  57. define Package/libshout-nossl/description
  58. $(call Package/libshout/description/default)
  59. .
  60. This package does not have OpenSSL or Theora support.
  61. endef
  62. Package/libshout-full/description=$(Package/libshout/description/default)
  63. CONFIGURE_ARGS += \
  64. --enable-shared \
  65. --enable-static \
  66. --disable-speex \
  67. --without-pic
  68. ifeq ($(BUILD_VARIANT),notheora)
  69. CONFIGURE_ARGS += --disable-theora
  70. endif
  71. ifeq ($(BUILD_VARIANT),nossl)
  72. CONFIGURE_ARGS += --disable-theora --without-openssl
  73. endif
  74. CONFIGURE_VARS += \
  75. VORBIS_CFLAGS="-I$(STAGING_DIR)/usr/include/tremor/" \
  76. VORBIS_LIBS="$(TARGET_LDFLAGS) -lvorbisidec" \
  77. TARGET_CFLAGS += $(FPIC)
  78. PACKAGE_CONFIG_FILE=shout$(if $(findstring $(BUILD_VARIANT),full),-full).pc
  79. define Build/InstallDev
  80. $(INSTALL_DIR) $(1)/usr/include
  81. $(CP) $(PKG_INSTALL_DIR)/usr/include/shout $(1)/usr/include/
  82. $(INSTALL_DIR) $(1)/usr/lib
  83. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libshout.{a,so*} $(1)/usr/lib/
  84. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  85. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/shout.pc $(1)/usr/lib/pkgconfig/$(PACKAGE_CONFIG_FILE)
  86. $(SED) 's| -I/usr/include||' $(1)/usr/lib/pkgconfig/$(PACKAGE_CONFIG_FILE)
  87. endef
  88. define Package/libshout/install
  89. $(INSTALL_DIR) $(1)/usr/lib
  90. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libshout.so.* $(1)/usr/lib/
  91. endef
  92. Package/libshout-full/install=$(Package/libshout/install)
  93. Package/libshout-nossl/install=$(Package/libshout/install)
  94. $(eval $(call BuildPackage,libshout))
  95. $(eval $(call BuildPackage,libshout-nossl))
  96. $(eval $(call BuildPackage,libshout-full))