Makefile revision 792
792N/A###############################################################################
792N/A#
792N/A# xdm Makefile
792N/A#
792N/A# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
792N/A# Use is subject to license terms.
792N/A#
792N/A# Permission is hereby granted, free of charge, to any person obtaining a
792N/A# copy of this software and associated documentation files (the
792N/A# "Software"), to deal in the Software without restriction, including
792N/A# without limitation the rights to use, copy, modify, merge, publish,
792N/A# distribute, and/or sell copies of the Software, and to permit persons
792N/A# to whom the Software is furnished to do so, provided that the above
792N/A# copyright notice(s) and this permission notice appear in all copies of
792N/A# the Software and that both the above copyright notice(s) and this
792N/A# permission notice appear in supporting documentation.
792N/A#
792N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
792N/A# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
792N/A# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
792N/A# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
792N/A# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
792N/A# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
792N/A# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
792N/A# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
792N/A# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
792N/A#
792N/A# Except as contained in this notice, the name of a copyright holder
792N/A# shall not be used in advertising or otherwise to promote the sale, use
792N/A# or other dealings in this Software without prior written authorization
792N/A# of the copyright holder.
792N/A#
792N/A#
792N/A
792N/A# Package name used in tarballs
792N/AMODULE_NAME=xdm
792N/A
792N/A# Version number (used in path names)
792N/AMODULE_VERSION=1.1.9
792N/A
792N/A# Patches to apply to source after unpacking, in order
792N/ASOURCE_PATCHES = \
792N/A mkdir.patch,-p1 \
792N/A bindir.patch \
792N/A terminateServer.patch \
792N/A Xsession.patch
792N/A
792N/A# Man pages to apply Sun footer to & attributes to list
792N/ASUNTOUCHED_MANPAGES=xdm.man.cpp
792N/ASUN_PACKAGE=SUNWxdm
792N/AMODULE_STABILITY=Committed
792N/AMODULE_SUNTOUCH_MAN_FLAGS= -p $(MODULE_PREFIX)/sbin/
792N/A
792N/A# Where to install xdm files
792N/AMODULE_PREFIX=/usr
792N/AMODULE_PREFIX_SET=yes
792N/A
792N/A# Additional configure script options
792N/A# Only build shared greeter module, not static
792N/A# Set various paths to better match Solaris
792N/AMODULE_CONFIG_OPTS= \
792N/A --enable-shared=yes --enable-static=no \
792N/A --with-xdmconfigdir=/etc/X11/xdm \
792N/A --with-piddir=/var/run/xdm \
792N/A --with-authdir=/var/run/xdm \
792N/A --bindir=/usr/sbin \
792N/A DEF_USER_PATH=/usr/bin:/usr/X11/bin:/usr/sbin:/sbin \
792N/A DEF_SYSTEM_PATH=/usr/bin:/usr/X11/bin:/usr/sbin:/sbin
792N/A
792N/A
792N/A# Special handling while xdm is moved to /usr but other apps are still in
792N/A# /usr/X11
792N/AMODULE_CONFIG_OPTS += \
792N/A --with-xrdb='/usr/X11/bin/xrdb' \
792N/A --with-default-session=command='/usr/X11/bin/xterm -ls' \
792N/A
792N/A# Additional build & install targets
792N/AMODULE_ADD_BUILD_TARGETS=build_xdm_configs
792N/AMODULE_ADD_INSTALL_TARGETS=install_xdmshell install_xdm_configs
792N/A
792N/Ainclude ../Makefile.inc
792N/A
792N/A# Move xdmshell from default location to the place we put in our packages
792N/Ainstall_xdmshell: default_install
792N/A -rm -f $(PROTODIR)/usr/lib/X11/xdm/xdmshell
792N/A mv $(PROTODIR)/usr/sbin/xdmshell $(PROTODIR)/usr/lib/X11/xdm/xdmshell
792N/A
792N/A# Copy xdm config files from /etc to /usr for use as prototypes
792N/AXDM_CONFIG_FILES=Xaccess Xresources Xservers xdm-config
792N/AXDM_ETC_CONFIGDIR=/etc/X11/xdm
792N/AXDM_USR_CONFIGDIR=/usr/lib/X11/xdm
792N/AXCF_USR_FILES=$(XDM_CONFIG_FILES:%=$(PROTODIR)/$(XDM_USR_CONFIGDIR)/%)
792N/AXCF_ETC_SRCDIR=$(SOURCE_DIR)/config
792N/AXCF_ETC_SRCFILES=$(XDM_CONFIG_FILES:%=$(XCF_ETC_SRCDIR)/%)
792N/AXCF_USR_SRCDIR=$(SOURCE_DIR)/config/annotated
792N/AXCF_USR_SRCFILES=$(XDM_CONFIG_FILES:%=$(XCF_USR_SRCDIR)/%)
792N/A
792N/Abuild_xdm_configs: $(XCF_USR_SRCFILES)
792N/Ainstall_xdm_configs: $(XCF_USR_FILES) $(PROTODIR)/$(XDM_USR_CONFIGDIR)/README
792N/A$(XCF_ETC_SRCFILES): default_build
792N/A
792N/AXCF_HEADER = %1$$s----------------------------------------------------------------------------
792N/AXCF_HEADER += \n%1$$s NOTE: The file provided in $(XDM_USR_CONFIGDIR) is a sample %2$$s
792N/AXCF_HEADER += \n%1$$s configuration file provided for your reference.
792N/AXCF_HEADER += \n%1$$s
792N/AXCF_HEADER += \n%1$$s xdm reads the actual configuration from the copies located in $(XDM_ETC_CONFIGDIR)
792N/AXCF_HEADER += \n%1$$s (unless configured otherwise by $(XDM_ETC_CONFIGDIR)/xdm-config or
792N/AXCF_HEADER += \n%1$$s a file specified via the -config command line option).
792N/AXCF_HEADER += \n%1$$s----------------------------------------------------------------------------\n
792N/A
792N/A$(PROTODIR)/$(XDM_USR_CONFIGDIR) $(XCF_USR_SRCDIR):
792N/A mkdir -p $@
792N/A
792N/A$(XCF_USR_FILES): $(PROTODIR)/$(XDM_USR_CONFIGDIR) $(XCF_USR_SRCFILES)
792N/A -rm -f $@
792N/A mkdir -p $(PROTODIR)/$(XDM_USR_CONFIGDIR)
792N/A @ set -x ; cp -p $(XCF_USR_SRCDIR)/$$(basename $@) $@
792N/A
792N/A$(XCF_USR_SRCFILES): $(XCF_USR_SRCDIR) $(XCF_ETC_SRCFILES)
792N/A -rm -f $@
792N/A FILENAME=$$(basename $@) ; \
792N/A COMMENT_CHAR=$$(head -n 1 $(XCF_ETC_SRCDIR)/$${FILENAME}) ; \
792N/A printf '$(XCF_HEADER)' $${COMMENT_CHAR} $${FILENAME} > $@ ; \
792N/A cat $(XCF_ETC_SRCDIR)/$${FILENAME} >> $@
792N/A
792N/A$(PROTODIR)/$(XDM_USR_CONFIGDIR)/README:$(PROTODIR)/$(XDM_USR_CONFIGDIR) config-README.txt
792N/A cp -p config-README.txt $@