Merge pull request #2064 from commodo/python-pip-ca-certs
[feed/packages.git] / libs / libshout / Makefile
1 #
2 # Copyright (C) 2008-2015 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=libshout
11 PKG_VERSION:=2.3.1
12 PKG_RELEASE:=3
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://downloads.us.xiph.org/releases/libshout/
17 PKG_MD5SUM:=11765b2592e7ea623ccd93d3f8df172c
18
19 PKG_LICENSE:=LGPL-2.0+
20 PKG_LICENSE_FILES:=COPYING
21 PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org>
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/download.php
33 DEPENDS:= +libvorbis +libvorbisidec +libpthread
34 endef
35
36 define Package/libshout
37 $(call Package/libshout/default)
38 TITLE+= (no speex & theora)
39 VARIANT:=nospeex
40 endef
41
42 define Package/libshout-full
43 $(call Package/libshout/default)
44 TITLE+= (all codecs)
45 DEPENDS+= +libspeex +libtheora
46 VARIANT:=full
47 endef
48
49 define Package/libshout/description
50 libshout allows applications to easily communicate and broadcast
51 to an Icecast streaming media server. It handles the socket connections,
52 metadata communication, and data streaming for the calling application,
53 and lets developers focus on feature sets instead of implementation
54 details.
55 endef
56
57 Package/libshout-full/description=Package/libshout/description
58
59 CONFIGURE_ARGS += \
60 --enable-shared \
61 --enable-static
62
63 ifeq ($(BUILD_VARIANT),nospeex)
64 CONFIGURE_ARGS += --disable-theora --disable-speex
65 endif
66
67 CONFIGURE_VARS += \
68 VORBIS_CFLAGS="-I$(STAGING_DIR)/usr/include/tremor/" \
69 VORBIS_LIBS="$(TARGET_LDFLAGS) -lvorbis -lvorbisidec" \
70
71 TARGET_CFLAGS += $(FPIC) -Wl,-rpath-link="$(STAGING_DIR)/usr/lib"
72
73 PACKAGE_CONFIG_FILE=shout$(if $(findstring $(BUILD_VARIANT),full),-full).pc
74
75 define Build/InstallDev
76 $(INSTALL_DIR) $(1)/usr/include
77 $(CP) $(PKG_INSTALL_DIR)/usr/include/shout $(1)/usr/include/
78 $(INSTALL_DIR) $(1)/usr/lib
79 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libshout.{a,so*} $(1)/usr/lib/
80 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
81 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/shout.pc $(1)/usr/lib/pkgconfig/$(PACKAGE_CONFIG_FILE)
82 $(SED) 's| -I/usr/include||' $(1)/usr/lib/pkgconfig/$(PACKAGE_CONFIG_FILE)
83 endef
84
85 define Package/libshout/install
86 $(INSTALL_DIR) $(1)/usr/lib
87 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libshout.so.* $(1)/usr/lib/
88 endef
89 Package/libshout-full/install=$(Package/libshout/install)
90
91 $(eval $(call BuildPackage,libshout))
92 $(eval $(call BuildPackage,libshout-full))