minidlna: moved to github
[packages.git] / multimedia / gstreamer / Makefile
1 #
2 # Copyright (C) 2008-2013 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.36
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=http://gstreamer.freedesktop.org/src/gstreamer/
16 PKG_MD5SUM:=a0cf7d6877f694a1a2ad2b4d1ecb890b
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-examples \
86         --disable-tests \
87         --disable-valgrind \
88         --without-libiconv-prefix \
89         --without-libintl-prefix \
90         --without-x \
91
92 EXTRA_LDFLAGS+= \
93         -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
94         -L$(ICONV_PREFIX)/lib -L$(INTL_PREFIX)/lib
95
96 define Build/InstallDev
97         $(INSTALL_DIR) $(1)/usr/include/gstreamer-$(GST_VERSION)
98         ( cd $(PKG_INSTALL_DIR); $(CP) \
99                 ./usr/include/gstreamer-$(GST_VERSION)/* \
100                 $(1)/usr/include/gstreamer-$(GST_VERSION)/ \
101         )
102         $(INSTALL_DIR) $(1)/usr/lib
103         ( cd $(PKG_INSTALL_DIR); $(CP) \
104                 ./usr/lib/libgst*-$(GST_VERSION).{a,la,so*} \
105                 $(1)/usr/lib/ \
106         )
107         $(INSTALL_DIR) $(1)/usr/lib/gstreamer-$(GST_VERSION)
108         ( cd $(PKG_INSTALL_DIR); $(CP) \
109                 ./usr/lib/gstreamer-$(GST_VERSION)/libgst*.{la,so} \
110                 $(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
111         )
112         $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
113         ( cd $(PKG_INSTALL_DIR); $(CP) \
114                 ./usr/lib/pkgconfig/gstreamer*-$(GST_VERSION).pc \
115                 $(1)/usr/lib/pkgconfig/ \
116         )
117         $(INSTALL_DIR) $(2)/share/aclocal
118         ( cd $(PKG_INSTALL_DIR); $(CP) \
119                 ./usr/share/aclocal/* \
120                 $(2)/share/aclocal/ \
121         )
122 endef
123
124 define Package/gstreamer/install
125         /bin/true
126 endef
127
128 define Package/gstreamer-utils/install
129         $(INSTALL_DIR) $(1)/usr/bin
130         ( cd $(PKG_INSTALL_DIR); $(CP) \
131                 ./usr/bin/gst-feedback* \
132                 ./usr/bin/gst-launch* \
133                 ./usr/bin/gst-inspect* \
134                 ./usr/bin/gst-typefind* \
135                 ./usr/bin/gst-xmlinspect* \
136                 ./usr/bin/gst-xmllaunch* \
137                 $(1)/usr/bin/ \
138         )
139 endef
140
141 define Package/libgstreamer/install
142         $(INSTALL_DIR) $(1)/usr/lib
143         ( cd $(PKG_INSTALL_DIR); $(CP) \
144                 ./usr/lib/libgstbase-$(GST_VERSION).so.* \
145                 ./usr/lib/libgstreamer-$(GST_VERSION).so.* \
146                 $(1)/usr/lib/ \
147         )
148         $(INSTALL_DIR) $(1)/usr/lib/gstreamer-$(GST_VERSION)
149         ( cd $(PKG_INSTALL_DIR); $(CP) \
150                 ./usr/lib/gstreamer-$(GST_VERSION)/libgst*.so \
151                 $(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
152         )
153 endef
154
155
156 # 1: short name
157 # 2: description
158 # 3: dependencies on other gstreamer libraries (short name)
159 # 4: dependencies on other packages
160 define GstBuildLibrary
161
162   define Package/libgst$(1)
163     $(call Package/gstreamer/Default)
164     TITLE+= $(2) library (core)
165     DEPENDS+= +libgstreamer $$(foreach p,$(3),+libgst$$(p)) $(4)
166   endef
167
168   define Package/libgst$(1)/description
169    $(call Package/gstreamer/description/Default)
170    .
171    This package contains the GStreamer $(2) library.
172   endef
173
174   define Package/libgst$(1)/install
175         $(INSTALL_DIR) $$(1)/usr/lib
176         ( cd $(PKG_INSTALL_DIR); $(CP) \
177                 ./usr/lib/libgst$(1)-$(GST_VERSION).so.* \
178                 $$(1)/usr/lib/ \
179         )
180   endef
181
182   $$(eval $$(call BuildPackage,libgst$(1)))
183 endef
184
185 $(eval $(call GstBuildLibrary,check,check unit testing))
186 $(eval $(call GstBuildLibrary,controller,dynamic parameter control))
187 $(eval $(call GstBuildLibrary,dataprotocol,data protocol))
188 $(eval $(call GstBuildLibrary,net,network classes))
189
190 $(eval $(call BuildPackage,gstreamer))
191 $(eval $(call BuildPackage,gstreamer-utils))
192 $(eval $(call BuildPackage,libgstreamer))