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