f693ec36de5b03743b65be3417350d1d7758fa8a
[feed/packages.git] / multimedia / gstreamer1 / Makefile
1 #
2 # Copyright (C) 2008-2016 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:=gstreamer1
11 PKG_VERSION:=1.16.0
12 PKG_RELEASE:=2
13
14 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
15 Ted Hess <thess@kitschensync.net>
16
17 PKG_LICENSE:=LGPLv2
18 PKG_LICENSE_FILES:=COPYING
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/gstreamer-$(PKG_VERSION)
21 PKG_SOURCE:=gstreamer-$(PKG_VERSION).tar.xz
22 PKG_SOURCE_URL:=https://gstreamer.freedesktop.org/src/gstreamer
23 PKG_HASH:=0e8e2f7118be437cba879353970cf83c2acced825ecb9275ba05d9186ef07c00
24
25 PKG_FIXUP:=autoreconf
26 PKG_REMOVE_FILES:=autogen.sh aclocal.m4
27
28 PKG_BUILD_PARALLEL:=1
29 PKG_INSTALL:=1
30
31 include $(INCLUDE_DIR)/package.mk
32 include $(INCLUDE_DIR)/nls.mk
33
34 define Package/gstreamer1/Default
35 CATEGORY:=Multimedia
36 SECTION:=multimedia
37 TITLE:=GStreamer
38 URL:=http://gstreamer.freedesktop.org/
39 DEPENDS:= $(ICONV_DEPENDS) $(INTL_DEPENDS)
40 endef
41
42 define Package/gstreamer1/description/Default
43 GStreamer open source multimedia framework
44 endef
45
46 GSTREAMER_CORE_LIBS:= \
47 libgstreamer1 \
48 libgst1check \
49 libgst1controller \
50 libgst1net
51
52 define Package/gstreamer1
53 $(call Package/gstreamer1/Default)
54 TITLE+= (All libraries)
55 DEPENDS:= $(foreach lib,$(GSTREAMER_CORE_LIBS),+$(lib))
56 HIDDEN:=1
57 endef
58
59 define Package/gstreamer1-libs/description
60 $(call Package/gstreamer1/description/Default)
61 .
62 This meta package contains only dependencies on the other GStreamer
63 componenents.
64 endef
65
66 define Package/gstreamer1-libs
67 $(call Package/gstreamer1/Default)
68 TITLE+= core libraries
69 DEPENDS+=+ALL:gstreamer1
70 endef
71
72 define Package/gstreamer1-libs/config
73 menu "Select GStreamer libraries"
74 depends on PACKAGE_gstreamer1-libs
75
76 config gstreamer1-all
77 bool "Include all GStreamer1 core libraries"
78 select PACKAGE_gstreamer1
79
80 comment "Libraries"
81
82 $(foreach lib,$(GSTREAMER_CORE_LIBS), \
83 config PACKAGE_$(lib)
84 prompt "GStreamer core library $(lib)"
85
86 )
87
88 endmenu
89
90 endef
91
92 define Package/gstreamer1-utils
93 $(call Package/gstreamer1/Default)
94 TITLE+= utilities
95 DEPENDS+= +libgstreamer1 +gstreamer1-libs
96 endef
97
98 define Package/gstreamer1-utils/description
99 $(call Package/gstreamer1/description/Default)
100 .
101 This package contains the GStreamer utilities.
102 endef
103
104 define Package/libgstreamer1
105 $(call Package/gstreamer1/Default)
106 TITLE+= library (core)
107 DEPENDS+= +glib2 +libpthread +libxml2
108 HIDDEN:=1
109 endef
110
111 define Package/libgstreamer1/description
112 $(call Package/gstreamer1/description/Default)
113 .
114 This package contains the GStreamer core library.
115 endef
116
117
118 GST_VERSION:=1.0
119
120 CONFIGURE_ARGS += \
121 --enable-static \
122 --disable-Bsymbolic \
123 --disable-benchmarks \
124 --disable-debug \
125 --disable-examples \
126 --disable-failing-tests \
127 --disable-fatal-warnings \
128 --disable-introspection \
129 --disable-glib-asserts \
130 --disable-gobject-cast-checks \
131 --disable-gst-tracer-hooks \
132 --disable-gst-debug \
133 --disable-gtk-doc-html \
134 --disable-rpath \
135 --disable-tests \
136 --disable-valgrind \
137 --without-dw \
138 --without-libiconv-prefix \
139 --without-libintl-prefix \
140 --without-unwind
141
142 define Build/InstallDev
143 $(INSTALL_DIR) $(1)/usr/include/gstreamer-$(GST_VERSION)
144 ( cd $(PKG_INSTALL_DIR); $(CP) \
145 ./usr/include/gstreamer-$(GST_VERSION)/* \
146 $(1)/usr/include/gstreamer-$(GST_VERSION)/ \
147 )
148 $(INSTALL_DIR) $(1)/usr/lib
149 ( cd $(PKG_INSTALL_DIR); $(CP) \
150 ./usr/lib/libgst*-$(GST_VERSION).{a,la,so*} \
151 $(1)/usr/lib/ \
152 )
153 $(INSTALL_DIR) $(1)/usr/lib/gstreamer-$(GST_VERSION)
154 ( cd $(PKG_INSTALL_DIR); $(CP) \
155 ./usr/lib/gstreamer-$(GST_VERSION)/libgst*.{la,so} \
156 $(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
157 )
158 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
159 ( cd $(PKG_INSTALL_DIR); $(CP) \
160 ./usr/lib/pkgconfig/gstreamer*-$(GST_VERSION).pc \
161 $(1)/usr/lib/pkgconfig/ \
162 )
163 $(INSTALL_DIR) $(2)/share/aclocal
164 ( cd $(PKG_INSTALL_DIR); $(CP) \
165 ./usr/share/aclocal/* \
166 $(2)/share/aclocal/ \
167 )
168 endef
169
170 define Package/gstreamer1/install
171 true
172 endef
173
174 define Package/gstreamer1-libs/install
175 true
176 endef
177
178 define Package/gstreamer1-utils/install
179 $(INSTALL_DIR) $(1)/usr/bin
180 ( cd $(PKG_INSTALL_DIR); $(CP) \
181 ./usr/bin/gst-launch* \
182 ./usr/bin/gst-inspect* \
183 ./usr/bin/gst-typefind* \
184 $(1)/usr/bin/ \
185 )
186 endef
187
188 define Package/libgstreamer1/install
189 $(INSTALL_DIR) $(1)/usr/lib
190 ( cd $(PKG_INSTALL_DIR); $(CP) \
191 ./usr/lib/libgstbase-$(GST_VERSION).so.* \
192 ./usr/lib/libgstreamer-$(GST_VERSION).so.* \
193 $(1)/usr/lib/ \
194 )
195 $(INSTALL_DIR) $(1)/usr/lib/gstreamer-$(GST_VERSION)
196 ( cd $(PKG_INSTALL_DIR); $(CP) \
197 ./usr/lib/gstreamer-$(GST_VERSION)/libgst*.so \
198 $(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
199 )
200 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gstreamer-$(GST_VERSION)/gst-plugin-scanner \
201 $(1)/usr/lib/gstreamer-$(GST_VERSION)
202 endef
203
204
205 # 1: short name
206 # 2: description
207 # 3: dependencies on other gstreamer libraries (short name)
208 # 4: dependencies on other packages
209 define GstBuildLibrary
210
211 define Package/libgst1$(1)
212 $(call Package/gstreamer1/Default)
213 TITLE+= $(2) library (core)
214 DEPENDS+= +libgstreamer1 $$(foreach p,$(3),+libgst1$$(p)) $(4)
215 HIDDEN:=1
216 endef
217
218 define Package/libgst1$(1)/description
219 $(call Package/gstreamer1/description/Default)
220 .
221 This package contains the GStreamer $(2) library.
222 endef
223
224 define Package/libgst1$(1)/install
225 $(INSTALL_DIR) $$(1)/usr/lib
226 ( cd $(PKG_INSTALL_DIR); $(CP) \
227 ./usr/lib/libgst$(1)-$(GST_VERSION).so.* \
228 $$(1)/usr/lib/ \
229 )
230 endef
231
232 $$(eval $$(call BuildPackage,libgst1$(1)))
233 endef
234
235 $(eval $(call GstBuildLibrary,check,check unit testing))
236 $(eval $(call GstBuildLibrary,controller,dynamic parameter control))
237 $(eval $(call GstBuildLibrary,net,network classes))
238
239 $(eval $(call BuildPackage,libgstreamer1))
240 $(eval $(call BuildPackage,gstreamer1-libs))
241 $(eval $(call BuildPackage,gstreamer1-utils))
242 $(eval $(call BuildPackage,gstreamer1))