make_release_packages
author Alan Coopersmith <Alan.Coopersmith@Sun.COM>
Fri, 30 Jan 2009 10:38:02 -0800
changeset 622 1a987df95a37
parent 619 a4e261f11dff
child 637 3d9b63730657
permissions -rw-r--r--
Disable Xprint due to build errors introduced by 6793256
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
     1
#! /bin/ksh93
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     2
#
606
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 595
diff changeset
     3
# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     4
#
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     5
# Permission is hereby granted, free of charge, to any person obtaining a
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     6
# copy of this software and associated documentation files (the
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     7
# "Software"), to deal in the Software without restriction, including
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     8
# without limitation the rights to use, copy, modify, merge, publish,
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
     9
# distribute, and/or sell copies of the Software, and to permit persons
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    10
# to whom the Software is furnished to do so, provided that the above
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    11
# copyright notice(s) and this permission notice appear in all copies of
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    12
# the Software and that both the above copyright notice(s) and this
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    13
# permission notice appear in supporting documentation.
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    14
#
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    15
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    16
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    17
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    18
# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    19
# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    20
# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    21
# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    22
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    23
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    24
#
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    25
# Except as contained in this notice, the name of a copyright holder
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    26
# shall not be used in advertising or otherwise to promote the sale, use
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    27
# or other dealings in this Software without prior written authorization
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    28
# of the copyright holder.
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    29
# 
619
a4e261f11dff 6798225 stop building/delivering SUNWxwdim
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 606
diff changeset
    30
# @(#)make_release_packages	1.66	09/01/27
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    31
#
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    32
#	Create and fill a package staging area for X
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    33
#
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    34
#	This script should be run from the base of the build tree.
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    35
#	It takes no parameters.
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    36
#
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    37
#	Example:
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    38
#	    cd /export/home/hammer1/WORKSPACES_S493_ALPHA2.1
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    39
#	    ./make_release_packages
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    40
#
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    41
#   To build a subset of packages
561
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
    42
#	./make_release_packages packages
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
    43
#		or
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    44
#	env PACKAGE_LIST="packages" ./make_release_packages
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    45
#
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    46
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    47
#   Make sure that we aren't affected by the personal environment of
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    48
#   whoever is running this script
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
    49
PATH=/usr/bin:/usr/ccs/bin
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
    50
SHELL=/bin/ksh93
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
    51
export LC_NUMERIC=C
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    52
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
    53
MACH="$(uname -p)"
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
    54
DATE="$(date +0.%Y.%m.%d)"
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    55
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
    56
# List of official (deliverable) X-window packages for all platforms
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
    57
XW_PACKAGE_LIST="SUNWfontconfig SUNWfontconfig-docs SUNWfontconfig-root 
577
cd96438515cb 6752912 Integrate libpixman [LSARC 2008/637]
Stuart Kreitman <Stuart.Kreitman@Sun.COM>
parents: 561
diff changeset
    58
    SUNWpciaccess SUNWpixman SUNWfreetype2 SUNWvncviewer SUNWxcursor-themes
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
    59
    SUNWxorg-cfg SUNWxorg-client-docs SUNWxorg-client-programs
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
    60
    SUNWxorg-clientlibs SUNWxorg-compatlinks SUNWxorg-devel-docs
606
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 595
diff changeset
    61
    SUNWxorg-graphics-ddx SUNWxorg-headers
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
    62
    SUNWxorg-server SUNWxorg-tsol-module SUNWxprint-server
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
    63
    SUNWxscreensaver-hacks SUNWxscreensaver-hacks-gl SUNWxsun-server
619
a4e261f11dff 6798225 stop building/delivering SUNWxwdim
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 606
diff changeset
    64
    SUNWxvnc SUNWxwacx SUNWxwcft SUNWxwdem SUNWxwdxm
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
    65
    SUNWxwfnt SUNWxwfs SUNWxwfsw SUNWxwhl SUNWxwice SUNWxwinc
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
    66
    SUNWxwman SUNWxwmod SUNWxwoft SUNWxwopt SUNWxwpft SUNWxwplr
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
    67
    SUNWxwplt SUNWxwpmn SUNWxwrtl SUNWxwslb SUNWxwsrv SUNWxwsvr
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
    68
    SUNWxwts SUNWxwxft"
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    69
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
    70
# Some packages are only built for certain platforms currently
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
    71
