LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File calligra-l10n.spec of Package calligra-l10n (Project openSUSE:Factory)

#
# spec file for package calligra-l10n
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# icecream 0


%define build_languages ca da de el en_GB es et fi fr gl hu it ja kk nb nds nl pl pt pt_BR ru sk sv uk zh_CN zh_TW
# When a package provides autocorrect files with name like "$1_$2" and installs them in a directory named "$1"
# add the name "$1_$2" in the list below
%define autocorrect_languages de_DE it_IT ru_RU uk_UA

Name:           calligra-l10n
Version:        2.5.3
Release:        0
Summary:        Translations for Calligra Suite
License:        GPL-2.0+
Group:          System/Localization
Url:            http://www.calligra.org/
# - Do not modify calligra-l10n.spec directly, instead modify calligra-l10n.spec.in if needed
# - When adding/removing a language, edit the "attributes" file to add/remove it
# - When a package adds/removes doc translations add/remove it also in the pre_checkin.sh script (above the splitdoc=true line)
# - Execute "sh pre_checkin.sh" to check the changes
Source0:        ftp://ftp.kde.org/pub/kde/stable/calligra-%{version}/calligra-l10n/%{name}-ca-%{version}.tar.bz2
Source1:        ftp://ftp.kde.org/pub/kde/stable/calligra-%{version}/calligra-l10n/%{name}-da-%{version}.tar.bz2
Source2:        ftp://ftp.kde.org/pub/kde/stable/calligra-%{version}/calligra-l10n/%{name}-de-%{version}.tar.bz2
Source3:        ftp://ftp.kde.org/pub/kde/stable/calligra-%{version}/calligra-l10n/%{name}-el-%{version}.tar.bz2
Source4:        ftp://ftp.kde.org/pub/kde/stable/calligra-%{version}/calligra-l10n/%{name}-en_GB-%{version}.tar.bz2
Source5:        ftp://ftp.kde.org/pub/kde/stable/calligra-%{version}/calligra-l10n/%{name}-es-%{version}.tar.bz2
Source6:        ftp://ftp.kde.org/pub/kde/stable/calligra-%{version}/calligra-l10n/%{name}-et-%{version}.tar.bz2
Source7:        ftp://ftp.kde.org/pub/kde/stable/calligra-%{version}/calligra-l10n/%{name}-fi-%{version}.tar.bz2
Source8:        ftp://ftp.kde.org/pub/kde/stable/calligra-%{version}/calligra-l10n/%{name}-fr-%{version}.tar.bz2
Source9:        ftp://ftp.kde.org/pub/kde/stable/calligra-%{version}/calligra-l10n/%{name}-gl-%{version}.tar.bz2
Source10:       ftp://ftp.kde.org/pub/kde/stable/calligra-%{version}/calligra-l10n/%{name}-hu-%{version}.tar.bz2
Source11:       ftp://ftp.kde.org/pub/kde/stable/calligra-%{version}/calligra-l10n/%{name}-it-%{version}.tar.bz2
Source12:       ftp://ftp.kde.org/pub/kde/stable/calligra-%{version}/calligra-l10n/%{name}-ja-%{version}.tar.bz2
Source13:       ftp://ftp.kde.org/pub/kde/stable/calligra-%{version}/calligra-l10n/%{name}-kk-%{version}.tar.bz2
Source14:       ftp://ftp.kde.org/pub/kde/stable/calligra-%{version}/calligra-l10n/%{name}-nb-%{version}.tar.bz2
Source15:       ftp://ftp.kde.org/pub/kde/stable/calligra-%{version}/calligra-l10n/%{name}-nds-%{version}.tar.bz2
Source16:       ftp://ftp.kde.org/pub/kde/stable/calligra-%{version}/calligra-l10n/%{name}-nl-%{version}.tar.bz2
Source17:       ftp://ftp.kde.org/pub/kde/stable/calligra-%{version}/calligra-l10n/%{name}-pl-%{version}.tar.bz2
Source18:       ftp://ftp.kde.org/pub/kde/stable/calligra-%{version}/calligra-l10n/%{name}-pt-%{version}.tar.bz2
Source19:       ftp://ftp.kde.org/pub/kde/stable/calligra-%{version}/calligra-l10n/%{name}-pt_BR-%{version}.tar.bz2
Source20:       ftp://ftp.kde.org/pub/kde/stable/calligra-%{version}/calligra-l10n/%{name}-ru-%{version}.tar.bz2
Source21:       ftp://ftp.kde.org/pub/kde/stable/calligra-%{version}/calligra-l10n/%{name}-sk-%{version}.tar.bz2
Source22:       ftp://ftp.kde.org/pub/kde/stable/calligra-%{version}/calligra-l10n/%{name}-sv-%{version}.tar.bz2
Source23:       ftp://ftp.kde.org/pub/kde/stable/calligra-%{version}/calligra-l10n/%{name}-uk-%{version}.tar.bz2
Source24:       ftp://ftp.kde.org/pub/kde/stable/calligra-%{version}/calligra-l10n/%{name}-zh_CN-%{version}.tar.bz2
Source25:       ftp://ftp.kde.org/pub/kde/stable/calligra-%{version}/calligra-l10n/%{name}-zh_TW-%{version}.tar.bz2
#@SOURCES@
Source1000:     update_spec.pl
Source1001:     attributes
BuildRequires:  fdupes
BuildRequires:  kdelibs4-doc
BuildRequires:  libkde4-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
Translations for Calligra Suite applications and manuals.

