Makefile revision 970
577N/A###############################################################################
577N/A#
577N/A# xdm Makefile
577N/A#
1070N/A# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
577N/A#
577N/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.
577N/A#
577N/A#
577N/A
577N/A# Package name used in tarballs
577N/AMODULE_NAME=xdm
577N/A
1124N/A# pkg(5) name we deliver the files in (override default)
577N/AMODULE_PKGNAME=system/display-manager/xdm
911N/AMODULE_PKGNAME_SET=yes
1124N/A
1124N/A# Version number (used in path names)
911N/AMODULE_VERSION=1.1.9
577N/A
851N/A# Checksums for upstream tarball
700N/ATARBALL_MD5 = 030ae4bd9b8d428749d68bfdf56ce8a5
700N/ATARBALL_SHA1 = ea0ee2923999d54848dc8a165867ffa7c628fd7b
700N/A
700N/A# Patches to apply to source after unpacking, in order
700N/ASOURCE_PATCHES = \
700N/A mkdir.patch,-p1 \
1124N/A bindir.patch \
700N/A terminateServer.patch \
700N/A bug-6822636.patch \
700N/A bug-6820612.patch,-p1 \
577N/A Xsession.patch
577N/A
577N/A# Man pages to apply Sun footer to & attributes to list
577N/ASUNTOUCHED_MANPAGES=xdm.man.cpp
577N/AMODULE_STABILITY=Committed
577N/AMODULE_SUNTOUCH_MAN_FLAGS= -p $(MODULE_PREFIX)/sbin/
577N/A
577N/A# Where to install xdm files
970N/AMODULE_PREFIX=/usr
970N/AMODULE_PREFIX_SET=yes
970N/A
970N/A# Additional configure script options
970N/A# Only build shared greeter module, not static
970N/A# Set various paths to better match Solaris
970N/AMODULE_CONFIG_OPTS= \
970N/A --enable-shared=yes --enable-static=no \
970N/A --with-xdmconfigdir=/etc/X11/xdm \
970N/A --with-piddir=/var/run/xdm \
970N/A --with-authdir=/var/run/xdm \
970N/A --bindir=/usr/sbin \
987N/A DEF_USER_PATH=/usr/bin:/usr/X11/bin:/usr/sbin:/sbin \
987N/A DEF_SYSTEM_PATH=/usr/bin:/usr/X11/bin:/usr/sbin:/sbin
970N/A
577N/A
577N/A# Special handling while xdm is moved to /usr but other apps are still in
577N/A# /usr/X11
577N/AMODULE_CONFIG_OPTS += \
577N/A --with-xrdb='$(X11_BIN_DIR)/xrdb' \
577N/A --with-default-session=command='$(X11_BIN_DIR)/xterm -ls' \
577N/A
577N/A# Additional build & install targets
1070N/AMODULE_ADD_BUILD_TARGETS=build_xdm_configs
1070N/AMODULE_ADD_INSTALL_TARGETS=install_xdmshell install_xdm_configs
1070N/A
1070N/Ainclude ../Makefile.inc
1070N/A
1070N/A# Move xdmshell from default location to the place we put in our packages
577N/Ainstall_xdmshell: default_install
-rm -f $(PROTODIR)/usr/lib/X11/xdm/xdmshell
mv $(PROTODIR)/usr/sbin/xdmshell $(PROTODIR)/usr/lib/X11/xdm/xdmshell
# Copy xdm config files from /etc to /usr for use as prototypes
XDM_CONFIG_FILES=Xaccess Xresources Xservers xdm-config
XDM_ETC_CONFIGDIR=/etc/X11/xdm
XDM_USR_CONFIGDIR=/usr/lib/X11/xdm
XCF_USR_FILES=$(XDM_CONFIG_FILES:%=$(PROTODIR)/$(XDM_USR_CONFIGDIR)/%)
XCF_ETC_SRCDIR=$(SOURCE_DIR)/config
XCF_ETC_SRCFILES=$(XDM_CONFIG_FILES:%=$(XCF_ETC_SRCDIR)/%)
XCF_USR_SRCDIR=$(SOURCE_DIR)/config/annotated
XCF_USR_SRCFILES=$(XDM_CONFIG_FILES:%=$(XCF_USR_SRCDIR)/%)
build_xdm_configs: $(XCF_USR_SRCFILES)
install_xdm_configs: $(XCF_USR_FILES) $(PROTODIR)/$(XDM_USR_CONFIGDIR)/README
$(XCF_ETC_SRCFILES): default_build
XCF_HEADER = %1$$s----------------------------------------------------------------------------
XCF_HEADER += \n%1$$s NOTE: The file provided in $(XDM_USR_CONFIGDIR) is a sample %2$$s
XCF_HEADER += \n%1$$s configuration file provided for your reference.
XCF_HEADER += \n%1$$s
XCF_HEADER += \n%1$$s xdm reads the actual configuration from the copies located in $(XDM_ETC_CONFIGDIR)
XCF_HEADER += \n%1$$s (unless configured otherwise by $(XDM_ETC_CONFIGDIR)/xdm-config or
XCF_HEADER += \n%1$$s a file specified via the -config command line option).
XCF_HEADER += \n%1$$s----------------------------------------------------------------------------\n
$(PROTODIR)/$(XDM_USR_CONFIGDIR) $(XCF_USR_SRCDIR):
mkdir -p $@
$(XCF_USR_FILES): $(PROTODIR)/$(XDM_USR_CONFIGDIR) $(XCF_USR_SRCFILES)
-rm -f $@
mkdir -p $(PROTODIR)/$(XDM_USR_CONFIGDIR)
cp -p $(XCF_USR_SRCDIR)/$(@F) $@
$(XCF_USR_SRCFILES): $(XCF_USR_SRCDIR) $(XCF_ETC_SRCFILES)
-rm -f $@
FILENAME=$(@F) ; \
COMMENT_CHAR=$$(head -n 1 $(XCF_ETC_SRCDIR)/$${FILENAME}) ; \
printf '$(XCF_HEADER)' $${COMMENT_CHAR} $${FILENAME} > $@ ; \
cat $(XCF_ETC_SRCDIR)/$${FILENAME} >> $@
$(PROTODIR)/$(XDM_USR_CONFIGDIR)/README:$(PROTODIR)/$(XDM_USR_CONFIGDIR) config-README.txt
cp -p config-README.txt $@