case "${MACH}" in
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
    72
    sparc)	
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
    73
    	XW_PACKAGE_LIST="$XW_PACKAGE_LIST SUNWxwpsr" 
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
    74
	;;
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
    75
    i386)	
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
    76
    	XW_PACKAGE_LIST="$XW_PACKAGE_LIST SUNWxorg-mesa" 
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
    77
	;;
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
    78
esac
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
    79
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
    80
# Localization template packages for delivery to translation teams
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
    81
if [[ "$BUILD_L10N" != "no" ]]; then
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
    82
    XW_L10N_PACKAGES="SUNW0xacx SUNW0xman SUNW0xpmn 
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
    83
		      SUNW0xwplt SUNW0xwopt SUNW0xwsvr"
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    84
else
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    85
    XW_L10N_PACKAGES=" "
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    86
fi
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
    87
561
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
    88
# FSW* packages are built for the OpenSolaris (Project Indiana) deliveries
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
    89
FSW_PACKAGE_LIST="
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
    90
	FSWxorg-fonts-core
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
    91
	FSWxorg-fonts-cyrillic
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
    92
	FSWxorg-fonts-daewoo
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
    93
	FSWxorg-fonts-ethiopic
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
    94
	FSWxorg-fonts-iso8859-2
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
    95
	FSWxorg-fonts-iso8859-3
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
    96
	FSWxorg-fonts-iso8859-4
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
    97
	FSWxorg-fonts-iso8859-9
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
    98
	FSWxorg-fonts-iso8859-10
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
    99
	FSWxorg-fonts-iso8859-13
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   100
	FSWxorg-fonts-iso8859-14
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   101
	FSWxorg-fonts-iso8859-16
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   102
	FSWxorg-fonts-jiskan
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   103
	FSWxorg-fonts-syriac
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   104
	FSWxorg-fonts-vera
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   105
"
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   106
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   107
if [[ "$BUILD_FSW" != "no" ]]; then
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   108
    EXTRA_PACKAGES+="${FSW_PACKAGE_LIST}"
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   109
fi
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   110
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   111
#   To build a subset of packages:
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   112
#	make_release_packages packages
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   113
#		or
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   114
#	env PACKAGE_LIST="packages" make_release_packages
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   115
#
561
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   116
if (( $# > 0 )) ; then
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   117
    PACKAGE_LIST="$*"
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   118
else
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   119
    : ${PACKAGE_LIST:="$XW_PACKAGE_LIST $EXTRA_PACKAGES $XW_L10N_PACKAGES"}
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   120
fi
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   121
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   122
### Functions for use later
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   123
function print_and_run
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   124
{
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   125
    print "$@"
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   126
    "$@"
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   127
}
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   128
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   129
progname="$0"
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   130
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   131
function fatal_error
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   132
{
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   133
    print -u2 "${progname}: ERROR: $*"
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   134
    exit 1
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   135
}
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   136
606
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 595
diff changeset
   137
function process_includes
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 595
diff changeset
   138
{
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 595
diff changeset
   139
    nawk \
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 595
diff changeset
   140
	"/^include / 	{
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 595
diff changeset
   141
			  system(\"cat $1/\" \$2)
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 595
diff changeset
   142
			  next
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 595
diff changeset
   143
			}
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 595
diff changeset
   144
	{ print }" $2
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 595
diff changeset
   145
}
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   146
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   147
# Which platform name do we use for 64-bit?
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   148
case "${MACH}" in
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   149
    sparc)	PLAT_64="sparcv9" ;;
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   150
    i386)	PLAT_64="amd64" ;;
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   151
    *)    	fatal_error "Unknown architecture - not SPARC nor i386." ;;
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   152
esac
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   153
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   154
: ${PACKAGE_DIR:="$(pwd)/proto-packages"}
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   155
SOURCE_DIR="$(pwd)"
561
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   156
PKG_SOURCE_DIR=${SOURCE_DIR}/packages
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   157
561
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   158
cd ${PKG_SOURCE_DIR}
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   159
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   160
# Get build version from pkgversion
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   161
if [[ -f pkgversion ]] ; then
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   162
    source ./pkgversion
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   163
else
561
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   164
    fatal_error "${PKG_SOURCE_DIR}/pkgversion not found.  Cannot continue."
355
a3a81e9c227d 6672824 Copyright/license notices from X.Org software should be included in SVR4 package copyrights
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 247
diff changeset
   165
