InstallDev should be using (1) and not (STAGING_DIR)
[packages.git] / XOrg / lib / xine-lib / Makefile
1
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # blogic@openwrt.org
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=xine-lib
12 PKG_VERSION:=1.1.1
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://downloads.sourceforge.net/xine/
17
18 include $(INCLUDE_DIR)/package.mk
19
20 CONFIGURE_ARGS_XTRA+=--enable-static --disable-vcd
21 EXTRA_LDLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib
22
23 define Package/xine-lib
24   SECTION:=xorg-lib
25   CATEGORY:=Xorg
26   SUBMENU:=libraries
27   TITLE:=xine libraries
28   DEPENDS:=+xorg-server-essentials +alsa-lib
29 endef
30
31 define Build/Configure
32         (cd $(PKG_BUILD_DIR)/$(CONFIGURE_PATH); \
33                 if [ -x $(CONFIGURE_CMD) ]; then \
34                         $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/ && \
35                         $(CONFIGURE_VARS) \
36                         $(CONFIGURE_CMD) \
37                         $(CONFIGURE_ARGS_XTRA) \
38                         $(CONFIGURE_ARGS) ;\
39                 fi \
40         )
41 endef
42
43 define Build/Compile
44         $(MAKE) -C $(PKG_BUILD_DIR)
45         $(MAKE) -C $(PKG_BUILD_DIR)/ install DESTDIR=$(PKG_INSTALL_DIR)
46         find $(PKG_INSTALL_DIR) -name lib*.*a | xargs rm -rf
47 endef
48
49 define Build/InstallDev
50         $(CP) $(PKG_INSTALL_DIR)/* $(1)/
51         $(SED) 's,-I$$$${prefix}/include,-I$(1)/usr/include/,g' $(1)/usr/bin/xine-config 
52         $(SED) 's,-L$$$${exec_prefix}/lib,-L$(1)/usr/lib/,g' $(1)/usr/bin/xine-config 
53 endef
54
55 define Package/xine-lib/install
56         $(INSTALL_DIR) $(1)/usr/lib
57         $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*so* $(1)/usr/lib/
58 endef
59
60 $(eval $(call BuildPackage,xine-lib))