File childsplay-languagepacks.spec of Package childsplay-languagepacks

#
# spec file for package childsplay-languagepacks 
#
# Copyright (c) 2012 Lars Vogdt
#
# 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/
#


Name:           childsplay-languagepacks
Summary:        Localized soundfiles for childsplay
Version:        0.9.1
Release:        1
License:        GPLv2
Group:          Amusements/Games
Url:            http://childsplay.sourceforge.net/
Vendor:         openSUSE-Education
BuildArch:      noarch
Source0:        alphabet_sounds_bg-%version.tar.bz2
Source1:        alphabet_sounds_ca-%version.tar.bz2 
Source2:        alphabet_sounds_de-%version.tar.bz2 
Source3:        alphabet_sounds_en_GB-%version.tar.bz2
Source4:        alphabet_sounds_es-%version.tar.bz2 
Source5:        alphabet_sounds_fr-%version.tar.bz2 
Source6:        alphabet_sounds_it-%version.tar.bz2 
Source7:        alphabet_sounds_lt-%version.tar.bz2
Source8:        alphabet_sounds_nb-%version.tar.bz2
Source9:        alphabet_sounds_nl-%version.tar.bz2 
Source10:       alphabet_sounds_pt-%version.tar.bz2 
Source11:       alphabet_sounds_pt_BR-%version.tar.bz2
Source12:       alphabet_sounds_ro-%version.tar.bz2
Source13:       alphabet_sounds_ru-%version.tar.bz2 
Source14:       alphabet_sounds_sl-%version.tar.bz2
Source15:       alphabet_sounds_sv-%version.tar.bz2 
Source100:      childsplay-language_packs-rpmlintrc
Requires:       childsplay >= 0.8
Requires:       childsplay-languagepack = %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} > 1020
BuildRequires:  fdupes
%endif
%define         installdir   %{_datadir}/alphabet_sounds
%define         flashcarddir %{_datadir}/childsplay_sp/CPData/FlashcardsData/names/

%description
These are localized soundfiles used by the childsplay project.


%package all
Summary:       Installs all localized soundfiles
Group:         Amusements/Teaching/Other
Requires:      childsplay-languagepacks-bg = %{version}
Requires:      childsplay-languagepacks-ca = %{version}
Requires:      childsplay-languagepacks-de = %{version}
Requires:      childsplay-languagepacks-en_GB = %{version} 
Requires:      childsplay-languagepacks-es = %{version} 
Requires:      childsplay-languagepacks-fr = %{version} 
Requires:      childsplay-languagepacks-it = %{version} 
Requires:      childsplay-languagepacks-lt = %{version} 
Requires:      childsplay-languagepacks-nb = %{version} 
Requires:      childsplay-languagepacks-nl = %{version} 
Requires:      childsplay-languagepacks-pt_BR = %{version} 
Requires:      childsplay-languagepacks-ro = %{version} 
Requires:      childsplay-languagepacks-ru = %{version} 
Requires:      childsplay-languagepacks-sl = %{version} 
Requires:      childsplay-languagepacks-sv = %{version} 

%description all
This package requires all localized packages containing soundfiles for 
childsplay.


%files all
%defattr (-,root,root,-)
%doc README.SuSE

%package bg
Summary:        Localized soundfiles for Bulgarian
Group:          Amusements/Teaching/Other
Requires:       childsplay >= 0.71
Provides:       childsplay-languagepack = %version-%release
Provides:       alphabet_sounds = %version-%release
Provides:       locale(childsplay:bg)

%description bg
This package contains localized soundfiles for Bulgarian.

%files bg
%defattr (-,root,root,-)
%{installdir}/bg*
#{flashcarddir}/bg*
#--------------------------------------------------------------------
%package ca
Summary:        Localized soundfiles for Catalan
Group:          Amusements/Teaching/Other
Requires:       childsplay >= 0.71
Provides:       childsplay-languagepack = %version-%release
Provides:       alphabet_sounds = %version-%release
Provides:       locale(childsplay:ca)

%description ca
This package contains localized soundfiles for Catalan.

%files ca
%defattr (-,root,root,-)
%{installdir}/ca*
%{flashcarddir}/ca*
#----------------------------------------------------------------------
%package de
Summary:        Localized soundfiles for German
Group:          Amusements/Teaching/Other
Requires:       childsplay >= 0.71
Provides:       childsplay-languagepack = %version-%release
Provides:       alphabet_sounds = %version-%release
Provides:       locale(childsplay:de)

