make_release_packages revision 0
#
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# to whom the Software is furnished to do so, provided that the above
# copyright notice(s) and this permission notice appear in all copies of
# the Software and that both the above copyright notice(s) and this
# permission notice appear in supporting documentation.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
# Except as contained in this notice, the name of a copyright holder
# shall not be used in advertising or otherwise to promote the sale, use
# or other dealings in this Software without prior written authorization
# of the copyright holder.
#
# @(#)make_release_packages 1.41 03/07/06 06/03/07
#
# Create and fill a package staging area for X
#
# This script should be run from the base of the build tree.
# It takes no parameters.
#
# Example:
# ./make_release_packages
#
# To build a subset of packages
# env PACKAGE_LIST="packages" ./make_release_packages
#
# Make sure that we aren't affected by the personal environment of
# whoever is running this script
# List of official (deliverable) X-window packages
XW_PACKAGE_LIST="SUNWxwcft SUNWxwdem SUNWxwdim SUNWxwfs SUNWxwinc \
SUNWxwice SUNWxwopt SUNWxwpmn SUNWxwsrc SUNWxwacx SUNWxwdxm \
SUNWxwhl SUNWi1of SUNWxwfa SUNWxwpft SUNWxwsrv SUNWxwoft \
SUNWfontconfig SUNWfontconfig-root SUNWfontconfig-docs SUNWxwsvr
SUNWxscreensaver-hacks SUNWstsfr SUNWfreetype2 SUNWxwxft SUNWxwfsw"
# L10N packages are normally only built on sparc since they only have text
# files that are the same for both platforms
if [ "$MACH" = "sparc" ]; then
XW_L10N_PACKAGES="SUNW0xacx SUNW0xman SUNW0xpmn SUNW0xwfa SUNW0xwplt \
SUNW0xwopt SUNW0xwsvr"
else
XW_L10N_PACKAGES=" "
fi
# Which platform name do we use for 64-bit?
if [ "$MACH" = "sparc" ]; then
PLAT_64="sparcv9"
else
if [ "$MACH" = "i386" ]; then
PLAT_64="amd64"
else
echo "Unknown architecture - not SPARC nor i386."
exit 1
fi
fi
#
# Trusted Extensions packages do not get built by default.
# export BUILD_XTSOL=yes and run this script to build
#
if [ x$BUILD_XTSOL = xyes ] ; then
TSOL_PACKAGE="SUNWxwts"
fi
# Packages with platform-specific prototype files, including those with
# 64-bit libraries
XW_PLT_PACKAGE="SUNWxwplt SUNWxwplr SUNWxwfnt SUNWxwrtl SUNWxwslb \
SUNWxwmod SUNWstsf SUNWxwxst SUNWxscreensaver-hacks-gl SUNWxwman $TSOL_PACKAGE"
# Some packages are only built for sparc currently
if [ "$MACH" = "sparc" ]; then
XW_PLT_PACKAGE="$XW_PLT_PACKAGE SUNWxwpsr"
fi
EXTRA_PACKAGES=" "
# To build a subset of packages
# PACKAGE_LIST="packages" make_release_packages
#
SOURCEDIR=`pwd`
# Get build version from pkgversion
if [ -f pkgversion ] ; then
else
echo "Error: $SOURCEDIR/packages/pkgversion not found. Cannot continue."
exit 1
fi
if [ "x${VERSION}" = "x" ] ; then
echo "VERSION not set in $SOURCEDIR/packages/pkgversion - run newPkRev"
exit 1
fi
if [ "x${BUILD}" = "x" ] ; then
echo "BUILD not set in $SOURCEDIR/packages/pkgversion - run newPkRev"
exit 1
fi
echo "Building packages for X11 version ${VERSION} build ${DECIMAL_BUILD}"
# Next, create the staging area. Make sure that the logs directory
# is writeable by everyone because it is likely that we will need to
# write into it as root across an NFS link...
#
echo 'Removing old proto-packages and recreating'
# Now copy the package description info
echo 'Copying package descriptions'
# We can't just use `sccs get SCCS' because it will punt if it hits
# a file which is being edited (writeable).
#
do
done
do
cd $package
# See above about sccs usage
do
done
# We keep the master copyright in the top-level copyright file
# Packages that need additional copyright have copyright.add files
# that we then merge here
if [ -f copyright.add ] ; then
else
fi
cd ..
done
# Now move into the package staging area and build the packages.
cd $PACKAGE_DIR
if [ "$MACH" = "sparc" ]; then
else
fi
done
done
echo '---Building packages'
# Variables to pass to pkgmk for use in prototype files
# They must start with lowercase letters to be resolved at pkgmk time
PKGMK_VARS="plat_64=${PLAT_64} plat=${MACH}"
do
cd $package
echo "******** Making the $package package ********"
cat pkginfo.tmpl | sed -e '/ARCH/s/ISA/'$MACH'/' -e 's/SUNW_PRODVERS=.*$/SUNW_PRODVERS='${VERSION}/ -e 's/VERSION=.*$/VERSION='${VERSION}.${BUILD},REV=${DATE}/ > pkginfo
if [ -f Makefile ]; then
fi
eval "case $package in
if [ ! -f prototype_$MACH ]; then
ln -s prototype_com prototype_$MACH
fi
;;
*)
echo /usr/bin/pkgmk -d $PACKAGE_DIR/$package -o ${PKGMK_VARS}
/usr/bin/pkgmk -d $PACKAGE_DIR/$package -o ${PKGMK_VARS}
;;
esac"
echo "******** Done Making the $package package ********"
cd ..
# Create an installdir with symlinks to SUNW* pkgs
cd $PACKAGE_DIR
cd installdir
exit