File calligra-l10n.spec.in of Package calligra-l10n
#
# 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 @LANGUAGES@
%define autocorrect_languages it_IT ru_RU uk_UA
Name: calligra-l10n
Version: 2.4.2
Release: 0
License: GPL-2.0+
Summary: Translations for Calligra Suite
Url: http://www.calligra.org/
Group: System/Localization
#@SOURCES@
Source1000: update_spec.pl
Source1001: attributes
BuildRequires: fdupes
BuildRequires: kdelibs4-doc
BuildRequires: libkde4-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
description
#@PACKAGES@
%prep
%setup -q -n calligra-l10n-de-%{version} @EXTRACT@
%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
# work-around for bnc#457908
mkdir -p %{buildroot}%{_kde4_htmldir}/$i/common
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@
%changelog