[packages] xorg-server: Rebuild packages when configuration was changed
[openwrt/svn-archive/archive.git] / Xorg / xorg / xserver / xorg-server / Makefile
1 #
2 # Copyright (C) 2006-2010 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=xorg-server
11 PKG_VERSION:=1.7.1
12 PKG_RELEASE:=1
13
14 PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/xserver/
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_MD5SUM:=dda7842467cda6018fdc87e6002e4db1
17
18 PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/xserver/$(PKG_NAME)-$(PKG_VERSION)/
19 PKG_BUILD_DEPENDS:=randrproto renderproto fixesproto damageproto xcmiscproto \
20 xextproto xproto scrnsaverproto bigreqsproto resourceproto \
21 fontsproto inputproto kbproto videoproto resourceproto \
22 compositeproto xf86dgaproto xtrans xf86driproto dri2proto
23
24 PKG_INSTALL:=1
25 PKG_FIXUP:=libtool
26
27 PKG_CONFIG_DEPENDS:=CONFIG_PACKAGE_xserver-xorg CONFIG_PACKAGE_xserver-common
28
29 include $(INCLUDE_DIR)/package.mk
30
31 X_CONFIG=generic
32 ifeq ($(CONFIG_TARGET_olpc),y)
33 X_CONFIG=olpc
34 endif
35 ifeq ($(CONFIG_TARGET_s3c24xx),y)
36 X_CONFIG=om_gta02
37 endif
38
39 define Package/xorg/Default
40 SECTION:=xorg-server
41 CATEGORY:=Xorg
42 SUBMENU:=server
43 DEPENDS:=@!avr32
44 URL:=http://xorg.freedesktop.org/
45 endef
46
47 define Package/xserver-xorg
48 $(call Package/xorg/Default)
49 PROVIDES:=xserver
50 TITLE:=Xorg xserver
51 DEPENDS:=+xserver-common \
52 +libpthread \
53 +xkbcomp \
54 +libxkbfile \
55 +libXfont \
56 +libXau \
57 +libXv \
58 +libfontenc \
59 +pixman \
60 +libopenssl \
61 +libpciaccess \
62 +libdrm \
63 +libgl-mesa \
64 @DISPLAY_SUPPORT
65 endef
66
67 define Package/xserver-common
68 $(call Package/xorg/Default)
69 TITLE:=meta-package
70 endef
71
72 define Build/Configure
73 $(call Build/Configure/Default, \
74 --disable-dependency-tracking \
75 --disable-debug \
76 --disable-unit-tests \
77 --disable-builddocs \
78 --disable-glx-tls \
79 --disable-composite \
80 --disable-shm \
81 --disable-xres \
82 --disable-record \
83 --enable-xv \
84 --enable-xvmc \
85 --disable-dga \
86 --disable-screensaver \
87 --disable-xdmcp \
88 --disable-xdm-auth-1 \
89 --disable-glx \
90 --enable-dri \
91 --enable-dri2 \
92 --disable-xinerama \
93 --disable-xf86vidmode \
94 --disable-xace \
95 --disable-xselinux \
96 --disable-xsecurity \
97 --disable-xcalibrate \
98 --disable-tslib \
99 --disable-multibuffer \
100 --disable-dbe \
101 --disable-xf86bigfont \
102 --enable-dpms \
103 --disable-config-dbus \
104 --disable-config-hal \
105 --disable-xfree86-utils \
106 --disable-xaa \
107 --enable-vgahw \
108 --disable-vbe \
109 --enable-int10-module \
110 --enable-xorg \
111 --disable-dmx \
112 --disable-xvfb \
113 --disable-xnest \
114 --disable-xquartz \
115 --disable-standalone-xpbproxy \
116 --disable-xwin \
117 --disable-kdrive \
118 --disable-xfake \
119 --disable-xfbdev \
120 --disable-installsetuid \
121 --disable-secure-rpc \
122 --enable-silent-rules \
123 --disable-shave \
124 )
125 endef
126
127 define Package/xserver-common/install
128 $(INSTALL_DIR) $(1)/etc/{init.d,config,X11}
129 $(INSTALL_BIN) \
130 ./files/x.init \
131 $(1)/etc/init.d/x11
132 $(INSTALL_DATA) ./files/tmp/x11.uci \
133 $(1)/etc/config/x11
134 test -f ./files/config.xorg/$(X_CONFIG) && \
135 $(INSTALL_DATA) \
136 ./files/config.xorg/$(X_CONFIG) \
137 $(1)/etc/X11/xorg.conf
138 # test -f ./files/config.uci/$(X_CONFIG) && \
139 # $(INSTALL_DATA) \
140 # ./files/config.uci/$(X_CONFIG) \
141 # $(1)/etc/config/x11
142 endef
143
144 define Package/xserver-xorg/install
145 $(INSTALL_DIR) $(1)/usr/bin
146 $(INSTALL_BIN) \
147 $(PKG_INSTALL_DIR)/usr/bin/Xorg \
148 $(1)/usr/bin/
149
150 $(INSTALL_DIR) $(1)/usr/lib/xorg/modules/{extensions,fonts,linux,multimedia}
151 $(INSTALL_DATA) \
152 $(PKG_INSTALL_DIR)/usr/lib/xorg/modules/*.so \
153 $(1)/usr/lib/xorg/modules/
154
155 $(foreach d,extensions fonts linux multimedia, \
156 $(INSTALL_DATA) \
157 $(PKG_INSTALL_DIR)/usr/lib/xorg/modules/$(d)/*.so \
158 $(1)/usr/lib/xorg/modules/$(d)/; \
159 )
160 endef
161
162 define Build/InstallDev
163 $(INSTALL_DIR) $(1)/usr/share/aclocal/
164 $(INSTALL_DATA) \
165 $(PKG_INSTALL_DIR)/usr/share/aclocal/* \
166 $(1)/usr/share/aclocal/
167
168 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
169 $(INSTALL_DATA) \
170 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
171 $(1)/usr/lib/pkgconfig/
172
173 $(if $(CONFIG_PACKAGE_xserver-xorg), \
174 $(INSTALL_DIR) $(1)/usr/include/xorg; \
175 $(INSTALL_DATA) \
176 $(PKG_INSTALL_DIR)/usr/include/xorg/*.h \
177 $(1)/usr/include/xorg/; \
178 )
179 $(INSTALL_DIR) $(1)/mk
180 $(INSTALL_DATA) \
181 ./files/xorg-driver.mk \
182 $(1)/mk/
183 $(SED) 's,@VERSION@,$(PKG_VERSION),' $(1)/mk/xorg-driver.mk
184 endef
185
186 $(eval $(call BuildPackage,xserver-common))
187 $(eval $(call BuildPackage,xserver-xorg))