3 # Copyright (C) 2002, 2006, 2009-2010 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 3 of the License, or
8 # (at your option) any later version.
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, see <http://www.gnu.org/licenses/>.
19 # Usage: add-to-archive /somewhere/gettext-0.xx.yy.tar.gz
20 # Adds the infrastructure files for gettext version 0.xx.yy to the reposutory
21 # in the archive.dir.tar file.
24 echo "Usage: add-to-archive /somewhere/gettext-0.xx.yy.tar.gz"
31 *) echo "$0: first argument should be a gettext release tar.gz file"; exit 1;;
34 pack_ver=`basename "$sourcetgz" | sed -e 's/\.tar\.gz$//'`
35 if test -d "$pack_ver"; then
36 echo "$0: directory $pack_ver already exists"; exit 1
38 pack=`echo "$pack_ver" | sed -e 's/^\([^-]*\)-.*/\1/'`
39 ver=`echo "$pack_ver" | sed -e 's/^[^-]*-\(.*\)/\1/'`
41 # Unpack, build and install the source distribution.
42 myprefix=`pwd`/${pack_ver}-inst
43 gunzip -c < "$sourcetgz" | tar xvf -
45 ./configure --prefix="$myprefix"
51 # Copy the relevant files into an empty directory.
54 mkdir "$work_dir/archive"
55 work_archive=`pwd`/"$work_dir/archive"
56 (cd "$myprefix"/share/gettext
60 cp -p $file "$work_archive/$file" ;;
62 cp -p $file "$work_archive/$file" ;;
65 mkdir "$work_archive/intl"
68 if test $file != COPYING.LIB-2 && test $file != COPYING.LIB-2.0 && test $file != COPYING.LIB-2.1; then
69 cp -p $file "$work_archive/intl/$file"
73 mkdir "$work_archive/po"
76 if test $file != Makevars; then
77 cp -p $file "$work_archive/po/$file"
81 mkdir "$work_archive/m4"
82 cd "$myprefix"/share/aclocal
84 cp -p $file "$work_archive/m4/$file"
88 # Add the contents of this directory to the repository.
90 (cd autopoint-files && tar xf ../archive.dir.tar)
91 mkdir autopoint-files/$pack_ver
92 (cd "$work_archive" && tar cf - .) | (cd autopoint-files/$pack_ver && tar xf -)
93 (cd autopoint-files && tar cf ../archive.dir.tar --owner=root --group=root *)
96 rm -rf autopoint-files