Retain symlinks. $(INSTALL_*) copys the contens of a file, so if we want to keep
[packages.git] / Xorg / xorg / lib / libX11 / Makefile
1 #
2 # Copyright (C) 2007-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 # blogic@openwrt.org
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=libX11
12 PKG_RELEASE:=4
13 PKG_VERSION:=1.1.5
14
15 PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.4/src/lib/
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
17 PKG_BUILD_DIR=$(BUILD_DIR)/Xorg/$(_CATEGORY)/$(PKG_NAME)-$(PKG_VERSION)/
18 PKG_MD5SUM:=d1512d65dadd4f48c779d4749e7753a8
19 PKG_FIXUP:=libtool
20 PKG_INSTALL:=1
21 PKG_BUILD_DEPENDS:=xproto xextproto xf86bigfontproto kbproto inputproto \
22                    xtrans xcmiscproto bigreqsproto
23
24 include $(INCLUDE_DIR)/package.mk
25
26 TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
27
28 define Package/libX11
29   SECTION:=xorg-lib
30   CATEGORY:=Xorg
31   SUBMENU:=lib
32   DEPENDS:=+libXdmcp +libXau
33   TITLE:=libX11
34   URL:=http://xorg.freedesktop.org/
35 endef
36
37 define Build/Configure
38         $(call Build/Configure/Default, \
39                 --enable-malloc0returnsnull \
40                 --enable-xf86bigfont \
41                 --without-xcb \
42                 --without-launchd \
43         )
44 endef
45
46 define Build/Compile
47         $(MAKE) -C $(PKG_BUILD_DIR)/src/util HOSTCC=$(HOSTCC)
48         $(call Build/Compile/Default)
49 endef
50
51 define Build/InstallDev
52         $(INSTALL_DIR) $(1)/usr/{lib/pkgconfig,include/X11}
53         $(CP) \
54                 $(PKG_INSTALL_DIR)/usr/lib/*.{so*,la,a} \
55                 $(1)/usr/lib/
56
57         $(INSTALL_DATA) \
58                 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
59                 $(1)/usr/lib/pkgconfig/
60
61         $(INSTALL_DATA) \
62                 $(PKG_INSTALL_DIR)/usr/include/X11/* \
63                 $(1)/usr/include/X11/
64 endef
65
66 define Package/libX11/install
67         $(INSTALL_DIR) $(1)/usr/lib
68         $(CP) \
69                 $(PKG_INSTALL_DIR)/usr/lib/*.so* \
70                 $(1)/usr/lib/
71 endef
72
73 $(eval $(call BuildPackage,libX11))