%package ca
Summary:        Catalan Translations for Calligra Suite Applications
License:        LGPL-2.1+
Group:          System/Localization
Provides:       locale(calligra:ca)

%description ca
This package contains application translations for Calligra Suite in Catalan.

%package ca-doc
Summary:        Catalan Translations for Calligra Suite Manuals
License:        LGPL-2.1+
Group:          System/Localization
Provides:       locale(calligra:ca)

%description ca-doc
This package contains application manuals translations for Calligra Suite in
Catalan.

%package da
Summary:        Danish Translations for Calligra Suite Applications
License:        GPL-2.0+
Group:          System/Localization
Provides:       locale(calligra:da)

%description da
This package contains application translations for Calligra Suite in Danish.

%package de
Summary:        German Translations for Calligra Suite Applications
License:        LGPL-2.1+
Group:          System/Localization
Provides:       locale(calligra:de)

%description de
This package contains application translations for Calligra Suite in German.

%package de-doc
Summary:        German Translations for Calligra Suite Manuals
License:        LGPL-2.1+
Group:          System/Localization
Provides:       locale(calligra:de)

%description de-doc
This package contains application manuals translations for Calligra Suite in
German.

%package el
Summary:        Greek Translations for Calligra Suite Applications
License:        LGPL-2.1+
Group:          System/Localization
Provides:       locale(calligra:el)

%description el
This package contains application translations for Calligra Suite in Greek.

%package en_GB
Summary:        English (UK) Translations for Calligra Suite Applications
License:        LGPL-2.1+
Group:          System/Localization
Provides:       locale(calligra:en_GB)

%description en_GB
This package contains application translations for Calligra Suite in
English (UK).

%package es
Summary:        Spanish Translations for Calligra Suite Applications
License:        LGPL-2.1+
Group:          System/Localization
Provides:       locale(calligra:es)

%description es
This package contains application translations for Calligra Suite in Spanish.

%package es-doc
Summary:        Spanish Translations for Calligra Suite Manuals
License:        LGPL-2.1+
Group:          System/Localization
Provides:       locale(calligra:es)

%description es-doc
This package contains application manuals translations for Calligra Suite in
Spanish.

%package et
Summary:        Estonian Translations for Calligra Suite Applications
License:        LGPL-2.1+
Group:          System/Localization
Provides:       locale(calligra:et)

%description et
This package contains application translations for Calligra Suite in Estonian.

%package et-doc
Summary:        Estonian Translations for Calligra Suite Manuals
License:        LGPL-2.1+
Group:          System/Localization
Provides:       locale(calligra:et)

%description et-doc
This package contains application manuals translations for Calligra Suite in
Estonian.

%package fi
Summary:        Finnish Translations for Calligra Suite Applications
License:        LGPL-2.1+
Group:          System/Localization
Provides:       locale(calligra:fi)

%description fi
This package contains application translations for Calligra Suite in Finnish.

%package fr
Summary:        French Translations for Calligra Suite Applications
License:        LGPL-2.1+
Group:          System/Localization
Provides:       locale(calligra:fr)

%description fr
This package contains application translations for Calligra Suite in French.

%package fr-doc
Summary:        French Translations for Calligra Suite Manuals
License:        LGPL-2.1+
Group:          System/Localization
Provides:       locale(calligra:fr)

%description fr-doc
This package contains application manuals translations for Calligra Suite in
French.

%package gl
Summary:        Galician Translations for Calligra Suite Applications
License:        GPL-2.0+
Group:          System/Localization
Provides:       locale(calligra:gl)

%description gl
This package contains application translations for Calligra Suite in Galician.

%package gl-doc
Summary:        Galician Translations for Calligra Suite Manuals
License:        GPL-2.0+
Group:          System/Localization
Provides:       locale(calligra:gl)

%description gl-doc
This package contains application manuals translations for Calligra Suite in
Galician.

%package hu
Summary:        Hungarian Translations for Calligra Suite Applications
License:        LGPL-2.1+
Group:          System/Localization
Provides:       locale(calligra:hu)

%description hu
This package contains application translations for Calligra Suite in Hungarian.

