More X package dependecy fixes.
[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:=2
14 PKG_VERSION:=1.0.5
15 PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.3/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:= +libX11
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 Package/xinit/install
51 $(INSTALL_DIR) $(1)
52 $(CP) $(PKG_INSTALL_DIR)/* $(1)
53 rm -rf $(1)/usr/man/
54 endef
55
56 define Package/xinit/install
57 $(INSTALL_DIR) $(1)/usr/bin
58 $(CP) $(PKG_INSTALL_DIR)/usr/bin/xinit $(1)/usr/bin/xinit
59 cd $(1)/usr/bin/; ln -s xinit startx
60 endef
61
62 $(eval $(call BuildPackage,xinit))