Makefile revision 1089
98N/A###############################################################################
98N/A#
378N/A# xdm Makefile
98N/A#
98N/A# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
98N/A#
98N/A# Permission is hereby granted, free of charge, to any person obtaining a
98N/A# copy of this software and associated documentation files (the "Software"),
98N/A# to deal in the Software without restriction, including without limitation
98N/A# the rights to use, copy, modify, merge, publish, distribute, sublicense,
98N/A# and/or sell copies of the Software, and to permit persons to whom the
98N/A# Software is furnished to do so, subject to the following conditions:
98N/A#
98N/A# The above copyright notice and this permission notice (including the next
98N/A# paragraph) shall be included in all copies or substantial portions of the
98N/A# Software.
98N/A#
98N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
98N/A# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
98N/A# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
98N/A# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
98N/A# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
98N/A# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
98N/A# DEALINGS IN THE SOFTWARE.
98N/A#
98N/A#
98N/A
98N/A# Package name used in tarballs
98N/AMODULE_NAME=xdm
98N/A
378N/A# pkg(5) name we deliver the files in (override default)
98N/AMODULE_PKGNAME=system/display-manager/xdm
98N/AMODULE_PKGNAME_SET=yes
98N/A
98N/A# Version number (used in path names)
98N/AMODULE_VERSION=1.1.9
98N/A
98N/A# Checksums for upstream tarball
156N/ATARBALL_MD5 = 030ae4bd9b8d428749d68bfdf56ce8a5
98N/ATARBALL_SHA1 = ea0ee2923999d54848dc8a165867ffa7c628fd7b
98N/A
98N/A# Patches to apply to source after unpacking, in order
98N/ASOURCE_PATCHES = \
98N/A mkdir.patch,-p1 \
98N/A bindir.patch \
98N/A terminateServer.patch \
98N/A bug-6822636.patch \
156N/A bug-6820612.patch,-p1 \
156N/A Xsession.patch
98N/A
98N/A# Man pages to apply Sun footer to & attributes to list
98N/ASUNTOUCHED_MANPAGES=xdm.man.cpp
98N/AMODULE_STABILITY=Committed
98N/AMODULE_SUNTOUCH_MAN_FLAGS= -p $(MODULE_PREFIX)/sbin/
98N/A
183N/A# Where to install xdm files
378N/AMODULE_PREFIX=/usr
183N/AMODULE_PREFIX_SET=yes
183N/A
183N/A# Additional configure script options
183N/A# Only build shared greeter module, not static
98N/A# Set various paths to better match Solaris
98N/AMODULE_CONFIG_OPTS= \
98N/A --enable-shared=yes --enable-static=no \
98N/A --with-xdmconfigdir=/etc/X11/xdm \
98N/A --with-piddir=/var/run/xdm \
98N/A --with-authdir=/var/run/xdm \
98N/A --bindir=/usr/sbin \
98N/A DEF_USER_PATH=/usr/bin:/usr/X11/bin:/usr/sbin:/sbin \
98N/A DEF_SYSTEM_PATH=/usr/bin:/usr/X11/bin:/usr/sbin:/sbin
98N/A
98N/A
98N/A# Special handling while xdm is moved to /usr but other apps are still in
98N/A# /usr/X11
98N/AMODULE_CONFIG_OPTS += \
98N/A --with-xrdb='$(X11_BIN_DIR)/xrdb' \
98N/A --with-default-session=command='$(X11_BIN_DIR)/xterm -ls' \
98N/A
98N/A# Additional build & install targets
98N/AMODULE_ADD_BUILD_TARGETS=build_xdm_configs
98N/AMODULE_ADD_INSTALL_TARGETS=install_xdmshell install_xdm_configs
98N/A
98N/Ainclude ../Makefile.inc
98N/A
98N/A# Move xdmshell from default location to the place we put in our packages
98N/Ainstall_xdmshell: default_install
98N/A -rm -f $(PROTODIR)/usr/lib/X11/xdm/xdmshell
156N/A mv $(PROTODIR)/usr/sbin/xdmshell $(PROTODIR)/usr/lib/X11/xdm/xdmshell
156N/A
98N/A# Copy xdm config files from /etc to /usr for use as prototypes
98N/AXDM_CONFIG_FILES=Xaccess Xresources Xservers xdm-config
98N/AXDM_ETC_CONFIGDIR=/etc/X11/xdm
156N/AXDM_USR_CONFIGDIR=/usr/lib/X11/xdm
156N/AXCF_USR_FILES=$(XDM_CONFIG_FILES:%=$(PROTODIR)/$(XDM_USR_CONFIGDIR)/%)
98N/AXCF_ETC_SRCDIR=$(SOURCE_DIR)/config
98N/AXCF_ETC_SRCFILES=$(XDM_CONFIG_FILES:%=$(XCF_ETC_SRCDIR)/%)
98N/AXCF_USR_SRCDIR=$(SOURCE_DIR)/config/annotated
156N/AXCF_USR_SRCFILES=$(XDM_CONFIG_FILES:%=$(XCF_USR_SRCDIR)/%)
156N/A
98N/Abuild_xdm_configs: $(XCF_USR_SRCFILES)
156N/Ainstall_xdm_configs: $(XCF_USR_FILES) $(PROTODIR)/$(XDM_USR_CONFIGDIR)/README
156N/A$(XCF_ETC_SRCFILES): default_build
98N/A
98N/AXCF_HEADER = %1$$s----------------------------------------------------------------------------
98N/AXCF_HEADER += \n%1$$s NOTE: The file provided in $(XDM_USR_CONFIGDIR) is a sample %2$$s
98N/AXCF_HEADER += \n%1$$s configuration file provided for your reference.
98N/AXCF_HEADER += \n%1$$s
98N/AXCF_HEADER += \n%1$$s xdm reads the actual configuration from the copies located in $(XDM_ETC_CONFIGDIR)
98N/AXCF_HEADER += \n%1$$s (unless configured otherwise by $(XDM_ETC_CONFIGDIR)/xdm-config or
98N/AXCF_HEADER += \n%1$$s a file specified via the -config command line option).
98N/AXCF_HEADER += \n%1$$s----------------------------------------------------------------------------\n
98N/A
98N/A$(PROTODIR)/$(XDM_USR_CONFIGDIR) $(XCF_USR_SRCDIR):
98N/A mkdir -p $@
98N/A
98N/A$(XCF_USR_FILES): $(PROTODIR)/$(XDM_USR_CONFIGDIR) $(XCF_USR_SRCFILES)
98N/A -rm -f $@
98N/A mkdir -p $(PROTODIR)/$(XDM_USR_CONFIGDIR)
98N/A cp -p $(XCF_USR_SRCDIR)/$(@F) $@
98N/A
98N/A$(XCF_USR_SRCFILES): $(XCF_USR_SRCDIR) $(XCF_ETC_SRCFILES)
98N/A -rm -f $@
98N/A FILENAME=$(@F) ; \
355N/A COMMENT_CHAR=$$(head -n 1 $(XCF_ETC_SRCDIR)/$${FILENAME}) ; \
98N/A printf '$(XCF_HEADER)' $${COMMENT_CHAR} $${FILENAME} > $@ ; \
98N/A cat $(XCF_ETC_SRCDIR)/$${FILENAME} >> $@
98N/A
$(PROTODIR)/$(XDM_USR_CONFIGDIR)/README:$(PROTODIR)/$(XDM_USR_CONFIGDIR) config-README.txt
cp -p config-README.txt $@