fix a dependency problem
[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 include $(INCLUDE_DIR)/package.mk
20
21 define Package/xinit
22 SECTION:=xorg-app
23 CATEGORY:=Xorg
24 SUBMENU:=app
25 DEPENDS:=libX11 @DISPLAY_SUPPORT
26 TITLE:=xinit
27 URL:=http://xorg.freedesktop.org/
28 endef
29
30 define Build/InstallDev
31 DESTDIR=$(1) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install
32 endef
33
34 ifeq (xinit,xdm)
35 CONFIGURE_ARGS+=--with-random-device=/dev/urandom
36 endif
37
38 CONFIGURE_ARGS+=LIBS="-Wl,-rpath-link=$(STAGING_DIR)/usr/lib"
39
40 define Build/Compile
41 make -C $(PKG_BUILD_DIR)
42 make -C $(PKG_BUILD_DIR) DESTDIR=$(PKG_INSTALL_DIR) install
43 endef
44
45 define Build/Configure
46 (cd $(PKG_BUILD_DIR)/$(CONFIGURE_PATH); \
47 if [ -x $(CONFIGURE_CMD) ]; then \
48 $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/ && \
49 $(CONFIGURE_VARS) \
50 $(CONFIGURE_CMD) \
51 $(CONFIGURE_ARGS_XTRA) \
52 $(CONFIGURE_ARGS) ;\
53 fi \
54 )
55 endef
56
57 define Package/xinit/install
58 $(INSTALL_DIR) $(1)
59 $(CP) $(PKG_INSTALL_DIR)/* $(1)
60 rm -rf $(1)/usr/man/
61 endef
62
63 define Package/xinit/install
64 $(INSTALL_DIR) $(1)/usr/bin
65 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xinit $(1)/usr/bin/xinit
66 cd $(1)/usr/bin/; ln -sf xinit startx
67 endef
68
69 $(eval $(call BuildPackage,xinit))