Retain symlinks. $(INSTALL_*) copys the contens of a file, so if we want to keep
[packages.git] / Xorg / lib / libxcb / 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: Makefile 12846 2008-10-03 22:38:55Z lars $
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=libxcb
12 PKG_VERSION:=1.1
13 PKG_RELEASE:=2
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://xcb.freedesktop.org/dist/
17 PKG_MD5SUM:=9310b02433273d75d42f10da3c7455aa
18 PKG_FIXUP:=libtool
19 PKG_INSTALL:=1
20 PKG_BUILD_DEPENDS:=xcbproto libpthread-stubs
21
22 include $(INCLUDE_DIR)/package.mk
23
24 PROTOS:=composite damage dpms glx randr record render res screensaver shape \
25         shm sync xevie xf86dri xfixes xinerama xprint xtest xvmc xv
26
27 define Package/libxcb
28   SECTION:=xorg-libs
29   CATEGORY:=Xorg
30   SUBMENU:=lib
31   TITLE:=libxcb
32   DEPENDS:=+libXau +libXdmcp
33 endef
34
35 define Package/libxcb/description
36 libxcb provides an interface to the X Window System protocol, which
37 replaces the current Xlib interface.
38 endef
39
40 define Package/libxcb-xlib
41   SECTION:=xorg-libs
42   CATEGORY:=Xorg
43   SUBMENU:=lib
44   TITLE:=libxcb-xlib
45   DEPENDS:=+libxcb
46 endef
47
48 define Package/libxcb-proto/Default
49 define Package/libxcb-$(1)
50   SECTION:=xorg-libs
51   CATEGORY:=Xorg
52   SUBMENU:=lib
53   TITLE:=libxcb-$(1)
54   DEPENDS:=+libxcb
55 endef
56 endef
57
58 $(foreach proto,$(PROTOS),$(eval $(call Package/libxcb-proto/Default,$(proto))))
59
60 define Build/InstallDev
61         $(INSTALL_DIR) $(1)/usr/{lib/pkgconfig,include/xcb}
62         $(INSTALL_DATA) \
63                 $(PKG_INSTALL_DIR)/usr/include/xcb/* \
64                 $(1)/usr/include/xcb/
65
66         $(CP) \
67                 $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \
68                 $(1)/usr/lib/
69
70         $(INSTALL_DATA) \
71                 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
72                 $(1)/usr/lib/pkgconfig/
73 endef
74
75 define Package/libxcb/install
76         $(INSTALL_DIR) $(1)/usr/lib
77         $(CP) \
78                 $(PKG_INSTALL_DIR)/usr/lib/libxcb.so* \
79                 $(1)/usr/lib/
80 endef
81
82 define Package/libxcb-xlib/install
83         $(INSTALL_DIR) $(1)/usr/lib
84         $(CP) \
85                 $(PKG_INSTALL_DIR)/usr/lib/libxcb-xlib.so* \
86                 $(1)/usr/lib/
87 endef
88
89 define Package/libxcb-proto/install/Default
90 define Package/libxcb-$(1)/install
91         $(INSTALL_DIR) $$(1)/usr/lib
92         $(CP) \
93                 $(PKG_INSTALL_DIR)/usr/lib/libxcb-$(1).so* \
94                 $$(1)/usr/lib/
95 endef
96 endef
97
98 $(foreach proto,$(PROTOS),$(eval $(call Package/libxcb-proto/install/Default,$(proto))))
99
100 $(eval $(call BuildPackage,libxcb))
101 $(eval $(call BuildPackage,libxcb-xlib))
102 $(foreach proto,$(PROTOS),$(eval $(call BuildPackage,libxcb-$(proto))))