fi
a3a81e9c227d 6672824 Copyright/license notices from X.Org software should be included in SVR4 package copyrights
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 247
diff changeset
   166
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   167
if [[ -z "${VERSION}" ]] ; then
561
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   168
    fatal_error "VERSION not set in ${PKG_SOURCE_DIR}/pkgversion - run newPkRev"
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   169
fi
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   170
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   171
if [[ -z "${BUILD}" ]] ; then
561
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   172
    fatal_error "BUILD not set in ${PKG_SOURCE_DIR}/pkgversion - run newPkRev"
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   173
fi
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   174
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   175
DECIMAL_BUILD=$(( ${BUILD} / 100.0 ))
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   176
print "Building packages for X11 version ${VERSION} build ${DECIMAL_BUILD}"
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   177
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   178
if [[ "${MACH}" = "sparc" ]]; then
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   179
    PROTODIR=${SOURCE_DIR}/proto-sun4-svr4
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   180
else
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   181
    PROTODIR=${SOURCE_DIR}/proto-${MACH}-svr4
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   182
fi
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   183
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   184
#   Next, create the staging area.
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   185
#
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   186
print 'Removing old proto-packages and recreating'
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   187
/bin/rm -rf ${PACKAGE_DIR}
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   188
/bin/mkdir ${PACKAGE_DIR} ${PACKAGE_DIR}/logs
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   189
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   190
#  Now copy the package description info
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   191
print 'Copying package descriptions'
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   192
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   193
/bin/cp copyright depend i.* r.* ${PACKAGE_DIR} >/dev/null 2>&1
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   194
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   195
for package in ${PACKAGE_LIST} common_files ; do
606
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 595
diff changeset
   196
    if [[ ! -d ${package} ]] ; then
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 595
diff changeset
   197
	print "packages/${package} not found ; skipping"
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 595
diff changeset
   198
	continue
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 595
diff changeset
   199
    fi
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 595
diff changeset
   200
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   201
    cd ${package}
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   202
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   203
    /bin/mkdir ${PACKAGE_DIR}/${package}
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   204
    /bin/cp p* d* lib* i.* r.* M* ${PACKAGE_DIR}/${package} >/dev/null 2>&1
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   205
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   206
    # We keep the master copyright in the top-level copyright file
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   207
    # Packages that need additional copyright have copyright.add files
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   208
    # that we then merge here
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   209
    cp ../copyright ${PACKAGE_DIR}/${package}/copyright
355
a3a81e9c227d 6672824 Copyright/license notices from X.Org software should be included in SVR4 package copyrights
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 247
diff changeset
   210
    
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   211
    for F in copyright.add copyright.add.${MACH} ; do
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   212
	if [[ -f $F ]] ; then
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   213
	    chmod +w ${PACKAGE_DIR}/${package}/copyright
606
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 595
diff changeset
   214
	    process_includes "${PROTODIR}/licenses" $F \
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 595
diff changeset
   215
		>> ${PACKAGE_DIR}/${package}/copyright
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   216
	fi
368
2e973147eca2 6676359 X package copyright files have bad entries for platform specific modules
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 355
diff changeset
   217
    done
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   218
    cd ..
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   219
done
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   220
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   221
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   222
#   Now move into the package staging area and build the packages.
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   223
cd ${PACKAGE_DIR}
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   224
595
b2f409b183da 6781731 hwc build issues
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 577
diff changeset
   225
for D in etc usr var lib licenses kernel ; do
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   226
    /bin/rm -f $D
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   227
    /bin/ln -s ${PROTODIR}/$D $D
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   228
done
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   229
595
b2f409b183da 6781731 hwc build issues
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 577
diff changeset
   230
for D in openwin ; do
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   231
    /bin/rm -f $D
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   232
    /bin/ln -s ${PROTODIR}/usr/$D $D
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   233
done
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   234
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   235
LOGfile=logs/package_build
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   236
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   237
print -- '---Building packages'
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   238
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   239
# Variables to pass to pkgmk for use in prototype files
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   240
# They must start with lowercase letters to be resolved at pkgmk time
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   241
PKGMK_VARS="plat_64=${PLAT_64} plat=${MACH}"
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   242
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   243
for package in ${PACKAGE_LIST} ; do
606
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 595
diff changeset
   244
    print "******** Making the ${package} package ********"
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 595
diff changeset
   245
    if [[ ! -d ${package} ]] ; then
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 595
diff changeset
   246
	print "${PACKAGE_DIR}/${package} was not found ; skipping"
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 595
diff changeset
   247
	continue
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 595
diff changeset
   248
    fi
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 595
diff changeset
   249
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   250
    cd ${package}
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   251
    date
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   252
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   253
    sed -e '/ARCH/s/ISA/'${MACH}'/' -e 's/SUNW_PRODVERS=.*$/SUNW_PRODVERS='${VERSION}/ -e 's/VERSION=.*$/VERSION='${VERSION}.${BUILD},REV=${DATE}/ pkginfo.tmpl > pkginfo
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   254
    if [[ -f Makefile ]] ; then
