[packages] gstreamer: fix libgstreamer dependencies not inherited from default (misse...
[packages.git] / multimedia / gstreamer / Makefile
1 #
2 # Copyright (C) 2008-2010 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:=gstreamer
11 PKG_VERSION:=0.10.29
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=http://gstreamer.freedesktop.org/src/gstreamer/
16 PKG_MD5SUM:=c92d6bce4fc65fa9d5a3ad35cdd1a466
17
18 PKG_FIXUP:=libtool
19 PKG_INSTALL:=1
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/gstreamer/Default
24   CATEGORY:=Multimedia
25   SECTION:=multimedia
26   TITLE:=GStreamer
27   URL:=http://gstreamer.freedesktop.org/
28   DEPENDS:= @!LINUX_2_4
29 endef
30
31 define Package/gstreamer/description/Default
32  GStreamer open source multimedia framework
33 endef
34
35
36 define Package/gstreamer
37 $(call Package/gstreamer/Default)
38   TITLE+= framework
39   DEPENDS+= +libgstreamer \
40         +libgstcheck \
41         +libgstcontroller \
42         +libgstdataprotocol \
43         +libgstnet
44 endef
45
46 define Package/gstreamer/description
47 $(call Package/gstreamer/description/Default)
48  .
49  This meta package contains only dependencies on the other GStreamer
50  componenents.
51 endef
52
53
54 define Package/gstreamer-utils
55 $(call Package/gstreamer/Default)
56   TITLE+= utilities
57   DEPENDS+= +libgstreamer
58 endef
59
60 define Package/gstreamer-utils/description
61 $(call Package/gstreamer/description/Default)
62  .
63  This package contains the GStreamer utilities.
64 endef
65
66
67 define Package/libgstreamer
68 $(call Package/gstreamer/Default)
69   TITLE+= library (core)
70   DEPENDS+= +glib2 +libpthread +libxml2
71 endef
72
73 define Package/libgstreamer/description
74 $(call Package/gstreamer/description/Default)
75  .
76  This package contains the GStreamer core library.
77 endef
78   
79
80 GST_VERSION:=0.10
81
82 CONFIGURE_ARGS += \
83         --disable-debug \
84         --disable-examples \
85         --disable-tests \
86         --disable-valgrind \
87         \
88         --disable-gst-debug \
89         \
90         --without-libiconv-prefix \
91         --without-libintl-prefix \
92         --without-x \
93
94 EXTRA_LDFLAGS+= \
95         -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
96
97
98 define Build/InstallDev
99         $(INSTALL_DIR) $(1)/usr/include/gstreamer-$(GST_VERSION)
100         ( cd $(PKG_INSTALL_DIR); $(CP) \
101                 ./usr/include/gstreamer-$(GST_VERSION)/* \
102                 $(1)/usr/include/gstreamer-$(GST_VERSION)/ \
103         )
104         $(INSTALL_DIR) $(1)/usr/lib
105         ( cd $(PKG_INSTALL_DIR); $(CP) \
106                 ./usr/lib/libgst*-$(GST_VERSION).{a,la,so*} \
107                 $(1)/usr/lib/ \
108         )
109         $(INSTALL_DIR) $(1)/usr/lib/gstreamer-$(GST_VERSION)
110         ( cd $(PKG_INSTALL_DIR); $(CP) \
111                 ./usr/lib/gstreamer-$(GST_VERSION)/libgst*.{la,so} \
112                 $(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
113         )
114         $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
115         ( cd $(PKG_INSTALL_DIR); $(CP) \
116                 ./usr/lib/pkgconfig/gstreamer*-$(GST_VERSION).pc \
117                 $(1)/usr/lib/pkgconfig/ \
118         )
119         $(INSTALL_DIR) $(2)/share/aclocal
120         ( cd $(PKG_INSTALL_DIR); $(CP) \
121                 ./usr/share/aclocal/* \
122                 $(2)/share/aclocal/ \
123         )
124 endef
125
126 define Package/gstreamer/install
127         /bin/true
128 endef
129
130 define Package/gstreamer-utils/install
131         $(INSTALL_DIR) $(1)/usr/bin
132         ( cd $(PKG_INSTALL_DIR); $(CP) \
133                 ./usr/bin/gst-feedback* \
134                 ./usr/bin/gst-launch* \
135                 ./usr/bin/gst-inspect* \
136                 ./usr/bin/gst-typefind* \
137                 ./usr/bin/gst-xmlinspect* \
138                 ./usr/bin/gst-xmllaunch* \
139                 $(1)/usr/bin/ \
140         )
141 endef
142
143 define Package/libgstreamer/install
144         $(INSTALL_DIR) $(1)/usr/lib
145         ( cd $(PKG_INSTALL_DIR); $(CP) \
146                 ./usr/lib/libgstbase-$(GST_VERSION).so.* \
147                 ./usr/lib/libgstreamer-$(GST_VERSION).so.* \
148                 $(1)/usr/lib/ \
149         )
150         $(INSTALL_DIR) $(1)/usr/lib/gstreamer-$(GST_VERSION)
151         ( cd $(PKG_INSTALL_DIR); $(CP) \
152                 ./usr/lib/gstreamer-$(GST_VERSION)/libgst*.so \
153                 $(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
154         )
155 endef
156
157
158 # 1: short name
159 # 2: description
160 # 3: dependencies on other gstreamer libraries (short name)
161 # 4: dependencies on other packages
162 define GstBuildLibrary
163
164   define Package/libgst$(1)
165     $(call Package/gstreamer/Default)
166     TITLE+= $(2) library (core)
167     DEPENDS+= +libgstreamer $$(foreach p,$(3),+libgst$$(p)) $(4)
168   endef
169
170   define Package/libgst$(1)/description
171    $(call Package/gstreamer/description/Default)
172    .
173    This package contains the GStreamer $(2) library.
174   endef
175
176   define Package/libgst$(1)/install
177         $(INSTALL_DIR) $$(1)/usr/lib
178         ( cd $(PKG_INSTALL_DIR); $(CP) \
179                 ./usr/lib/libgst$(1)-$(GST_VERSION).so.* \
180                 $$(1)/usr/lib/ \
181         )
182   endef
183
184   $$(eval $$(call BuildPackage,libgst$(1)))
185 endef
186
187 $(eval $(call GstBuildLibrary,check,check unit testing))
188 $(eval $(call GstBuildLibrary,controller,dynamic parameter control))
189 $(eval $(call GstBuildLibrary,dataprotocol,data protocol))
190 $(eval $(call GstBuildLibrary,net,network classes))
191
192 $(eval $(call BuildPackage,gstreamer))
193 $(eval $(call BuildPackage,gstreamer-utils))
194 $(eval $(call BuildPackage,libgstreamer))
195