%package it
Summary:        Italian Translations for Calligra Suite Applications
License:        LGPL-2.1+
Group:          System/Localization
Provides:       locale(calligra:it)

%description it
This package contains application translations for Calligra Suite in Italian.

%package it-doc
Summary:        Italian Translations for Calligra Suite Manuals
License:        LGPL-2.1+
Group:          System/Localization
Provides:       locale(calligra:it)

%description it-doc
This package contains application manuals translations for Calligra Suite in
Italian.

%package ja
Summary:        Japanese Translations for Calligra Suite Applications
License:        GPL-2.0+
Group:          System/Localization
Provides:       locale(calligra:ja)

%description ja
This package contains application translations for Calligra Suite in Japanese.

%package kk
Summary:        Kazakh Translations for Calligra Suite Applications
License:        LGPL-2.1+
Group:          System/Localization
Provides:       locale(calligra:kk)

%description kk
This package contains application translations for Calligra Suite in Kazakh.

%package nb
Summary:        Norwegian (Bokmaal) Translations for Calligra Suite Applications
License:        LGPL-2.1+
Group:          System/Localization
Provides:       locale(calligra:nb)

%description nb
This package contains application translations for Calligra Suite in
Norwegian (Bokmaal).

%package nds
Summary:        Low Saxon Translations for Calligra Suite Applications
License:        LGPL-2.1+
Group:          System/Localization
Provides:       locale(calligra:nds)

%description nds
This package contains application translations for Calligra Suite in Low Saxon.

%package nl
Summary:        Dutch Translations for Calligra Suite Applications
License:        LGPL-2.1+
Group:          System/Localization
Provides:       locale(calligra:nl)

%description nl
This package contains application translations for Calligra Suite in Dutch.

%package nl-doc
Summary:        Dutch Translations for Calligra Suite Manuals
License:        LGPL-2.1+
Group:          System/Localization
Provides:       locale(calligra:nl)

%description nl-doc
This package contains application manuals translations for Calligra Suite in
Dutch.

%package pl
Summary:        Polish Translations for Calligra Suite Applications
License:        LGPL-2.1+
Group:          System/Localization
Provides:       locale(calligra:pl)

%description pl
This package contains application translations for Calligra Suite in Polish.

%package pt
Summary:        Portuguese Translations for Calligra Suite Applications
License:        LGPL-2.1+
Group:          System/Localization
Provides:       locale(calligra:pt)

%description pt
This package contains application translations for Calligra Suite in
Portuguese.

%package pt_BR
Summary:        Brazil Portuguese Translations for Calligra Suite Applications
License:        LGPL-2.1+
Group:          System/Localization
Provides:       locale(calligra:pt_BR)

%description pt_BR
This package contains application translations for Calligra Suite in
Brazil Portuguese.

%package pt_BR-doc
Summary:        Brazil Portuguese Translations for Calligra Suite Manuals
License:        LGPL-2.1+
Group:          System/Localization
Provides:       locale(calligra:pt_BR)

%description pt_BR-doc
This package contains application manuals translations for Calligra Suite in
Brazil Portuguese.

%package ru
Summary:        Russian Translations for Calligra Suite Applications
License:        LGPL-2.1+
Group:          System/Localization
Provides:       locale(calligra:ru)

%description ru
This package contains application translations for Calligra Suite in Russian.

%package ru-doc
Summary:        Russian Translations for Calligra Suite Manuals
License:        LGPL-2.1+
Group:          System/Localization
Provides:       locale(calligra:ru)

%description ru-doc
This package contains application manuals translations for Calligra Suite in
Russian.

%package sk
Summary:        Slovak Translations for Calligra Suite Applications
License:        LGPL-2.1+
Group:          System/Localization
Provides:       locale(calligra:sk)

%description sk
This package contains application translations for Calligra Suite in Slovak.

%package sv
Summary:        Swedish Translations for Calligra Suite Applications
License:        LGPL-2.1+
Group:          System/Localization
Provides:       locale(calligra:sv)

%description sv
This package contains application translations for Calligra Suite in Swedish.

%package sv-doc
Summary:        Swedish Translations for Calligra Suite Manuals
License:        LGPL-2.1+
Group:          System/Localization
Provides:       locale(calligra:sv)

%description sv-doc
This package contains application manuals translations for Calligra Suite in
Swedish.

%package uk
Summary:        Ukrainian Translations for Calligra Suite Applications
License:        LGPL-2.1+
Group:          System/Localization
Provides:       locale(calligra:uk)

%description uk
This package contains application translations for Calligra Suite in Ukrainian.

%package uk-doc
Summary:        Ukrainian Translations for Calligra Suite Manuals
License:        LGPL-2.1+
Group:          System/Localization
Provides:       locale(calligra:uk)

%description uk-doc
This package contains application manuals translations for Calligra Suite in
Ukrainian.

