make the xserver package even smaller
[openwrt/svn-archive/archive.git] / XOrg / server / xorg-server-X11R7.2 / 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:=xorg-server-X11R7.2
12 PKG_RELEASE:=1
13 PKG_VERSION:=1.2.0
14 PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.2/src/xserver/
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_BUILD_DIR=$(BUILD_DIR)/Xorg/server/xorg-server-X11R7.2-$(PKG_VERSION)/
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/xorg-server-X11R7.2/Default
21 SECTION:=xorg-server
22 CATEGORY:=Xorg
23 SUBMENU:=server
24 URL:=http://xorg.freedesktop.org/
25 endef
26
27 define Package/xorg-server-X11R7.2
28 $(call Package/xorg-server-X11R7.2/Default)
29 TITLE:=Xorg server
30 DEPENDS:=+compositeproto-X11R7.1 \
31 +damageproto-X11R7.0 \
32 +fixesproto-X11R7.1 \
33 +recordproto-X11R7.0 \
34 +resourceproto-X11R7.0 \
35 +scrnsaverproto-X11R7.1 \
36 +videoproto-X11R7.0 \
37 +xextproto-X11R7.0 \
38 +xproto-X11R7.2 \
39 +libXext-X11R7.2 \
40 +libXdmcp-X11R7.2 \
41 +libXfont-X11R7.2 \
42 +libXrandr-X11R7.2 \
43 +xtrans-X11R7.2 \
44 +libX11-X11R7.2 \
45 +glproto-X11R7.2 \
46 +xf86driproto-X11R7.0 \
47 +applewmproto-X11R7.0 \
48 +dmxproto-X11R7.0 \
49 +printproto-X11R7.0 \
50 +windowswmproto-X11R7.0 \
51 +xf86rushproto-X11R7.0 \
52 +xproxymanagementprotocol-X11R7.0 \
53 +libdrm \
54 +xf86miscproto-X11R7.0 \
55 +xf86vidmodeproto-X11R7.0 \
56 +xf86dgaproto-X11R7.0 \
57 +trapproto-X11R7.0 \
58 +xineramaproto-X11R7.0 \
59 +evieext-X11R7.0 \
60 +libxkbfile-X11R7.2 \
61 +libXt-X11R7.2 \
62 +libSM-X11R7.2 \
63 +libxkbui-X11R7.1 \
64 +libXxf86misc-X11R7.1 \
65 +libXxf86vm-X11R7.1 \
66 +libXaw-X11R7.1 \
67 +libXmu-X11R7.2 \
68 +libXpm-X11R7.2 \
69 +libnotimpl \
70 +Mesa \
71 @TARGET_x86
72 MENU:=1
73 endef
74
75 define Package/xorg-server-X11R7.2-config
76 $(call Package/xorg-server-X11R7.2/Default)
77 TITLE:=Xorg server configuration tools
78 DEPENDS:=xorg-server-X11R7.2
79 endef
80
81 EXTRA_CFLAGS+= -I${STAGING_DIR}/usr/include/X11/GL -I${STAGING_DIR}/usr/include/X11/dri/ -I${STAGING_DIR}/usr/include/X11/ -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
82
83
84 define Build/Configure
85 (cd $(PKG_BUILD_DIR) \
86 $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/ && \
87 $(CONFIGURE_VARS) \
88 $(CONFIGURE_CMD) \
89 $(CONFIGURE_ARGS_XTRA) \
90 $(CONFIGURE_ARGS) \
91 --with-default-font-path=built-ins \
92 as_ac_File=no \
93 );
94 endef
95
96 define Build/Compile
97 $(MAKE) -C $(PKG_BUILD_DIR)
98 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
99
100 endef
101
102 define Package/xorg-server-X11R7.2/install
103 $(INSTALL_DIR) $(1)/usr/bin
104 $(CP) $(PKG_INSTALL_DIR)/usr/bin/Xorg $(1)/usr/bin/
105 cd $(1)/usr/bin; ln -s Xorg X
106 $(INSTALL_DIR) $(1)/usr/share
107 $(CP) $(PKG_INSTALL_DIR)/usr/share/* $(1)/usr/share/
108 $(INSTALL_DIR) $(1)/usr/lib/xserver
109 $(CP) $(PKG_INSTALL_DIR)/usr/lib/xserver/* $(1)/usr/lib/xserver
110 $(INSTALL_DIR) $(1)/usr/lib/xorg/
111 $(CP) -r $(PKG_INSTALL_DIR)/usr/lib/xorg/* $(1)/usr/lib/xorg/
112 find $(1)/usr/lib/xorg/ -name *.la | xargs rm -rf
113 $(INSTALL_DIR) $(1)/usr/lib/X11/
114 $(CP) -r $(PKG_INSTALL_DIR)/usr/lib/X11/* $(1)/usr/lib/X11/
115 rm -rf $(1)/usr/share/X11 $(1)/usr/lib/X11/xserver
116 $(INSTALL_DIR) $(1)/var/log/
117 $(INSTALL_DIR) $(1)/etc/X11/
118 $(CP) files/xorg.conf $(1)/etc/X11/
119 endef
120
121 define Packages/xorg-server-X11R7.2-config/install
122 $(INSTALL_DIR) $(1)/usr/bin
123 $(CP) $(PKG_INSTALL_DIR)/usr/bin/xorgconfig $(1)/usr/bin/
124 endef
125
126 define Build/InstallDev
127 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(STAGING_DIR)/usr/include/
128 $(CP) $(PKG_BUILD_DIR)/xorg-server.pc $(STAGING_DIR)/usr/lib/pkgconfig/
129 endef
130
131 $(eval $(call BuildPackage,xorg-server-X11R7.2))
132 $(eval $(call BuildPackage,xorg-server-X11R7.2-config))