Makefile revision 1193
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara###############################################################################
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara#
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara# xdm Makefile
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara#
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara#
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara# Permission is hereby granted, free of charge, to any person obtaining a
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara# copy of this software and associated documentation files (the "Software"),
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara# to deal in the Software without restriction, including without limitation
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara# the rights to use, copy, modify, merge, publish, distribute, sublicense,
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara# and/or sell copies of the Software, and to permit persons to whom the
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara# Software is furnished to do so, subject to the following conditions:
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara#
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara# The above copyright notice and this permission notice (including the next
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara# paragraph) shall be included in all copies or substantial portions of the
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara# Software.
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara#
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
f71f7a61dec7c9089378d14493ad564a1dedf0b5neil_a_wilson# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara# DEALINGS IN THE SOFTWARE.
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara#
a3d3ab94806056d2355afea6fe8daac41059b9fbludovicp#
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara# Package name used in tarballs
b26e36d8a08a1c775531659c04abc3d4ed504139jvergaraMODULE_NAME=xdm
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergara
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara# pkg(5) name we deliver the files in (override default)
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergaraMODULE_PKGNAME=system/display-manager/xdm
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergaraMODULE_PKGNAME_SET=yes
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara# Version number (used in path names)
3cedecd5ea21cca5d9709abf320a2082cd3694e5jvergaraMODULE_VERSION=1.1.9
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara# Checksums for upstream tarball
27f8adec83293fb8bd3bfa37175322b0ee3bb933jvergaraTARBALL_MD5 = 030ae4bd9b8d428749d68bfdf56ce8a5
27f8adec83293fb8bd3bfa37175322b0ee3bb933jvergaraTARBALL_SHA1 = ea0ee2923999d54848dc8a165867ffa7c628fd7b
27f8adec83293fb8bd3bfa37175322b0ee3bb933jvergara
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara# Patches to apply to source after unpacking, in order
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergaraSOURCE_PATCHES = \
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara mkdir.patch,-p1 \
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara pam_tty.patch,-p1 \
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara pam_user.patch,-p1 \
27f8adec83293fb8bd3bfa37175322b0ee3bb933jvergara bindir.patch \
27f8adec83293fb8bd3bfa37175322b0ee3bb933jvergara terminateServer.patch \
27f8adec83293fb8bd3bfa37175322b0ee3bb933jvergara bug-6822636.patch \
27f8adec83293fb8bd3bfa37175322b0ee3bb933jvergara bug-6820612.patch,-p1 \
27f8adec83293fb8bd3bfa37175322b0ee3bb933jvergara Xsession.patch
27f8adec83293fb8bd3bfa37175322b0ee3bb933jvergara
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara# Man pages to apply Sun footer to & attributes to list
27f8adec83293fb8bd3bfa37175322b0ee3bb933jvergaraSUNTOUCHED_MANPAGES=xdm.man.cpp
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergaraMODULE_STABILITY=Committed
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergaraMODULE_SUNTOUCH_MAN_FLAGS= -p $(MODULE_PREFIX)/sbin/
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara
27f8adec83293fb8bd3bfa37175322b0ee3bb933jvergara# Where to install xdm files
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergaraMODULE_PREFIX=/usr
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergaraMODULE_PREFIX_SET=yes
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara# Additional configure script options
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara# Only build shared greeter module, not static
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara# Set various paths to better match Solaris
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergaraMODULE_CONFIG_OPTS= \
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara --enable-shared=yes --enable-static=no \
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara --with-xdmconfigdir=/etc/X11/xdm \
37f9a536593b696e5a3dcec443e1475f22fb5afdjvergara --with-piddir=/var/run/xdm \
--with-authdir=/var/run/xdm \
--bindir=/usr/sbin \
DEF_USER_PATH=/usr/bin:/usr/X11/bin:/usr/sbin:/sbin \
DEF_SYSTEM_PATH=/usr/bin:/usr/X11/bin:/usr/sbin:/sbin
# Special handling while xdm is moved to /usr but other apps are still in
# /usr/X11
MODULE_CONFIG_OPTS += \
--with-xrdb='$(X11_BIN_DIR)/xrdb' \
--with-default-session=command='$(X11_BIN_DIR)/xterm -ls' \
# Additional build & install targets
MODULE_ADD_BUILD_TARGETS=build_xdm_configs
MODULE_ADD_INSTALL_TARGETS=install_xdmshell install_xdm_configs
# Need to fix libtool interference with our linker flags
DELIBTOOLIZE=yes
include ../Makefile.inc
# Move xdmshell from default location to the place we put in our packages
install_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 $@