1
0

Makefile 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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_MD5SUM:=89cebf8cb0197f639cde69c95177fe47
  13. PKG_HASH:=f3acb8dec26f2dbf6df778888e0e429a4ce9378a9d461b02a7ccbf2991bbf24d
  14. PKG_LICENSE:=LGPL-2.0+
  15. PKG_LICENSE_FILES:=COPYING
  16. PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>, \
  17. Ted Hess <thess@kitschensync.net>
  18. PKG_FIXUP:=autoreconf
  19. PKG_INSTALL:=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. ifeq ($(BUILD_VARIANT),notheora)
  68. CONFIGURE_ARGS += --disable-theora
  69. endif
  70. ifeq ($(BUILD_VARIANT),nossl)
  71. CONFIGURE_ARGS += --disable-theora --with-openssl="no"
  72. endif
  73. CONFIGURE_VARS += \
  74. VORBIS_CFLAGS="-I$(STAGING_DIR)/usr/include/tremor/" \
  75. VORBIS_LIBS="$(TARGET_LDFLAGS) -lvorbisidec" \
  76. TARGET_CFLAGS += $(FPIC) -Wl,-rpath-link="$(STAGING_DIR)/usr/lib"
  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))