Retain symlinks. $(INSTALL_*) copys the contens of a file, so if we want to keep
[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 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=gstreamer
12 PKG_VERSION:=0.10.21
13 PKG_RELEASE:=3
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://gstreamer.freedesktop.org/src/gstreamer/
17 PKG_MD5SUM:=7bad90af3fd81a1535363cf85359125c
18 PKG_FIXUP:=libtool
19
20 include $(INCLUDE_DIR)/package.mk
21
22 export PATH:=$(PKG_BUILD_DIR)/bin:$(TARGET_PATH)
23
24 PKG_INSTALL=1
25
26 EXTRA_CFLAGS+= \
27 -I$(STAGING_DIR)/usr/lib/libintl/include \
28 -I$(STAGING_DIR)/usr/lib/libiconv/include
29
30 EXTRA_LDFLAGS+= \
31 -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
32 -L$(STAGING_DIR)/usr/lib/libintl/lib \
33 -L$(STAGING_DIR)/usr/lib/libiconv/lib
34
35 define Package/gstreamer
36 SECTION:=multimedia
37 CATEGORY:=Multimedia
38 TITLE:=gstreamer
39 URL:=http://gstreamer.freedesktop.org/
40 DEPENDS:=+libxml2 +glib2
41 endef
42
43 define Package/gstreamer/description
44 A framework for streaming media.
45 endef
46
47 define Build/Configure
48 $(call Build/Configure/Default,\
49 --disable-tests \
50 --disable-examples \
51 )
52 mkdir -p $(PKG_BUILD_DIR)/bin
53 touch $(PKG_BUILD_DIR)/bin/gtkdoc-rebase
54 chmod +x $(PKG_BUILD_DIR)/bin/gtkdoc-rebase
55 endef
56
57 define Build/InstallDev
58 $(INSTALL_DIR) $(1)/usr/include/
59 $(CP) \
60 $(PKG_INSTALL_DIR)/usr/include/* \
61 $(1)/usr/include/
62
63 $(INSTALL_DIR) $(1)/usr/lib/
64 $(CP) \
65 $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \
66 $(1)/usr/lib/
67
68 $(INSTALL_DIR) $(1)/usr/lib/gstreamer-0.10/
69 $(CP) \
70 $(PKG_INSTALL_DIR)/usr/lib/gstreamer-0.10/*.{so*,a,la} \
71 $(1)/usr/lib/gstreamer-0.10
72
73 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
74 $(INSTALL_DATA) \
75 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
76 $(1)/usr/lib/pkgconfig/
77
78 $(INSTALL_DIR) $(2)/share/aclocal/
79 $(INSTALL_DATA) \
80 $(PKG_INSTALL_DIR)/usr/share/aclocal/* \
81 $(2)/share/aclocal/
82 endef
83
84 define Package/gstreamer/install
85 $(INSTALL_DIR) $(1)/usr/bin
86 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
87
88 $(INSTALL_DIR) $(1)/usr/lib/
89 $(CP) \
90 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
91 $(1)/usr/lib/
92
93 $(INSTALL_DIR) $(1)/usr/lib/gstreamer-0.10/
94 $(CP) \
95 $(PKG_INSTALL_DIR)/usr/lib/gstreamer-0.10/*.so* \
96 $(1)/usr/lib/gstreamer-0.10
97 endef
98
99 $(eval $(call BuildPackage,gstreamer))