make XOrg depend on DISPLAY_SUPPORT instead of TARGET_x86, see [9448]
[openwrt/svn-archive/archive.git] / XOrg / app / xinit / Makefile
1 #
2 # Copyright (C) 2007 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_BASE_NAME:=xinit
12 PKG_NAME:=xinit
13 PKG_RELEASE:=1
14 PKG_VERSION:=X11R7.2-1.0.3
15 PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.2/src/app
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
17 PKG_BUILD_DIR=$(BUILD_DIR)/Xorg/$(_CATEGORY)/${PKG_NAME}-$(PKG_VERSION)/
18
19 _DEPEND:=
20 ifneq (xinit,xinit)
21 _DEPEND+=xorg-server-essentials
22 endif
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/xinit
27 SECTION:=xorg-app
28 CATEGORY:=Xorg
29 SUBMENU:=app
30 DEPENDS:=${_DEPEND} @DISPLAY_SUPPORT
31 TITLE:=xinit
32 URL:=http://xorg.freedesktop.org/
33 endef
34
35 define Build/InstallDev
36 DESTDIR=$(1) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install
37 endef
38
39 ifeq (xinit,xdm)
40 CONFIGURE_ARGS+=--with-random-device=/dev/urandom
41 endif
42
43 CONFIGURE_ARGS+=LIBS="-Wl,-rpath-link=$(STAGING_DIR)/usr/lib"
44
45 define Build/Compile
46 make -C $(PKG_BUILD_DIR)
47 make -C $(PKG_BUILD_DIR) DESTDIR=$(PKG_INSTALL_DIR) install
48 endef
49
50 define Build/Configure
51 (cd $(PKG_BUILD_DIR)/$(CONFIGURE_PATH); \
52 if [ -x $(CONFIGURE_CMD) ]; then \
53 $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/ && \
54 $(CONFIGURE_VARS) \
55 $(CONFIGURE_CMD) \
56 $(CONFIGURE_ARGS_XTRA) \
57 $(CONFIGURE_ARGS) ;\
58 fi \
59 )
60 endef
61
62 define Package/xinit/install
63 $(INSTALL_DIR) $(1)
64 $(CP) $(PKG_INSTALL_DIR)/* $(1)
65 rm -rf $(1)/usr/man/
66 endef
67
68 define Package/xinit/install
69 $(INSTALL_DIR) $(1)/usr/bin
70 $(CP) $(PKG_INSTALL_DIR)/usr/bin/xinit $(1)/usr/bin/xinit
71 cd $(1)/usr/bin/; ln -s xinit startx
72 endef
73
74 $(eval $(call BuildPackage,xinit))