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