%description de
This package contains localized soundfiles for German.

%files de
%defattr (-,root,root,-)
%{installdir}/de*
%{flashcarddir}/de*
#----------------------------------------------------------------------
%package en_GB
Summary:        Localized soundfiles for British English
Group:          Amusements/Teaching/Other
Requires:       childsplay >= 0.71
Provides:       childsplay-languagepack = %version-%release
Provides:       alphabet_sounds = %version-%release
Provides:       locale(childsplay:en_GB)

%description en_GB
This package contains localized soundfiles for British English.

%files en_GB
%defattr (-,root,root,-)
%{installdir}/en_GB*
#{flashcarddir}/en_GB*
#--------------------------------------------------------------------
%package es
Summary:        Localized soundfiles for Spanish 
Group:          Amusements/Teaching/Other
Requires:       childsplay >= 0.71
Provides:       childsplay-languagepack = %version-%release
Provides:       alphabet_sounds = %version-%release
Provides:       locale(childsplay:es)

%description es
This package contains localized soundfiles for Spanish.

%files es
%defattr (-,root,root,-)
%{installdir}/es*
%{flashcarddir}/es*
#----------------------------------------------------------------------
%package fr
Summary:        Localized soundfiles for French
Group:          Amusements/Teaching/Other
Requires:       childsplay >= 0.71
Provides:       childsplay-languagepack = %version-%release
Provides:       alphabet_sounds = %version-%release
Provides:       locale(childsplay:fr)

%description fr
This package contains localized soundfiles for French.

%files fr
%defattr (-,root,root,-)
%{installdir}/fr*
%{flashcarddir}/fr*
#----------------------------------------------------------------------
%package it
Summary:        Localized soundfiles for Italian
Group:          Amusements/Teaching/Other
Requires:       childsplay >= 0.71
Provides:       childsplay-languagepack = %version-%release
Provides:       alphabet_sounds = %version-%release
Provides:       locale(childsplay:it)

%description it
This package contains localized soundfiles for Italian.

%files it
%defattr (-,root,root,-)
%{installdir}/it*
%{flashcarddir}/it*
#----------------------------------------------------------------------
%package lt
Summary:        Localized soundfiles for Lithuanian
Group:          Amusements/Teaching/Other
Requires:       childsplay >= 0.71
Provides:       childsplay-languagepack = %version-%release
Provides:       alphabet_sounds = %version-%release
Provides:       locale(childsplay:lt)

%description lt
This package contains localized soundfiles for Lithuanian.

%files lt
%defattr (-,root,root,-)
%{installdir}/lt*
#{flashcarddir}/lt*
#----------------------------------------------------------------------
%package nb
Summary:        Localized soundfiles for Norwegian Bokm
Group:          Amusements/Teaching/Other
Requires:       childsplay >= 0.71
Provides:       childsplay-languagepack = %version-%release
Provides:       alphabet_sounds = %version-%release
Provides:       locale(childsplay:nb)

%description nb
This package contains localized soundfiles for Norwegian Bokm.

%files nb
%defattr (-,root,root,-)
%{installdir}/nb*
#{flashcarddir}/nb*
#--------------------------------------------------------------------
%package nl
Summary:        Localized soundfiles for Dutch
Group:          Amusements/Teaching/Other
Requires:       childsplay >= 0.71
Provides:       childsplay-languagepack = %version-%release
Provides:       alphabet_sounds = %version-%release
Provides:       locale(childsplay:nl)

%description nl
This package contains localized soundfiles for Dutch.

%files nl
%defattr (-,root,root,-)
%{installdir}/nl*
%{flashcarddir}/nl*
#----------------------------------------------------------------------
%package pt
Summary:        Localized soundfiles for Portuguese
Version:        %version
Group:          Amusements/Teaching/Other
Requires:       childsplay >= 0.71
Provides:       childsplay-languagepack = %version-%release
Provides:       alphabet_sounds = %version-%release
Provides:       locale(childsplay:pt)
Conflicts:      childsplay-languagepacks-pt_BR

%description pt
This package contains localized soundfiles for Portuguese.

