Makefile revision 1026
792N/A###############################################################################
792N/A#
792N/A# xdm Makefile
792N/A#
943N/A# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
792N/A#
792N/A# Permission is hereby granted, free of charge, to any person obtaining a
919N/A# copy of this software and associated documentation files (the "Software"),
919N/A# to deal in the Software without restriction, including without limitation
919N/A# the rights to use, copy, modify, merge, publish, distribute, sublicense,
919N/A# and/or sell copies of the Software, and to permit persons to whom the
919N/A# Software is furnished to do so, subject to the following conditions:
919N/A#
919N/A# The above copyright notice and this permission notice (including the next
919N/A# paragraph) shall be included in all copies or substantial portions of the
919N/A# Software.
919N/A#
919N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
919N/A# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
919N/A# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
919N/A# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
919N/A# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
919N/A# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
919N/A# DEALINGS IN THE SOFTWARE.
792N/A#
792N/A#
792N/A
792N/A# Package name used in tarballs
792N/AMODULE_NAME=xdm
792N/A
970N/A# pkg(5) name we deliver the files in (override default)
970N/AMODULE_PKGNAME=system/display-manager/xdm
970N/AMODULE_PKGNAME_SET=yes
970N/A
792N/A# Version number (used in path names)
792N/AMODULE_VERSION=1.1.9
792N/A
911N/A# Checksums for upstream tarball
911N/ATARBALL_MD5 = 030ae4bd9b8d428749d68bfdf56ce8a5
911N/ATARBALL_SHA1 = ea0ee2923999d54848dc8a165867ffa7c628fd7b
911N/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 \
930N/A bug-6822636.patch \
924N/A bug-6820612.patch,-p1 \
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/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 += \
851N/A --with-xrdb='$(X11_BIN_DIR)/xrdb' \
851N/A --with-default-session=command='$(X11_BIN_DIR)/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)
967N/A cp -p $(XCF_USR_SRCDIR)/$(@F) $@
792N/A
792N/A$(XCF_USR_SRCFILES): $(XCF_USR_SRCDIR) $(XCF_ETC_SRCFILES)
792N/A -rm -f $@
967N/A FILENAME=$(@F) ; \
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 $@