VirtualBox

source: vbox/trunk/src/libs/xpcom18a4/nsprpub/admin/repackage.sh@ 25603

Last change on this file since 25603 was 1, checked in by vboxsync, 55 years ago

import

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.7 KB
Line 
1#! /bin/sh
2# ***** BEGIN LICENSE BLOCK *****
3# Version: MPL 1.1/GPL 2.0/LGPL 2.1
4#
5# The contents of this file are subject to the Mozilla Public License Version
6# 1.1 (the "License"); you may not use this file except in compliance with
7# the License. You may obtain a copy of the License at
8# http://www.mozilla.org/MPL/
9#
10# Software distributed under the License is distributed on an "AS IS" basis,
11# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12# for the specific language governing rights and limitations under the
13# License.
14#
15# The Original Code is the Netscape Portable Runtime (NSPR).
16#
17# The Initial Developer of the Original Code is
18# Netscape Communications Corporation.
19# Portions created by the Initial Developer are Copyright (C) 1998-2001
20# the Initial Developer. All Rights Reserved.
21#
22# Contributor(s):
23#
24# Alternatively, the contents of this file may be used under the terms of
25# either the GNU General Public License Version 2 or later (the "GPL"), or
26# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27# in which case the provisions of the GPL or the LGPL are applicable instead
28# of those above. If you wish to allow use of your version of this file only
29# under the terms of either the GPL or the LGPL, and not to allow others to
30# use your version of this file under the terms of the MPL, indicate your
31# decision by deleting the provisions above and replace them with the notice
32# and other provisions required by the GPL or the LGPL. If you do not delete
33# the provisions above, a recipient may use your version of this file under
34# the terms of any one of the MPL, the GPL or the LGPL.
35#
36# ***** END LICENSE BLOCK *****
37
38# ------------------------------------------------------------------
39# repackage.sh -- Repackage NSPR from /s/b/c to mozilla.org format
40#
41# syntax: repackage.sh
42#
43# Description:
44# repackage.sh creates NSPR binary distributions for mozilla.org from
45# the internal binary distributions in /share/builds/components/nspr20.
46# There are reasons why we can't just push the internal binary distributions
47# to mozilla.org. External developers prefer to use the common archive
48# file format for their platforms, rather than the jar files we use internally.
49#
50# On Unix, we create a tar.gz file. On Windows, we create a zip file.
51# For example: NSPR 4.1.1, these would be nspr-4.1.1.tar.gz and nspr-4.1.1.zip.
52#
53# When unpacked, nspr-4.1.1.tar.gz or nspr-4.1.1.zip should expand to a
54# nspr-4.1.1 directory that contains three subdirectories: include, lib,
55# and bin. The header files, with the correct line endings for the
56# platform, are in nspr-4.1.1/include. The libraries are in nspr-4.1.1/lib.
57# The executable programs are in nspr-4.1.1/bin.
58#
59# Note! Files written with Gnu tar are not readable by some non-Gnu
60# versions. Sun, in particular.
61#
62#
63#
64#
65# ------------------------------------------------------------------
66
67FROMTOP=/share/builds/components/nspr20/v4.5
68TOTOP=./v4.5
69NSPRDIR=nspr-4.5
70SOURCETAG=NSPR_4_5_RTM
71
72#
73# enumerate Unix object directories on /s/b/c
74UNIX_OBJDIRS="
75AIX4.3_64_DBG.OBJ
76AIX4.3_64_OPT.OBJ
77AIX4.3_DBG.OBJ
78AIX4.3_OPT.OBJ
79HP-UXB.11.00_64_DBG.OBJ
80HP-UXB.11.00_64_OPT.OBJ
81HP-UXB.11.00_DBG.OBJ
82HP-UXB.11.00_OPT.OBJ
83IRIX6.5_n32_PTH_DBG.OBJ
84IRIX6.5_n32_PTH_OPT.OBJ
85Linux2.2_x86_glibc_PTH_DBG.OBJ
86Linux2.2_x86_glibc_PTH_OPT.OBJ
87Linux2.4_x86_glibc_PTH_DBG.OBJ
88Linux2.4_x86_glibc_PTH_OPT.OBJ
89OSF1V5.0_DBG.OBJ
90OSF1V5.0_OPT.OBJ
91SunOS5.6_DBG.OBJ
92SunOS5.6_OPT.OBJ
93SunOS5.8_64_DBG.OBJ
94SunOS5.8_64_OPT.OBJ
95SunOS5.8_DBG.OBJ
96SunOS5.8_OPT.OBJ
97"
98#
99# enumerate Windows object directories on /s/b/c
100WIN_OBJDIRS="
101WIN954.0_DBG.OBJ
102WIN954.0_DBG.OBJD
103WIN954.0_OPT.OBJ
104WINNT4.0_DBG.OBJ
105WINNT4.0_DBG.OBJD
106WINNT4.0_OPT.OBJ
107"
108
109#
110# Create the destination directory.
111#
112echo "removing directory $TOTOP"
113rm -rf $TOTOP
114echo "creating directory $TOTOP"
115mkdir -p $TOTOP
116
117#
118# Generate the tar.gz files for Unix platforms.
119#
120for OBJDIR in $UNIX_OBJDIRS; do
121 echo "removing directory $NSPRDIR"
122 rm -rf $NSPRDIR
123 echo "creating directory $NSPRDIR"
124 mkdir $NSPRDIR
125
126 echo "creating directory $NSPRDIR/include"
127 mkdir $NSPRDIR/include
128 echo "copying $FROMTOP/$OBJDIR/include"
129 cp -r $FROMTOP/$OBJDIR/include $NSPRDIR
130
131 echo "copying $FROMTOP/$OBJDIR/lib"
132 cp -r $FROMTOP/$OBJDIR/lib $NSPRDIR
133
134 echo "copying $FROMTOP/$OBJDIR/bin"
135 cp -r $FROMTOP/$OBJDIR/bin $NSPRDIR
136
137 echo "creating directory $TOTOP/$OBJDIR"
138 mkdir $TOTOP/$OBJDIR
139 echo "creating $TOTOP/$OBJDIR/$NSPRDIR.tar"
140 tar cvf $TOTOP/$OBJDIR/$NSPRDIR.tar $NSPRDIR
141 echo "gzipping $TOTOP/$OBJDIR/$NSPRDIR.tar"
142 gzip $TOTOP/$OBJDIR/$NSPRDIR.tar
143done
144
145#
146# Generate the zip files for Windows platforms.
147#
148for OBJDIR in $WIN_OBJDIRS; do
149 echo "removing directory $NSPRDIR"
150 rm -rf $NSPRDIR
151 echo "creating directory $NSPRDIR"
152 mkdir $NSPRDIR
153
154 echo "creating directory $NSPRDIR/include"
155 mkdir $NSPRDIR/include
156 echo "creating directory $NSPRDIR/include/private"
157 mkdir $NSPRDIR/include/private
158 echo "creating directory $NSPRDIR/include/obsolete"
159 mkdir $NSPRDIR/include/obsolete
160
161 # copy headers and adjust unix line-end to Windows line-end
162 # Note: Watch out for the "sed" command line.
163 # when editing the command, take care to preserve the "^M" as the literal
164 # cntl-M character! in vi, use "cntl-v cntl-m" to enter it!
165 #
166 headers=`ls $FROMTOP/$OBJDIR/include/*.h`
167 for header in $headers; do
168 sed -e 's/$/
169/g' $header > $NSPRDIR/include/`basename $header`
170 done
171 headers=`ls $FROMTOP/$OBJDIR/include/obsolete/*.h`
172 for header in $headers; do
173 sed -e 's/$/
174/g' $header > $NSPRDIR/include/obsolete/`basename $header`
175 done
176 headers=`ls $FROMTOP/$OBJDIR/include/private/*.h`
177 for header in $headers; do
178 sed -e 's/$/
179/g' $header > $NSPRDIR/include/private/`basename $header`
180 done
181
182 echo "copying $FROMTOP/$OBJDIR/lib"
183 cp -r $FROMTOP/$OBJDIR/lib $NSPRDIR
184
185 echo "copying $FROMTOP/$OBJDIR/bin"
186 cp -r $FROMTOP/$OBJDIR/bin $NSPRDIR
187
188 echo "creating directory $TOTOP/$OBJDIR"
189 mkdir $TOTOP/$OBJDIR
190 echo "creating $TOTOP/$OBJDIR/$NSPRDIR.zip"
191 zip -r $TOTOP/$OBJDIR/$NSPRDIR.zip $NSPRDIR
192done
193
194#
195# package the source from CVS
196#
197echo "Packaging source"
198echo "removing directory $NSPRDIR"
199rm -rf $NSPRDIR
200echo "creating directory $NSPRDIR"
201mkdir $NSPRDIR
202myWD=`pwd`
203cd $NSPRDIR
204echo "Pulling source from CVS with tag $SOURCETAG"
205cvs co -r $SOURCETAG mozilla/nsprpub
206cd $myWD
207mkdir $TOTOP/src
208echo "Creating source tar file: $TOTOP/src/$NSPRDIR.tar"
209tar cvf $TOTOP/src/$NSPRDIR.tar $NSPRDIR
210echo "gzip $TOTOP/src/$NSPRDIR.tar"
211gzip $TOTOP/src/$NSPRDIR.tar
212
213#
214# Remove the working directory.
215#
216echo "removing directory $NSPRDIR"
217rm -rf $NSPRDIR
218# --- end repackage.sh ---------------------------------------------
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette