1c98b1425c3412a291d4fb509009ba1bc013e6c2
[openwrt/svn-archive/archive.git] / XOrg / app / common.mk
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 PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.2/src/app
10
11 _CATEGORY:=app
12 _DEPEND+=xorg-server-X11R7.2-essentials
13 include ../../common.mk
14
15 ifeq ($(PKG_NAME),xdm-X11R7.2)
16 CONFIGURE_ARGS+=--with-random-device=/dev/urandom
17 endif
18
19 CONFIGURE_ARGS+=LIBS="-Wl,-rpath-link=$(STAGING_DIR)/usr/lib"
20
21 define Build/Compile
22 make -C $(PKG_BUILD_DIR)
23 make -C $(PKG_BUILD_DIR) DESTDIR=$(PKG_INSTALL_DIR) install
24 endef
25
26 define Build/Configure
27 (cd $(PKG_BUILD_DIR)/$(CONFIGURE_PATH); \
28 if [ -x $(CONFIGURE_CMD) ]; then \
29 $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/ && \
30 $(CONFIGURE_VARS) \
31 $(CONFIGURE_CMD) \
32 $(CONFIGURE_ARGS_XTRA) \
33 $(CONFIGURE_ARGS) ;\
34 fi \
35 )
36 endef
37
38 define xinit-X11R7.2/install
39 rm -rf $(1)/usr
40 $(INSTALL_DIR) $(1)/usr/bin
41 $(CP) $(PKG_INSTALL_DIR)/usr/bin/xinit $(1)/usr/bin/xinit
42 cd $(1)/usr/bin/; ln -s xinit startx
43 endef
44
45 define Package/$(PKG_NAME)/install
46 $(INSTALL_DIR) $(1)
47 $(CP) $(PKG_INSTALL_DIR)/* $(1)
48 rm -rf $(1)/usr/man/
49 $(call $(PKG_NAME)/install,$(1))
50 endef