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