File update_rpm of Package kde-susetranslations

#! /bin/sh

opwd=$PWD
fill_po=$PWD/fill_po.sh
test -e "$fill_po" || exit 1
tdir=`mktemp -d`
pushd $tdir || exit 1

mkdir kde-susetranslations
mkdir kde-susetranslations/po-kde3
mkdir kde-susetranslations/po-kde4

cat >kde-susetranslations/CMakeLists.txt <<EOF
project(kde-susetranslations)
cmake_minimum_required(VERSION 2.4.5)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/modules )
# search packages used by KDE
find_package(KDE4 REQUIRED)
include (KDE4Defaults)
include (MacroLibrary)
include(MacroOptionalAddSubdirectory)
macro_optional_add_subdirectory(po-kde3)
macro_optional_add_subdirectory(po-kde4)
EOF

if test -d "$MY_LCN_CHECKOUT"; then
  echo "Updating $MY_LCN_CHECKOUT"
  svn up $MY_LCN_CHECKOUT || exit 1
else
  echo "No \$MY_LCN_CHECKOUT set, will checkout temporarly"
  svn export https://svn.berlios.de/svnroot/repos/opensuse-i18n/trunk/lcn || exit 1
  export MY_LCN_CHECKOUT=$PWD/lcn
fi

pushd kde-susetranslations/po-kde3
bash "$fill_po" 'susetranslations' /opt/kde3/share/locale
popd

pushd kde-susetranslations/po-kde4
bash "$fill_po" 'simple-ccsm-kde'
popd

tar -cvj -f $opwd/kde-susetranslations.tar.bz2 kde-susetranslations
popd
rm -rf $tdir
openSUSE Build Service is sponsored by