%files pt
%defattr (-,root,root,-)
%{installdir}/pt*
#%{flashcarddir}/pt*
#----------------------------------------------------------------------
%package pt_BR
Summary:        Localized soundfiles for Brazilian Portuguese
Version:        %version
Group:          Amusements/Teaching/Other
Requires:       childsplay >= 0.71
Provides:       childsplay-languagepack = %version-%release
Provides:       alphabet_sounds = %version-%release
Provides:       locale(childsplay:pt_BR)
Conflicts:      childsplay-languagepacks-pt

%description pt_BR
This package contains localized soundfiles for Brazilian Portuguese.

%files pt_BR
%defattr (-,root,root,-)
%{installdir}/pt_BR*
%{flashcarddir}/pt_BR*
#----------------------------------------------------------------------
%package ro
Summary:        Localized soundfiles for Romanian
Version:        %version
Group:          Amusements/Teaching/Other
Requires:       childsplay >= 0.71
Provides:       childsplay-languagepack = %version-%release
Provides:       alphabet_sounds = %version-%release
Provides:       locale(childsplay:ro)

%description ro
This package contains localized soundfiles for Romanian.

%files ro
%defattr (-,root,root,-)
%{installdir}/ro*
#{flashcarddir}/ro*
#----------------------------------------------------------------------
%package ru
Summary:        Localized soundfiles for Russian
Group:          Amusements/Teaching/Other
Requires:       childsplay >= 0.71
Provides:       childsplay-languagepack = %version-%release
Provides:       alphabet_sounds = %version-%release
Provides:       locale(childsplay:ru)

%description ru
This package contains localized soundfiles for Russian.

%files ru
%defattr (-,root,root,-)
%{installdir}/ru*
%{flashcarddir}/ru*
#----------------------------------------------------------------------
%package sl
Summary:        Localized soundfiles for Slovenian
Version:        %version
Group:          Amusements/Teaching/Other
Requires:       childsplay >= 0.71
Provides:       childsplay-languagepack = %version-%release
Provides:       alphabet_sounds = %version-%release
Provides:       locale(childsplay:sl)

%description sl
This package contains localized soundfiles for Slovenian.

%files sl
%defattr (-,root,root,-)
%{installdir}/sl*
%{flashcarddir}/sl*
#----------------------------------------------------------------------
%package sv
Summary:        Localized soundfiles for Swedish
Version:        %version
Group:          Amusements/Teaching/Other
Requires:       childsplay >= 0.71
Provides:       childsplay-languagepack = %version-%release
Provides:       alphabet_sounds = %version-%release
Provides:       locale(childsplay:sv)

%description sv
This package contains localized soundfiles for Swedish.

%files sv
%defattr (-,root,root,-)
%{installdir}/sv*
#%{flashcarddir}/sv*
#----------------------------------------------------------------------


%prep
%setup -q -T -c %{name}-%{version} -a0 -a1 -a2 -a3 -a4 -a5 -a6 -a7 -a8 -a9 -a10 -a11 -a12 -a13 -a14 -a15
# fix lt installation
pushd alphabet_sounds_lt-0.9.1/AlphabetSounds
mkdir lt
mv *.ogg lt/
popd

%build

%install
install -dm 755 %buildroot%{installdir}
install -dm 755 %buildroot%{flashcarddir}
for i in $(ls -d *); do
	pushd $i 
	if [ -d "AlphabetSounds" ]; then
		pushd "AlphabetSounds" 1>/dev/null
		echo -n "installing AlphabetSound for: "
		ls 
		cp -r * %buildroot%{installdir}/
		popd 1>/dev/null
	fi
	if [ -d "FlashCardsSounds" ]; then
		pushd "FlashCardsSounds" 1>/dev/null
		echo -n "installing FlashCardsSounds for: "
		ls
		cp -r * %buildroot%{flashcarddir}/
		popd 1>/dev/null
	fi
	for file in copyright GPL* ; do
		test -f $file && cp -f $file ../
	done
	popd
done
%if 0%{?suse_version} > 1020
%fdupes -s %buildroot
%endif
cat > README.SuSE << EOF
This package requires all localized packages containing soundfiles for
childsplay.
EOF

%clean
rm -rf %buildroot

%files
%defattr(-, root, root, -)
%doc copyright GPL*
%dir %{_datadir}/childsplay_sp
%dir %{_datadir}/childsplay_sp/CPData
%dir %{_datadir}/childsplay_sp/CPData/FlashcardsData
%dir %{flashcarddir}
%dir %{installdir}

%changelog
openSUSE Build Service is sponsored by