[package] update gst-plugins-base to 0.10.25, modularize plugin building
[packages.git] / multimedia / gst-plugins-base / Makefile
1 #
2 # Copyright (C) 2008-2009 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.25
12 PKG_RELEASE:=1
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:=d29669dd79276c5cd94e1613c03cd9ab
17 PKG_FIXUP:=libtool
18
19 include $(INCLUDE_DIR)/package.mk
20
21 export PATH:=$(PKG_BUILD_DIR)/bin:$(TARGET_PATH)
22
23 PKG_INSTALL=1
24
25 EXTRA_CFLAGS+= \
26         -I$(STAGING_DIR)/usr/lib/libintl/include \
27         -I$(STAGING_DIR)/usr/lib/libiconv/include \
28         -I$(STAGING_DIR)/usr/include/gtk-2.0/gdk \
29         -I$(STAGING_DIR)/usr/include/gstreamer-0.10
30
31 EXTRA_LDFLAGS+= \
32         -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
33         -L$(STAGING_DIR)/usr/lib/libintl/lib \
34         -L$(STAGING_DIR)/usr/lib/libiconv/lib
35
36 define Package/gst-plugins-base/Default
37   SECTION:=multimedia
38   CATEGORY:=Multimedia
39   DEPENDS:=+gstreamer +liboil +gst-plugins-base-libs
40   TITLE:=gst-plugins-base
41   URL:=http://gstreamer.freedesktop.org/
42 endef
43
44 define Package/gst-plugins-base-libs
45   $(call Package/gst-plugins-base/Default)
46   DEPENDS:=+gstreamer +liboil
47   TITLE:=gstreamber plugins base libraries
48 endef
49
50 define Package/gst-plugins-base-ogg
51   $(call Package/gst-plugins-base/Default)
52   TITLE += (ogg)
53   DEPENDS += +libogg
54 endef
55
56 define Package/gst-plugins-base-ogg/description
57   gstreamer OGG plugins
58 endef
59
60 define Package/gst-plugins-base-vorbis
61   $(call Package/gst-plugins-base/Default)
62   TITLE+= (vorbis)
63   DEPENDS:=+gst-plugins-base-ogg +libvorbis
64 endef
65
66 define Package/gst-plugins-base-vorbis/description
67   gstreamer Vorbis plugins
68 endef
69
70 define Package/gst-plugins-base-theora
71   $(call Package/gst-plugins-base/Default)
72   TITLE+= (theora)
73   DEPENDS:=+gst-plugins-base-ogg +libtheora
74 endef
75
76 define Package/gst-plugins-base-theora/description
77   gstreamer Theora plugins
78 endef
79
80 define Package/gst-plugins-base-alsa
81   $(call Package/gst-plugins-base/Default)
82   TITLE+= (alsa)
83 endef
84
85 define Package/gst-plugins-base-alsa/description
86   gstreamer ALSA plugins
87 endef
88
89 define Package/gst-plugins-base-app
90   $(call Package/gst-plugins-base/Default)
91   TITLE+= (app)
92 endef
93
94 define Package/gst-plugins-base-app/description
95   gstreamer app plugins
96 endef
97
98 define Package/gst-plugins-base-audioconvert
99   $(call Package/gst-plugins-base/Default)
100   TITLE+= (audioconvert)
101 endef
102
103 define Package/gst-plugins-base-audioconvert/description
104   gstreamer audioconvert plugins
105 endef
106
107 define Package/gst-plugins-base-gio
108   $(call Package/gst-plugins-base/Default)
109   TITLE+= (gio)
110   DEPENDS += +glib2
111 endef
112
113 define Package/gst-plugins-base-gio/description
114   gstreamer GIO plugins
115 endef
116
117 define Package/gst-plugins-base-typefindfunctions
118   $(call Package/gst-plugins-base/Default)
119   TITLE+= (typefind)
120 endef
121
122 define Package/gst-plugins-base-typefindfunctions/description
123   gstreamer typefind plugins
124 endef
125
126 define Package/gst-plugins-base-decodebin
127   $(call Package/gst-plugins-base/Default)
128   TITLE+= (decodebin)
129 endef
130
131 define Package/gst-plugins-base-decodebin/description
132   gstreamer decodebin plugins
133 endef
134
135 define Build/Configure
136         $(call Build/Configure/Default, \
137                 --disable-pango \
138                 --disable-gnome_vfs \
139                 --disable-examples \
140                 --disable-cdparanoia \
141                 --disable-libvisual \
142                 --disable-oggtest \
143                 --disable-vorbistest \
144                 --disable-freetypetest \
145                 --without-x \
146         )
147         mkdir -p $(PKG_BUILD_DIR)/bin
148         touch $(PKG_BUILD_DIR)/bin/gtkdoc-rebase
149         chmod +x $(PKG_BUILD_DIR)/bin/gtkdoc-rebase
150 endef
151
152 define Build/InstallDev
153         $(INSTALL_DIR) $(1)/usr/include/gstreamer-0.10/gst/
154         $(CP) \
155                 $(PKG_INSTALL_DIR)/usr/include/* \
156                 $(1)/usr/include/
157
158         $(INSTALL_DIR) $(1)/usr/lib/
159         $(CP) \
160                 $(PKG_INSTALL_DIR)/usr/lib/*.{so*,la} \
161                 $(1)/usr/lib/
162
163         $(INSTALL_DIR) $(1)/usr/lib/gstreamer-0.10
164         $(CP) \
165                 $(PKG_INSTALL_DIR)/usr/lib/gstreamer-0.10/*.{so*,la} \
166                 $(1)/usr/lib/gstreamer-0.10/
167
168         $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
169         $(INSTALL_DATA) \
170                 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
171                 $(1)/usr/lib/pkgconfig/
172 endef
173
174 define Package/gst-plugins-base-libs/install
175         $(INSTALL_DIR) $(1)/usr/lib
176         $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
177 endef
178
179 define BuildPlugin
180   define Package/gst-plugins-base-$(1)/install
181         $(INSTALL_DIR) $$(1)/usr/lib/gstreamer-0.10
182         $(CP) $(PKG_INSTALL_DIR)/usr/lib/gstreamer-0.10/libgst$(1).so \
183                 $$(1)/usr/lib/gstreamer-0.10/
184   endef
185
186   $$(eval $$(call BuildPackage,gst-plugins-base-$(1)))
187 endef
188
189 $(eval $(call BuildPlugin,ogg))
190 $(eval $(call BuildPlugin,vorbis))
191 $(eval $(call BuildPlugin,theora))
192 $(eval $(call BuildPlugin,alsa))
193 $(eval $(call BuildPlugin,app))
194 $(eval $(call BuildPlugin,audioconvert))
195 $(eval $(call BuildPlugin,gio))
196 $(eval $(call BuildPlugin,typefindfunctions))
197 $(eval $(call BuildPlugin,decodebin))
198 $(eval $(call BuildPackage,gst-plugins-base-libs))