[package] strip down gstreamer, package more modules (#6320)
[openwrt/svn-archive/archive.git] / multimedia / gstreamer / Makefile
1 #
2 # Copyright (C) 2008 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.25
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:=88544e034a051baf472983791d233076
17 PKG_FIXUP:=libtool
18
19 include $(INCLUDE_DIR)/package.mk
20
21 export PATH:=$(PKG_BUILD_DIR)/bin:$(TARGET_PATH)
22
23 PKG_INSTALL=1
24
25 EXTRA_CFLAGS+= \
26 -I$(STAGING_DIR)/usr/lib/libintl/include \
27 -I$(STAGING_DIR)/usr/lib/libiconv/include
28
29 EXTRA_LDFLAGS+= \
30 -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
31 -L$(STAGING_DIR)/usr/lib/libintl/lib \
32 -L$(STAGING_DIR)/usr/lib/libiconv/lib
33
34 define Package/gstreamer/Default
35 DEPENDS:=+gstreamer
36 TITLE:=gstreamer
37 URL:=http://gstreamer.freedesktop.org/
38 SECTION:=multimedia
39 CATEGORY:=Multimedia
40 endef
41
42 define Package/gstreamer
43 $(call Package/gstreamer/Default)
44 DEPENDS:=+libxml2 +glib2
45 endef
46
47 define Package/gstreamer/description
48 A framework for streaming media.
49 endef
50
51 define Package/gstreamer-libgstcheck
52 $(call Package/gstreamer/Default)
53 TITLE+= (libgstcheck)
54 endef
55
56 define Package/gstreamer-libgstcheck/description
57 gstreamer libgstcheck
58 endef
59
60 define Package/gstreamer-libgstcontroller
61 $(call Package/gstreamer/Default)
62 TITLE+= (libgstcontroller)
63 endef
64
65 define Package/gstreamer-libgstcontroller/description
66 gstreamer libgstcontroller
67 endef
68
69 define Package/gstreamer-libgstdataprotocol
70 $(call Package/gstreamer/Default)
71 TITLE+= (libgstdataprotocol)
72 endef
73
74 define Package/gstreamer-libgstdataprotocol/description
75 gstreamer libgstdataprotocol
76 endef
77
78 define Package/gstreamer-libgstnet
79 $(call Package/gstreamer/Default)
80 TITLE+= (libgstnet)
81 endef
82
83 define Package/gstreamer-libgstnet/description
84 gstreamer libgstnet
85 endef
86
87 define Build/Configure
88 $(call Build/Configure/Default,\
89 --disable-gst-debug \
90 --disable-loadsave \
91 --disable-parse \
92 --disable-debug \
93 --disable-valgrind \
94 --disable-tests \
95 --disable-examples \
96 )
97 mkdir -p $(PKG_BUILD_DIR)/bin
98 touch $(PKG_BUILD_DIR)/bin/gtkdoc-rebase
99 chmod +x $(PKG_BUILD_DIR)/bin/gtkdoc-rebase
100 endef
101
102 define Build/InstallDev
103 $(INSTALL_DIR) $(1)/usr/include/
104 $(CP) \
105 $(PKG_INSTALL_DIR)/usr/include/* \
106 $(1)/usr/include/
107
108 $(INSTALL_DIR) $(1)/usr/lib/
109 $(CP) \
110 $(PKG_INSTALL_DIR)/usr/lib/*.{so*,la} \
111 $(1)/usr/lib/
112
113 $(INSTALL_DIR) $(1)/usr/lib/gstreamer-0.10/
114 $(CP) \
115 $(PKG_INSTALL_DIR)/usr/lib/gstreamer-0.10/*.{so*,la} \
116 $(1)/usr/lib/gstreamer-0.10
117
118 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
119 $(INSTALL_DATA) \
120 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
121 $(1)/usr/lib/pkgconfig/
122
123 $(INSTALL_DIR) $(2)/share/aclocal/
124 $(INSTALL_DATA) \
125 $(PKG_INSTALL_DIR)/usr/share/aclocal/* \
126 $(2)/share/aclocal/
127 endef
128
129 define Package/gstreamer/install
130 $(INSTALL_DIR) $(1)/usr/lib/
131 $(CP) \
132 $(PKG_INSTALL_DIR)/usr/lib/libgstbase*.so* \
133 $(1)/usr/lib/
134 $(CP) \
135 $(PKG_INSTALL_DIR)/usr/lib/libgstreamer*.so* \
136 $(1)/usr/lib/
137
138 $(INSTALL_DIR) $(1)/usr/lib/gstreamer-0.10/
139 $(CP) \
140 $(PKG_INSTALL_DIR)/usr/lib/gstreamer-0.10/*.so* \
141 $(1)/usr/lib/gstreamer-0.10
142 endef
143
144 define BuildLib
145 define Package/gstreamer-libgst$(1)/install
146 $(INSTALL_DIR) $$(1)/usr/lib
147 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgst$(1)*.so* \
148 $$(1)/usr/lib/
149 endef
150
151 $$(eval $$(call BuildPackage,gstreamer-libgst$(1)))
152 endef
153
154 $(eval $(call BuildPackage,gstreamer))
155 $(eval $(call BuildLib,check))
156 $(eval $(call BuildLib,controller))
157 $(eval $(call BuildLib,dataprotocol))
158 $(eval $(call BuildLib,net))