%package zh_CN
Summary:        Simplified Chinese Translations for Calligra Suite Applications
License:        LGPL-2.1+
Group:          System/Localization
Provides:       locale(calligra:zh_CN)

%description zh_CN
This package contains application translations for Calligra Suite in
Simplified Chinese.

%package zh_TW
Summary:        Chinese Translations for Calligra Suite Applications
License:        LGPL-2.1+
Group:          System/Localization
Provides:       locale(calligra:zh_TW)

%description zh_TW
This package contains application translations for Calligra Suite in Chinese.

%prep
%setup -q -n calligra-l10n-de-%{version} -b 0 -b 1 -b 2 -b 3 -b 4 -b 5 -b 6 -b 7 -b 8 -b 9 -b 10 -b 11 -b 12 -b 13 -b 14 -b 15 -b 16 -b 17 -b 18 -b 19 -b 20 -b 21 -b 22 -b 23 -b 24 -b 25 

%build
cd ..

for i in %{build_languages}; do
   pushd calligra-l10n-$i-%{version} || exit 1
   %cmake_kde4 -d build
   %make_jobs
   popd
done

%install
cd ..

for i in %{build_languages}; do
   pushd calligra-l10n-$i-%{version}/build || exit 1
   %kde4_makeinstall
   popd
done

for i in %{build_languages}; do
   filename=$i
   case $i in
	sr@Latn)
	   filename=srLatn
	   ;;
   esac
   {
   echo "%defattr(-,root,root,-)"
   if test -d %{buildroot}%{_datadir}/locale/$i; then
        echo "%lang($i) %{_datadir}/locale/$i/LC_MESSAGES/*"
   fi
   if test -f %{buildroot}%{_kde4_appsdir}/calligra/autocorrect/$i.xml; then
        echo "%dir %{_kde4_appsdir}/calligra"
        echo "%dir %{_kde4_appsdir}/calligra/autocorrect"
        echo "%lang($i) %{_kde4_appsdir}/calligra/autocorrect/$i.xml"
   fi
   if test -f %{buildroot}%{_kde4_appsdir}/koffice/autocorrect/$i.xml; then
        echo "%dir %{_kde4_appsdir}/koffice"
        echo "%dir %{_kde4_appsdir}/koffice/autocorrect"
        echo "%lang($i) %{_kde4_appsdir}/koffice/autocorrect/$i.xml"
   fi
   } > files.$filename
   {
   echo "%defattr(-,root,root,-)"
   if test -d %{buildroot}%{_kde4_htmldir}/$i; then
        echo "%lang($i) %doc %{_kde4_htmldir}/$i"
   fi
   } > files.doc.$filename
   cat files.$filename files.doc.$filename > files.both.$filename
done

for i in %{autocorrect_languages}; do
   lang=`echo $i|cut -f1 -d"_"`
   {
   if test -f %{buildroot}%{_kde4_appsdir}/calligra/autocorrect/$i.xml; then
        echo "%dir %{_kde4_appsdir}/calligra"
        echo "%dir %{_kde4_appsdir}/calligra/autocorrect"
        echo "%lang($lang) %{_kde4_appsdir}/calligra/autocorrect/$i.xml"
   fi
   } >> files.$lang
done

%fdupes -s %{buildroot}

%files ca -f ../files.ca

%files ca-doc -f ../files.doc.ca

%files da -f ../files.both.da

%files de -f ../files.de

%files de-doc -f ../files.doc.de

%files el -f ../files.both.el

%files en_GB -f ../files.both.en_GB

%files es -f ../files.es

%files es-doc -f ../files.doc.es

%files et -f ../files.et

%files et-doc -f ../files.doc.et

%files fi -f ../files.both.fi

%files fr -f ../files.fr

%files fr-doc -f ../files.doc.fr

%files gl -f ../files.gl

%files gl-doc -f ../files.doc.gl

%files hu -f ../files.both.hu

%files it -f ../files.it

%files it-doc -f ../files.doc.it

%files ja -f ../files.both.ja

%files kk -f ../files.both.kk

%files nb -f ../files.both.nb

%files nds -f ../files.both.nds

%files nl -f ../files.nl

%files nl-doc -f ../files.doc.nl

%files pl -f ../files.both.pl

%files pt -f ../files.both.pt

%files pt_BR -f ../files.pt_BR

%files pt_BR-doc -f ../files.doc.pt_BR

%files ru -f ../files.ru

%files ru-doc -f ../files.doc.ru

%files sk -f ../files.both.sk

%files sv -f ../files.sv

%files sv-doc -f ../files.doc.sv

%files uk -f ../files.uk

%files uk-doc -f ../files.doc.uk

%files zh_CN -f ../files.both.zh_CN

%files zh_TW -f ../files.both.zh_TW

#@FILES@

%changelog