make_release_packages revision 98
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen# Permission is hereby granted, free of charge, to any person obtaining a
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen# copy of this software and associated documentation files (the
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen# "Software"), to deal in the Software without restriction, including
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen# without limitation the rights to use, copy, modify, merge, publish,
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen# distribute, and/or sell copies of the Software, and to permit persons
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen# to whom the Software is furnished to do so, provided that the above
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen# copyright notice(s) and this permission notice appear in all copies of
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen# the Software and that both the above copyright notice(s) and this
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen# permission notice appear in supporting documentation.
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
0bff25fd39f3d1e859f71d45695f98c9a95593d8Aki Tuomi# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
0bff25fd39f3d1e859f71d45695f98c9a95593d8Aki Tuomi# Except as contained in this notice, the name of a copyright holder
0bff25fd39f3d1e859f71d45695f98c9a95593d8Aki Tuomi# shall not be used in advertising or otherwise to promote the sale, use
60bea13e11a4e95e915c64112783d86204697b19Aki Tuomi# or other dealings in this Software without prior written authorization
0bff25fd39f3d1e859f71d45695f98c9a95593d8Aki Tuomi# of the copyright holder.
0bff25fd39f3d1e859f71d45695f98c9a95593d8Aki Tuomi# @(#)make_release_packages 1.50 07/01/04
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen# Create and fill a package staging area for X
bf7dc750b95039981c0e9d728f313d50cf38a156Martti Rannanjärvi# This script should be run from the base of the build tree.
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen# It takes no parameters.
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen# cd /export/home/hammer1/WORKSPACES_S493_ALPHA2.1
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen# ./make_release_packages
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen# To build a subset of packages
bf7dc750b95039981c0e9d728f313d50cf38a156Martti Rannanjärvi# env PACKAGE_LIST="packages" ./make_release_packages
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen# Make sure that we aren't affected by the personal environment of
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen# whoever is running this script
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo SirainenPATH=/opt/SUNWspro/bin:/opt/SUNWguide/bin:/usr/bin:/usr/ccs/bin:/usr/sbin:.
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen# List of official (deliverable) X-window packages
7f74811b78f8915e73dffc88bb49009e98b6846dTimo SirainenXW_PACKAGE_LIST="SUNWxwcft SUNWxwdem SUNWxwdim SUNWxwfs SUNWxwinc \
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen SUNWxwice SUNWxwopt SUNWxwpmn SUNWxwsrc SUNWxwacx SUNWxwdxm \
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen SUNWxwhl SUNWi1of SUNWxwfa SUNWxwpft SUNWxwsrv SUNWxwoft \
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen SUNWfontconfig SUNWfontconfig-root SUNWfontconfig-docs SUNWxwsvr \
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen SUNWxscreensaver-hacks SUNWfreetype2 SUNWxwxft SUNWxwfsw \
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen SUNWxorg-clientlibs SUNWxorg-devel-docs SUNWxorg-headers \
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen SUNWxorg-client-docs SUNWxorg-client-programs SUNWxorg-compatlinks \
bf7dc750b95039981c0e9d728f313d50cf38a156Martti Rannanjärvi SUNWxprint-server"
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen# L10N packages are normally only built on sparc since they only have text
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen# files that are the same for both platforms
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainenif [ "$MACH" = "sparc" -o "x$BUILD_L10N" = "xyes" ]; then
bf7dc750b95039981c0e9d728f313d50cf38a156Martti Rannanjärvi XW_L10N_PACKAGES="SUNW0xacx SUNW0xman SUNW0xpmn SUNW0xwfa SUNW0xwplt \
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen SUNW0xwopt SUNW0xwsvr"
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen# Which platform name do we use for 64-bit?
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen echo "Unknown architecture - not SPARC nor i386."
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen# Trusted Extensions packages do not get built by default.
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen# export BUILD_XTSOL=yes and run this script to build
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen# Packages with platform-specific prototype files, including those with
61cf001f1944d92eb25f113ba4c08985d6e30d53Timo Sirainen# 64-bit libraries
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo SirainenXW_PLT_PACKAGE="SUNWxwplt SUNWxwplr SUNWxwfnt SUNWxwrtl SUNWxwslb \
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen SUNWxwmod SUNWxscreensaver-hacks-gl SUNWxwman \
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen SUNWxorg-server SUNWxorg-graphics-ddx SUNWxorg-doc SUNWxorg-cfg \
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen SUNWxsun-server $TSOL_PACKAGE"
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen# Some packages are only built for certain platforms currently
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen XW_PACKAGE_LIST="$XW_PACKAGE_LIST SUNWxorg-mesa"
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen# To build a subset of packages
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen# PACKAGE_LIST="packages" make_release_packages
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen: ${PACKAGE_LIST:="$XW_PACKAGE_LIST $XW_PLT_PACKAGE $EXTRA_PACKAGES $XW_L10N_PACKAGES"}
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen# Get build version from pkgversion
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainenif [ -f pkgversion ] ; then
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen echo "Error: $SOURCEDIR/packages/pkgversion not found. Cannot continue."
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen echo "VERSION not set in $SOURCEDIR/packages/pkgversion - run newPkRev"
e617d6e7db43c176502ac02b65d2dcb4d27103deTimo Sirainen echo "BUILD not set in $SOURCEDIR/packages/pkgversion - run newPkRev"
5ba6009f4e5493c4e6be9ffb3134525004a7975cAki TuomiDECIMAL_BUILD=`echo ${BUILD} | awk '{print $1 / 100.0}'`
5ba6009f4e5493c4e6be9ffb3134525004a7975cAki Tuomiecho "Building packages for X11 version ${VERSION} build ${DECIMAL_BUILD}"
5ba6009f4e5493c4e6be9ffb3134525004a7975cAki Tuomi# Next, create the staging area. Make sure that the logs directory
5ba6009f4e5493c4e6be9ffb3134525004a7975cAki Tuomi# is writeable by everyone because it is likely that we will need to
5ba6009f4e5493c4e6be9ffb3134525004a7975cAki Tuomi# write into it as root across an NFS link...
cd $package
# Packages that need additional copyright have copyright.add files
if [ -f copyright.add ] ; then
cd $PACKAGE_DIR
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
eval "case $package in
if [ ! -f prototype_$MACH ]; then
ln -s prototype_com prototype_$MACH
echo /usr/bin/pkgmk -d $PACKAGE_DIR/$package -o ${PKGMK_VARS}
/usr/bin/pkgmk -d $PACKAGE_DIR/$package -o ${PKGMK_VARS}
echo "******** Done Making the $package package ********"
cd $PACKAGE_DIR
cd installdir