3
function mapKdeCodeToUbuntu {
4
case `eval "expr \"\$"$1"\" "` in
6
eval "$1=\"belatin\"";;
8
eval "$1=\"ca-valencia\"";;
14
eval "$1=\"srijekavian\"";;
16
eval "$1=\"srijekavianlatin\"";;
18
eval "$1=\"srlatin\"";;
20
eval "$1=\"uzcyrillic\"";;
28
function mapUbuntuNameToDep {
29
case `eval "expr \"\$"$1"\" "` in
47
eval "$1=\"zh-hans\"";;
49
eval "$1=\"zh-hant\"";;
53
GET="scp ftpubuntu@ktown.kde.org:/home/packager/ftpubuntu"
58
if [ ! -x /usr/bin/bzr-buildpackage ]; then
59
echo "bzr-buildpackage needs to be installed to build kde-l10n packages"
80
"kubuntu-kde-l10n-common" )
85
echo "A already existing build/ directory was found, which indicates that there was a build done earlier."
86
echo "Note: you can also run this script with -ncd to preserve only the tar.bz2 files from build/."
87
echo "Do you REALLY REALLY want to mess with the current build dir? (y/n)"
89
if [[ $reply != "y" ]]; then
96
if [ $clean_dld -eq 0 ]; then
97
find build/* -maxdepth 0 | grep -v build-area | xargs rm -rfv
98
find build/build-area/* -maxdepth 0 | grep -v ".tar.bz2" | xargs rm -rfv
107
BRANCH="lp:~kubuntu-members/kubuntu-dev-tools/kde-l10n-common"
109
BOILERPLATE="# ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !#\n# DO NOT EVEN THINK ABOUT CHANGING THIS FILE DIRECTLY! ! ! !\n# PLEASE USE THE BZR BRANCH AS SEEN IN debian\/control\n# MAKE YOUR CHANGES THERE AND THEN RUN debian\/build-l10n.sh\n# kthxbai :)\n################################################################################\n################################################################################\n################################################################################\n################################################################################"
111
if [[ `bzr revno` != `bzr revno ${BRANCH}` ]]; then
112
echo "For one reason or another the parent branch does not match the local one, please ensure they match, or all is going down the drain."
113
echo "Most importantly: YOU MUST PUSH TO THE PARENT BRANCH BEFORE BUILDING THE PACKAGES!!!"
114
echo "Leaving you alone in the cold."
119
bzr branch $BRANCH $CO
122
VERSION=`dpkg-parsechangelog | sed -ne 's/^Version: \(\([0-9]\+\):\)\?\(.*\)-.*/\3/p'`
123
if [[ ${VERSION} =~ (.*)([abcdefghijklmnopqrstuvwxyz]) ]]; then
124
KDEVERSION=${BASH_REMATCH[1]}
132
# only download tars if we actually removed them
133
if [ $clean_dld -ne 0 ]; then
134
if [[ "$subset" == "" ]]; then
136
$GET/unstable/${KDEVERSION}/src/kde-l10n/kde-l10n-*.tar.bz2 .
139
for pkg in $subset; do
140
$GET/unstable/${KDEVERSION}/src/kde-l10n/kde-l10n-$pkg-*.tar.bz2 .
145
for tfile in `ls kde-l10n-*.tar.bz2`; do
149
if [[ $tfile =~ kde-l10n-(.*)-$KDEVERSION.tar.bz2 ]]; then
150
kdecode=${BASH_REMATCH[1]}
154
mapKdeCodeToUbuntu ubuntucode
156
ubuntudep=$ubuntucode
157
mapUbuntuNameToDep ubuntudep
159
# remove any left overs from previous runs
160
rm -r kde-l10n-${ubuntucode}_${VERSION}.orig.tar.bz2
162
ln -s $tfile kde-l10n-${ubuntucode}_${VERSION}.orig.tar.bz2
163
tar xf kde-l10n-${ubuntucode}_${VERSION}.orig.tar.bz2
168
if [ $i -eq 2 ]; then
169
kdename=`echo "$line" | cut -f2 -d=`
172
done < kde-l10n-$kdecode-$KDEVERSION/messages/entry.desktop
173
rm -rf kde-l10n-$kdecode-$KDEVERSION
175
##############################
178
bzr branch $CO kde-l10n-$kdecode
180
cd kde-l10n-$kdecode/debian/
181
for dfile in `ls`; do
182
sed -i "s/ia/$ubuntudep/g" $dfile
183
sed -i "s/ia/$ubuntucode/g" $dfile
184
sed -i "s/ia/$kdecode/g" $dfile
185
sed -i "s/Interlingua/$kdename/g" $dfile
186
sed -i "s/# ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !#
187
# DO NOT EVEN THINK ABOUT CHANGING THIS FILE DIRECTLY! ! ! !
188
# PLEASE USE THE BZR BRANCH AS SEEN IN debian/control
189
# MAKE YOUR CHANGES THERE AND THEN RUN debian/build-l10n.sh
191
################################################################################
192
################################################################################
193
################################################################################
194
################################################################################/$BOILERPLATE/g" $dfile
197
bzr-buildpackage -S --builder "make -f debian/rules get-desktop && dpkg-buildpackage -S"