7916c1c4986322723d99896654fddd08f2a8f2a3
[openwrt/svn-archive/archive.git] / multimedia / gst-plugins-base / Makefile
1 #
2 # Copyright (C) 2008-2011 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:=gst-plugins-base
11 PKG_VERSION:=0.10.29
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=http://gstreamer.freedesktop.org/src/gst-plugins-base/
16 PKG_MD5SUM:=d07e251152cccbaa81807c14cf0fd8c0
17
18 PKG_BUILD_DEPENDS:= gstreamer liboil
19 PKG_CONFIG_DEPENDS:= \
20 CONFIG_PACKAGE_gst-mod-alsa \
21 CONFIG_PACKAGE_gst-mod-app \
22 CONFIG_PACKAGE_gst-mod-audioconvert \
23 CONFIG_PACKAGE_gst-mod-audiorate \
24 CONFIG_PACKAGE_gst-mod-audioresample \
25 CONFIG_PACKAGE_gst-mod-audiotestsrc \
26 CONFIG_PACKAGE_gst-mod-gio \
27 CONFIG_PACKAGE_gst-mod-ogg \
28 CONFIG_PACKAGE_gst-mod-tcp \
29 CONFIG_PACKAGE_gst-mod-theora \
30 CONFIG_PACKAGE_gst-mod-videotestsrc \
31 CONFIG_PACKAGE_gst-mod-volume \
32 CONFIG_PACKAGE_gst-mod-vorbis \
33
34 PKG_FIXUP:=libtool
35 PKG_INSTALL:=1
36
37 include $(INCLUDE_DIR)/package.mk
38 include $(INCLUDE_DIR)/nls.mk
39
40 # -liconv crept in from pkg-config, to be revisited later
41 include $(INCLUDE_DIR)/nls.mk
42
43 define Package/gstreamer/Default
44 CATEGORY:=Multimedia
45 SECTION:=multimedia
46 TITLE:=GStreamer
47 URL:=http://gstreamer.freedesktop.org/
48 endef
49
50 define Package/gstreamer/description/Default
51 GStreamer open source multimedia framework
52 endef
53
54
55 define Package/gst-plugins-base
56 $(call Package/gstreamer/Default)
57 TITLE+= plugins collection (base)
58 DEPENDS+= $(GST_DEPENDS)
59 endef
60
61 define Package/gts-plugins-base/description
62 $(call Package/gstreamer/description/Default)
63 .
64 This meta package contains only dependencies to the other libraries and
65 plugins from the base plugins collection.
66 endef
67
68
69 GST_COND_SELECT = $(patsubst %,$(if $(CONFIG_PACKAGE_gst-mod-$(1)),--enable,--disable)-%,$(1))
70
71 GST_VERSION:=0.10
72
73 CONFIGURE_ARGS += \
74 --disable-debug \
75 --disable-examples \
76 \
77 $(call GST_COND_SELECT,alsa) \
78 --disable-alsa-test \
79 $(call GST_COND_SELECT,app) \
80 $(call GST_COND_SELECT,audioconvert) \
81 $(call GST_COND_SELECT,audiorate) \
82 $(call GST_COND_SELECT,audioresample) \
83 $(call GST_COND_SELECT,audiotestsrc) \
84 --disable-cdparanoia \
85 --disable-ffmpegcolorspace \
86 --disable-freetypetest \
87 $(call GST_COND_SELECT,gio) \
88 --disable-gnome_vfs \
89 --disable-gst_v4l \
90 --disable-libvisual \
91 $(call GST_COND_SELECT,ogg) \
92 --disable-oggtest \
93 --disable-pango \
94 --disable-subparse \
95 $(call GST_COND_SELECT,tcp) \
96 $(call GST_COND_SELECT,theora) \
97 --disable-videorate \
98 --disable-videoscale \
99 $(call GST_COND_SELECT,videotestsrc) \
100 $(call GST_COND_SELECT,volume) \
101 $(call GST_COND_SELECT,vorbis) \
102 --disable-vorbistest \
103 --disable-x \
104 --disable-xshm \
105 --disable-xvideo \
106 \
107 --without-libiconv-prefix \
108 --without-libintl-prefix \
109 --without-x \
110 \
111 --with-audioresample-format=int \
112
113 EXTRA_LDFLAGS+= \
114 -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
115
116
117 define Build/InstallDev
118 $(INSTALL_DIR) $(1)/usr/include/gstreamer-$(GST_VERSION)
119 ( cd $(PKG_INSTALL_DIR); $(CP) \
120 ./usr/include/gstreamer-$(GST_VERSION)/* \
121 $(1)/usr/include/gstreamer-$(GST_VERSION)/ \
122 )
123 $(INSTALL_DIR) $(1)/usr/lib
124 ( cd $(PKG_INSTALL_DIR); $(CP) \
125 ./usr/lib/libgst*-$(GST_VERSION).{a,la,so*} \
126 $(1)/usr/lib/ \
127 )
128 $(INSTALL_DIR) $(1)/usr/lib/gstreamer-$(GST_VERSION)
129 ( cd $(PKG_INSTALL_DIR); $(CP) \
130 ./usr/lib/gstreamer-$(GST_VERSION)/libgst*.{la,so} \
131 $(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
132 )
133 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
134 ( cd $(PKG_INSTALL_DIR); $(CP) \
135 ./usr/lib/pkgconfig/gstreamer*-$(GST_VERSION).pc \
136 $(1)/usr/lib/pkgconfig/ \
137 )
138 endef
139
140
141 define Package/gst-plugins-base/install
142 /bin/true
143 endef
144
145
146 # 1: short name
147 # 2: description
148 # 3: dependencies on other gstreamer libraries (short name)
149 # 4: dependencies on other packages
150 define GstBuildLibrary
151
152 GST_DEPENDS += +libgst$(1)
153
154 define Package/libgst$(1)
155 $(call Package/gstreamer/Default)
156 TITLE+= $(2) library (base)
157 DEPENDS+= +libgstreamer $$(foreach p,$(3),+libgst$$(p)) $(4)
158 endef
159
160 define Package/libgst$(1)/description
161 $(call Package/gstreamer/description/Default)
162 .
163 This package contains the GStreamer $(2) library.
164 endef
165
166 define Package/libgst$(1)/install
167 $(INSTALL_DIR) $$(1)/usr/lib
168 ( cd $(PKG_INSTALL_DIR); $(CP) \
169 ./usr/lib/libgst$(1)-$(GST_VERSION).so.* \
170 $$(1)/usr/lib/ \
171 )
172 endef
173
174 $$(eval $$(call BuildPackage,libgst$(1)))
175 endef
176
177 $(eval $(call GstBuildLibrary,app,app,,))
178 $(eval $(call GstBuildLibrary,audio,audio,interfaces,))
179 $(eval $(call GstBuildLibrary,cdda,CDDA,,))
180 $(eval $(call GstBuildLibrary,fft,FFT,,))
181 $(eval $(call GstBuildLibrary,interfaces,interfaces,))
182 $(eval $(call GstBuildLibrary,netbuffer,network buffer,,))
183 $(eval $(call GstBuildLibrary,pbutils,utils,,))
184 $(eval $(call GstBuildLibrary,riff,RIFF media,audio tag,,))
185 $(eval $(call GstBuildLibrary,rtp,RTP,,))
186 $(eval $(call GstBuildLibrary,rtsp,RTSP,,))
187 $(eval $(call GstBuildLibrary,sdp,SDP,,))
188 $(eval $(call GstBuildLibrary,tag,tag support,,))
189 $(eval $(call GstBuildLibrary,video,video,,))
190
191
192 # 1: short name
193 # 2: description
194 # 3: dependencies on other gstreamer libraries (short name)
195 # 4: dependencies on other gstreamer plugins (short name)
196 # 5: dependencies on other packages
197 define GstBuildPlugin
198
199 GST_DEPENDS += +gst-mod-$(1)
200
201 define Package/gst-mod-$(1)
202 $(call Package/gstreamer/Default)
203 TITLE+= $(2) plugin (base)
204 DEPENDS+= +libgstreamer $$(foreach p,$(3),+libgst$$(p)) $$(foreach p,$(4),+gst-mod-$$(p)) $(5)
205 endef
206
207 define Package/gst-mod-$(1)/description
208 $(call Package/gstreamer/description/Default)
209 .
210 This package contains the GStreamer $(2) plugin.
211 endef
212
213 define Package/gst-mod-$(1)/install
214 $(INSTALL_DIR) $$(1)/usr/lib/gstreamer-$(GST_VERSION)
215 ( cd $(PKG_INSTALL_DIR); $(CP) \
216 ./usr/lib/gstreamer-$(GST_VERSION)/libgst$(1).so* \
217 $$(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
218 )
219 endef
220
221 $$(eval $$(call BuildPackage,gst-mod-$(1)))
222 endef
223
224 $(eval $(call GstBuildPlugin,alsa,ALSA,audio,,+alsa-lib))
225 $(eval $(call GstBuildPlugin,app,app,app,,))
226 $(eval $(call GstBuildPlugin,audioconvert,audio format conversion,audio,,))
227 $(eval $(call GstBuildPlugin,audiorate,audio rate adjusting,,,))
228 $(eval $(call GstBuildPlugin,audioresample,audio resampling,,,))
229 $(eval $(call GstBuildPlugin,audiotestsrc,audio test,controller,,))
230 $(eval $(call GstBuildPlugin,decodebin,media decoder,pbutils,,))
231 $(eval $(call GstBuildPlugin,decodebin2,media decoder (v2),pbutils,,))
232 $(eval $(call GstBuildPlugin,gio,GIO,,,))
233 $(eval $(call GstBuildPlugin,ogg,Ogg,riff tag,,+libogg))
234 $(eval $(call GstBuildPlugin,playbin,playback,interfaces pbutils,,))
235 $(eval $(call GstBuildPlugin,tcp,TCP,dataprotocol,,))
236 $(eval $(call GstBuildPlugin,theora,Theora,tag,ogg,+libtheora))
237 $(eval $(call GstBuildPlugin,typefindfunctions,'typefind' functions,,,))
238 $(eval $(call GstBuildPlugin,videotestsrc,video test,,,+liboil))
239 $(eval $(call GstBuildPlugin,volume,volume,audio controller,,+liboil))
240 $(eval $(call GstBuildPlugin,vorbis,Vorbis,audio tag,ogg,+libvorbis))
241
242 $(eval $(call BuildPackage,gst-plugins-base))