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