nghttp3: fix pkgconfig file
[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.6
10 PKG_RELEASE:=1
11
12 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
13 PKG_SOURCE_URL:=https://downloads.us.xiph.org/releases/libshout/
14 PKG_HASH:=39cbd4f0efdfddc9755d88217e47f8f2d7108fa767f9d58a2ba26a16d8f7c910
15
16 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
17 PKG_LICENSE:=LGPL-2.1-or-later
18 PKG_LICENSE_FILES:=COPYING
19 PKG_CPE_ID:=cpe:/a:libshout:libshout
20
21 PKG_FIXUP:=autoreconf
22 PKG_INSTALL:=1
23 PKG_BUILD_PARALLEL:=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 --without-pic
82
83 ifeq ($(BUILD_VARIANT),notheora)
84 CONFIGURE_ARGS += --disable-theora
85 endif
86
87 ifeq ($(BUILD_VARIANT),nossl)
88 CONFIGURE_ARGS += --disable-theora --without-openssl
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)
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))