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