File calligra-l10n.spec.in of Package calligra4-l10n
#
# spec file for package calligra-l10n
#
# Copyright (c) 2016 SUSE LINUX 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/
#
%define build_languages @LANGUAGES@
# 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.9.11
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 a new language, edit the "attributes" file to add 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
#@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
done
for i in %{build_languages}; do
filename=$i
case $i in
sr@Latn)
filename=srLatn
;;
ca@valencia)
filename=caValencia
;;
esac
{
echo "%defattr(-,root,root,-)"
if [ "$i" = "bs" ]; then
echo "%dir %{_datadir}/locale/bs"
echo "%dir %{_datadir}/locale/bs/LC_MESSAGES"
fi
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