[packages] normalize PKG_FIXUP - the "libtool" fixup is merely an alias for "autoreco...
[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.34
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:=e6938af242cd002be9f0b6441e848d83
17
18 PKG_FIXUP:=autoreconf
19 PKG_REMOVE_FILES:=autogen.sh aclocal.m4
20
21 PKG_INSTALL:=1
22
23 include $(INCLUDE_DIR)/package.mk
24 include $(INCLUDE_DIR)/nls.mk
25
26 define Package/gstreamer/Default
27   CATEGORY:=Multimedia
28   SECTION:=multimedia
29   TITLE:=GStreamer
30   URL:=http://gstreamer.freedesktop.org/
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$(ICONV_PREFIX)/lib -L$(INTL_PREFIX)/lib
99
100 define Build/InstallDev
101         $(INSTALL_DIR) $(1)/usr/include/gstreamer-$(GST_VERSION)
102         ( cd $(PKG_INSTALL_DIR); $(CP) \
103                 ./usr/include/gstreamer-$(GST_VERSION)/* \
104                 $(1)/usr/include/gstreamer-$(GST_VERSION)/ \
105         )
106         $(INSTALL_DIR) $(1)/usr/lib
107         ( cd $(PKG_INSTALL_DIR); $(CP) \
108                 ./usr/lib/libgst*-$(GST_VERSION).{a,la,so*} \
109                 $(1)/usr/lib/ \
110         )
111         $(INSTALL_DIR) $(1)/usr/lib/gstreamer-$(GST_VERSION)
112         ( cd $(PKG_INSTALL_DIR); $(CP) \
113                 ./usr/lib/gstreamer-$(GST_VERSION)/libgst*.{la,so} \
114                 $(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
115         )
116         $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
117         ( cd $(PKG_INSTALL_DIR); $(CP) \
118                 ./usr/lib/pkgconfig/gstreamer*-$(GST_VERSION).pc \
119                 $(1)/usr/lib/pkgconfig/ \
120         )
121         $(INSTALL_DIR) $(2)/share/aclocal
122         ( cd $(PKG_INSTALL_DIR); $(CP) \
123                 ./usr/share/aclocal/* \
124                 $(2)/share/aclocal/ \
125         )
126 endef
127
128 define Package/gstreamer/install
129         /bin/true
130 endef
131
132 define Package/gstreamer-utils/install
133         $(INSTALL_DIR) $(1)/usr/bin
134         ( cd $(PKG_INSTALL_DIR); $(CP) \
135                 ./usr/bin/gst-feedback* \
136                 ./usr/bin/gst-launch* \
137                 ./usr/bin/gst-inspect* \
138                 ./usr/bin/gst-typefind* \
139                 ./usr/bin/gst-xmlinspect* \
140                 ./usr/bin/gst-xmllaunch* \
141                 $(1)/usr/bin/ \
142         )
143 endef
144
145 define Package/libgstreamer/install
146         $(INSTALL_DIR) $(1)/usr/lib
147         ( cd $(PKG_INSTALL_DIR); $(CP) \
148                 ./usr/lib/libgstbase-$(GST_VERSION).so.* \
149                 ./usr/lib/libgstreamer-$(GST_VERSION).so.* \
150                 $(1)/usr/lib/ \
151         )
152         $(INSTALL_DIR) $(1)/usr/lib/gstreamer-$(GST_VERSION)
153         ( cd $(PKG_INSTALL_DIR); $(CP) \
154                 ./usr/lib/gstreamer-$(GST_VERSION)/libgst*.so \
155                 $(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
156         )
157 endef
158
159
160 # 1: short name
161 # 2: description
162 # 3: dependencies on other gstreamer libraries (short name)
163 # 4: dependencies on other packages
164 define GstBuildLibrary
165
166   define Package/libgst$(1)
167     $(call Package/gstreamer/Default)
168     TITLE+= $(2) library (core)
169     DEPENDS+= +libgstreamer $$(foreach p,$(3),+libgst$$(p)) $(4)
170   endef
171
172   define Package/libgst$(1)/description
173    $(call Package/gstreamer/description/Default)
174    .
175    This package contains the GStreamer $(2) library.
176   endef
177
178   define Package/libgst$(1)/install
179         $(INSTALL_DIR) $$(1)/usr/lib
180         ( cd $(PKG_INSTALL_DIR); $(CP) \
181                 ./usr/lib/libgst$(1)-$(GST_VERSION).so.* \
182                 $$(1)/usr/lib/ \
183         )
184   endef
185
186   $$(eval $$(call BuildPackage,libgst$(1)))
187 endef
188
189 $(eval $(call GstBuildLibrary,check,check unit testing))
190 $(eval $(call GstBuildLibrary,controller,dynamic parameter control))
191 $(eval $(call GstBuildLibrary,dataprotocol,data protocol))
192 $(eval $(call GstBuildLibrary,net,network classes))
193
194 $(eval $(call BuildPackage,gstreamer))
195 $(eval $(call BuildPackage,gstreamer-utils))
196 $(eval $(call BuildPackage,libgstreamer))
197