diff options
Diffstat (limited to 'source/kdei/kde-l10n/kde-l10n.SlackBuild')
-rwxr-xr-x | source/kdei/kde-l10n/kde-l10n.SlackBuild | 40 |
1 files changed, 35 insertions, 5 deletions
diff --git a/source/kdei/kde-l10n/kde-l10n.SlackBuild b/source/kdei/kde-l10n/kde-l10n.SlackBuild index 1b522bf8..04670e75 100755 --- a/source/kdei/kde-l10n/kde-l10n.SlackBuild +++ b/source/kdei/kde-l10n/kde-l10n.SlackBuild @@ -1,7 +1,7 @@ #!/bin/sh # Copyright 2008 Robby Workman Northport, AL, USA -# Copyright 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2009, 2010, 2011 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -35,9 +35,9 @@ if [ ! -r ./languages ]; then done fi -[ -z $VERSION ] && export VERSION=4.4.3 +[ -z $VERSION ] && export VERSION=4.5.5 [ -z $ARCH ] && export ARCH=noarch -[ -z $BUILD ] && export BUILD=1 +[ -z $BUILD ] && export BUILD=3 # Use this as CFLAGS and CXXFLAGS: if [ -z "$SLKCFLAGS" ]; then @@ -61,6 +61,35 @@ fi CWD=$(pwd) TMP=${TMP:-/tmp} +# This function will insert missing kdepim translations from kde-l10n-4.4.5: +insert_kdepim() { + if [ -r $CWD/kdepim-l10n/kdepim-l10n-$(echo $PKGNAM | cut -f 3 -d -)-4.4.5.tar.bz2 ]; then + tar xvf $CWD/kdepim-l10n/kdepim-l10n-$(echo $PKGNAM | cut -f 3 -d -)-4.4.5.tar.bz2 + fi + for dir in $(find . -type d -name messages) $(find . -type d -name docs) ; do + ( cd $dir + if [ -d kdepim ]; then + echo "add_subdirectory( kdepim )" >> CMakeLists.txt.new + fi + if [ -r CMakeLists.txt ]; then + cat CMakeLists.txt >> CMakeLists.txt.new + mv CMakeLists.txt.new CMakeLists.txt + else + rm -f CMakeLists.txt.new + fi + ) + done + # Update DTD specification. This will fix some of the issues... + sed -i -e "s/V4.1.2-Based/V4.2-Based/g" $(grep -lr "V4.1.2-Based" *) + sed -i -e "s/V4.1-Based/V4.2-Based/g" $(grep -lr "V4.1-Based" *) + sed -i -e "s/V4.2-Based Variant V1.0/V4.2-Based Variant V1.1/g" $(grep -lr "V4.2-Based Variant V1.0" *) + if ls $CWD/kdepim-l10n/kdepim-l10n-$(echo $PKGNAM | cut -f 3 -d -)-4.4.5.*.diff.gz 1> /dev/null 2> /dev/null ; then + for patch in $CWD/kdepim-l10n/kdepim-l10n-$(echo $PKGNAM | cut -f 3 -d -)-4.4.5.*.diff.gz ; do + zcat $patch | patch -p1 --verbose || exit 1 + done + fi +} + make_language_pack() { rm -rf $PKG mkdir -p $TMP $PKG @@ -68,6 +97,7 @@ cd $TMP rm -rf $PKGNAM-$VERSION tar xvf $CWD/$PKGNAM-$VERSION.tar.bz2 || exit 1 cd $PKGNAM-$VERSION || exit 1 +insert_kdepim; chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ @@ -75,7 +105,7 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; mkdir -p build -cd build +( cd build cmake \ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ @@ -86,7 +116,7 @@ cd build .. make || exit 1 make install DESTDIR=$PKG || exit 1 -cd - +) || touch $TMP/$PKGNAM.failed ( cd $PKG find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null |