561
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   255
	print_and_run /usr/ccs/bin/make SOURCEDIR=${PKG_SOURCE_DIR} all
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   256
    else
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   257
	for pf in preinstall preremove postinstall postremove ; do
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   258
	    # If filename.tmpl exists, but filename does not, 
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   259
	    # build filename from the .tmpl
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   260
	    if [[ -f "${pf}.tmpl" && ! -f "${pf}" ]] ; then
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   261
		SOURCEDIR=${PKG_SOURCE_DIR} \
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   262
		    nawk -f ${PKG_SOURCE_DIR}/awk_procedure \
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   263
		    ${pf}.tmpl > ${pf}
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   264
	    fi
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   265
	done
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   266
    fi
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   267
606
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 595
diff changeset
   268
    for df in depend depend_${MACH} ; do
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 595
diff changeset
   269
	# If filename.tmpl exists, but filename does not, 
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 595
diff changeset
   270
	# build filename from the .tmpl
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 595
diff changeset
   271
	if [[ -f "${df}.tmpl" && ! -f "${df}" ]] ; then
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 595
diff changeset
   272
	    process_includes "${PKG_SOURCE_DIR}/${package}" ${df}.tmpl > ${df}
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 595
diff changeset
   273
	fi
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 595
diff changeset
   274
    done
068c11b419c9 6582489 X11R7.4: Xorg server 1.5.3, Mesa 7.2, and associated driver updates
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 595
diff changeset
   275
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   276
    if [[ -f prototype ]] ; then
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   277
	# Simple package with the same prototype on all platforms
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   278
	PROTOTYPE="prototype"
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   279
    else
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   280
    	# Package with some platform-specific settings in prototype
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   281
	if [[ ! -f prototype_${MACH} ]]; then
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   282
	    ln -s prototype_com prototype_${MACH}
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   283
	fi
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   284
	PROTOTYPE="prototype_${MACH}"
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   285
    fi
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   286
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   287
    print_and_run /usr/bin/pkgmk -d ${PACKAGE_DIR}/${package} -f ${PROTOTYPE} -o ${PKGMK_VARS}
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   288
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   289
    print "******** Done Making the ${package} package ********"
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   290
    cd ..
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   291
done >$LOGfile 2>&1
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   292
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   293
print result log is in ${PACKAGE_DIR}/$LOGfile
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   294
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   295
print -n "Packages built:  "
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   296
grep -c "Packaging complete" ${PACKAGE_DIR}/$LOGfile
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   297
print -n "Packages failed: "
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   298
grep -c "Packaging was not successful" ${PACKAGE_DIR}/$LOGfile
29
449a687b3d6f 6424854 Decomposition of SUNWxwplt [PSARC 2006/302]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 0
diff changeset
   299
561
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   300
# Create an installdir with symlinks to built packages
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   301
cd ${PACKAGE_DIR}
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   302
mkdir installdir
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   303
cd installdir
561
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   304
for package in ${PACKAGE_LIST} ; do
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   305
    if [[ -d ../${package}/${package} ]] ; then
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   306
	ln -s ../${package}/${package} .
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   307
    fi
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   308
done
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   309
if [[ -f ${PKG_SOURCE_DIR}/upgrade-X ]] ; then
3c2df35483af 6756343 Split FSWxorg-fonts into smaller packages & integrate to Nevada gate
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 513
diff changeset
   310
    cp -p ${PKG_SOURCE_DIR}/upgrade-X .
29
449a687b3d6f 6424854 Decomposition of SUNWxwplt [PSARC 2006/302]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 0
diff changeset
   311
    chmod a+x upgrade-X
449a687b3d6f 6424854 Decomposition of SUNWxwplt [PSARC 2006/302]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 0
diff changeset
   312
fi
0
b949c5054bc4 Initial OpenSolaris release: X-src-20060331
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff changeset
   313
493
f43507b5737d 6735203 open-src Makefile cleanup & enhancements
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents: 478
diff changeset
   314
exit 0