3 # Copyright (C) 2002 Free Software Foundation, Inc.
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2, or (at your option)
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 # Usage: add-to-archive /somewhere/gettext-0.xx.yy.tar.gz
21 # Adds the infrastructure files for gettext version 0.xx.yy to the compressed
22 # CVS repository in the archive.tar.gz file.
25 echo "Usage: add-to-archive /somewhere/gettext-0.xx.yy.tar.gz"
32 *) echo "$0: first argument should be a gettext release tar.gz file"; exit 1;;
35 pack_ver
=`basename "$sourcetgz" | sed -e 's/\.tar\.gz$//'`
36 if test -d "$pack_ver"; then
37 echo "$0: directory $pack_ver already exists"; exit 1
39 pack
=`echo "$pack_ver" | sed -e 's/^\([^-]*\)-.*/\1/'`
40 ver
=`echo "$pack_ver" | sed -e 's/^[^-]*-\(.*\)/\1/'`
42 # Set a nonstandard variable, for a good-looking cvs history.
44 gcc
-shared -O cvsuser.c
-o cvsuser.so
45 cvsuser_hack
=`pwd`/cvsuser.so
47 # Unpack, build and install the source distribution.
48 myprefix
=`pwd`/${pack_ver}-inst
49 gunzip
-c < "$sourcetgz" |
tar xvf
-
51 .
/configure
--prefix="$myprefix"
57 # Copy the relevant files into an empty directory.
60 mkdir
"$work_dir/archive"
61 work_archive
=`pwd`/"$work_dir/archive"
62 (cd "$myprefix"/share
/gettext
66 cp -p $file "$work_archive/$file" ;;
67 config.rpath | mkinstalldirs
)
68 cp -p $file "$work_archive/$file" ;;
71 mkdir
"$work_archive/intl"
74 if test $file != COPYING.LIB-2
&& test $file != COPYING.LIB-2.0
&& test $file != COPYING.LIB-2.1
; then
75 cp -p $file "$work_archive/intl/$file"
79 mkdir
"$work_archive/po"
82 if test $file != Makevars
; then
83 cp -p $file "$work_archive/po/$file"
87 mkdir
"$work_archive/m4"
88 cd "$myprefix"/share
/aclocal
90 cp -p $file "$work_archive/m4/$file"
94 # Add the contents of this directory to the repository.
95 cvsroot
=`pwd`/autopoint-files
97 cvs
-d "$cvsroot" init
98 (cd autopoint-files
&& tar xvfz ..
/archive.
tar.gz
)
99 cvsver
=$pack-`echo "$ver" | sed -e 's/\./_/g'`
101 CVSUSER
=$cvsuser LD_PRELOAD
=$cvsuser_hack \
102 cvs
-d "$cvsroot" import
-m "Import $pack_ver" archive release
"$cvsver"
104 (cd autopoint-files
&& tar cvfz ..
/archive.
tar.gz
--owner=root
--group=root archive
)
105 (cd autopoint-files
&& du archive
)