#! /bin/sh
# script to generate the control file.
# Copyright SPI (2002). Author: Martin Quinson <Martin.Quinson@tuxfamily.org>
# 
# I imagine it's quite unusual to have generated control file, but we speak
#  here of more than 50 packages...

VER="1.0.0-3.4pre2"

cat > ../control << EOF
Source: openoffice.org
Section: contrib/editors
Priority: optional
Maintainer: Debian OpenOffice Team <debian-openoffice@lists.debian.org>
Uploaders: Jan-Hendrik Palic <jan.palic@linux-debian.de>, Peter Novodvorsky <nidd@debian.org>, Chris Halls <chris.halls@gmx.de>
Build-Depends: bison, bzip2, debhelper (>= 4.0.6), dpkg (>= 1.7.0), flex, libpam-dev, libstlport4.5gcc3-dev[i386], libxaw7-dev, tcsh, unzip, zip, xvfb, xlibs-dev, xbase-clients, xfonts-base, gcc-3.0[i386], g++-3.0[i386], libstdc++3[i386], gcc[powerpc], g++[powerpc], libstdc++2.10-dev[powerpc], autoconf, bzip2
Build-Conflicts: libgcj2-dev
Standards-Version: 3.5.6

Package: openoffice.org
Architecture: i386 powerpc
Depends: openoffice.org-common,${shlibs:Depends}
Conflicts: openoffice
Description: high-quality office suite
 OpenOffice.org is a complete modern office suite, licensed under the GPL, with
 features comparable to Microsoft(R) Office features.
 .
 Please do not submit bugs to the openoffice.org Issuezilla unless you are sure
 it is not a problem with the Debian packaging (there are still quite a few!).
 See the README.Debian and TODO.Debian for known bugs and workarounds.
 .
 For latest news on Openoffice in Debian, see http://www.linux-debian.de/openoffice/
 .
 Upstream URL: http://www.openoffice.org

Package: openoffice.org-common
Architecture: all
Depends: openoffice.org
Description: openoffice.org common files
 OpenOffice.org is a complete modern office suite, licensed under the GPL, with
 features comparable to Microsoft(R) Office features.
 .
 This package contains the architecture-independent portions of Openoffice.org
 that are not expected to change over the next few package revisions.
 .
 For latest news on Openoffice in Debian, see http://www.linux-debian.de/openoffice/.

EOF

for LANG in `./openoffice-xlate-lang -p all | sed 's/01//'` ; do
LNAME=`./openoffice-xlate-lang -l $LANG | tr A-Z a-z`
LCODE=`./openoffice-xlate-lang -i $LANG | tr A-Z a-z`
#echo "LANG=$LANG. ; LNAME=$LNAME. ; LCODE=$LCODE."
sed -e "s|LNAME|$LNAME|g" -e "s|LCODE|$LCODE|g" -e "s|VER|$VER|g" >> ../control << EOF
Package: ooo-l10n-LCODE
Architecture: all
Depends: ${shlibs:Depends}, openoffice.org (=VER)
Description: LNAME files for openoffice.org
 OpenOffice is a complete modern office suite, licensed under the GPL, with
 features comparable to Microsoft(R) Office features.
 .
 This package contains the localization of openoffice.org in LNAME. It contains the user
 interface, the help, the templates and the autotext features. (please note that not all 
 this is available for all possible language).
 .
 For latest news on Openoffice in Debian, see http://www.linux-debian.de/openoffice/.

EOF
done
