make_release_packages revision 721
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Permission is hereby granted, free of charge, to any person obtaining a
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# copy of this software and associated documentation files (the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# "Software"), to deal in the Software without restriction, including
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# without limitation the rights to use, copy, modify, merge, publish,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# distribute, and/or sell copies of the Software, and to permit persons
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# to whom the Software is furnished to do so, provided that the above
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# copyright notice(s) and this permission notice appear in all copies of
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# the Software and that both the above copyright notice(s) and this
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# permission notice appear in supporting documentation.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Except as contained in this notice, the name of a copyright holder
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# shall not be used in advertising or otherwise to promote the sale, use
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# or other dealings in this Software without prior written authorization
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# of the copyright holder.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# @(#)make_release_packages 1.72 09/06/02
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Create and fill a package staging area for X
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# This script should be run from the base of the build tree.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# It takes no parameters.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# ./make_release_packages
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# To build a subset of packages
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# ./make_release_packages packages
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# env PACKAGE_LIST="packages" ./make_release_packages
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Make sure that we aren't affected by the personal environment of
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# whoever is running this script
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# List of official (deliverable) X-window packages for all platforms
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinXW_PACKAGE_LIST="SUNWfontconfig SUNWfontconfig-docs SUNWfontconfig-root
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin SUNWttf-google-droid
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin SUNWpciaccess SUNWpixman SUNWfreetype2 SUNWvncviewer SUNWxcursor-themes
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin SUNWxorg-client-docs SUNWxorg-client-programs
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin SUNWxorg-clientlibs SUNWxorg-compatlinks
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin SUNWxorg-graphics-ddx SUNWxorg-headers
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin SUNWxorg-server SUNWxorg-tsol-module
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin SUNWxscreensaver-hacks SUNWxscreensaver-hacks-gl
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin SUNWxsun-headers SUNWxsun-server
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin SUNWxvnc SUNWxwacx SUNWxwcft SUNWxwdem SUNWxwdxm
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin SUNWxwfnt SUNWxwfs SUNWxwfsw SUNWxwice SUNWxwinc
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin SUNWxwman SUNWxwmod SUNWxwoft SUNWxwopt SUNWxwplr
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin SUNWxwplt SUNWxwpmn SUNWxwrtl SUNWxwslb SUNWxwsrv SUNWxwsvr
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin SUNWxwts SUNWxwxft"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Some packages are only built for certain platforms currently
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Localization template packages for delivery to translation teams
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin SUNW0xwplt SUNW0xwopt SUNW0xwsvr"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# FSW* packages are built for the OpenSolaris (Project Indiana) deliveries
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin FSWxorg-fonts-core
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin FSWxorg-fonts-cyrillic
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin FSWxorg-fonts-daewoo
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin FSWxorg-fonts-ethiopic
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin FSWxorg-fonts-iso8859-2
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin FSWxorg-fonts-iso8859-3
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin FSWxorg-fonts-iso8859-4
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin FSWxorg-fonts-iso8859-9
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin FSWxorg-fonts-iso8859-10
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin FSWxorg-fonts-iso8859-13
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin FSWxorg-fonts-iso8859-14
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin FSWxorg-fonts-iso8859-16
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin FSWxorg-fonts-jiskan
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin FSWxorg-fonts-syriac
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin FSWxorg-fonts-vera
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# To build a subset of packages:
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# make_release_packages packages
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# env PACKAGE_LIST="packages" make_release_packages
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin : ${PACKAGE_LIST:="$XW_PACKAGE_LIST $EXTRA_PACKAGES $XW_L10N_PACKAGES"}
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin### Functions for use later
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin system(\"cat $1/\" \$2)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Which platform name do we use for 64-bit?
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin *) fatal_error "Unknown architecture - not SPARC nor i386." ;;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Get build version from pkgversion
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinif [[ -f pkgversion ]] ; then
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz fatal_error "${PKG_SOURCE_DIR}/pkgversion not found. Cannot continue."
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinif [[ -z "${VERSION}" ]] ; then
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin fatal_error "VERSION not set in ${PKG_SOURCE_DIR}/pkgversion - run newPkRev"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinif [[ -z "${BUILD}" ]] ; then
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin fatal_error "BUILD not set in ${PKG_SOURCE_DIR}/pkgversion - run newPkRev"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinprint "Building packages for X11 version ${VERSION} build ${DECIMAL_BUILD}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Next, create the staging area.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinprint 'Removing old proto-packages and recreating'
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Now copy the package description info
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinprint 'Copying package descriptions'
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/bin/cp copyright depend i.* r.* ${PACKAGE_DIR} >/dev/null 2>&1
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin if [[ ! -d ${package} ]] ; then
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin print "packages/${package} not found ; skipping"
cd ${package}
# Packages that need additional copyright have copyright.add files
cd ${PACKAGE_DIR}
if [[ ! -d ${package} ]] ; then
cd ${package}
sed -e '/ARCH/s/ISA/'${MACH}'/' -e 's/SUNW_PRODVERS=.*$/SUNW_PRODVERS='${VERSION}/ -e 's/VERSION=.*$/VERSION='${VERSION}.${BUILD},REV=${DATE}/ pkginfo.tmpl > pkginfo
if [[ -f Makefile ]] ; then
# If filename.tmpl exists, but filename does not,
# If filename.tmpl exists, but filename does not,
if [[ -f prototype ]] ; then
cd ${PACKAGE_DIR}
cd installdir