File kde3-i18n.spec.in of Package kde3-i18n

#
# spec file for package kde3-i18n (Version 3.5.10)
#
# Copyright (c) 2005 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#

# icecream 0
# norootforbuild

BuildRequires: kdelibs3-devel recode update-desktop-files xdelta
%if %suse_version > 1020
BuildRequires: fdupes
%endif


Name:         kde3-i18n
URL:          http://i18n.kde.org/
License:      LGPL
Group:        System/GUI/KDE
Summary:      English (UK) translations for KDE
Version:      3.5.10
Release:      1
BuildRoot:    %{_tmppath}/%{name}-%{version}-build
BuildArch:    noarch
#@SOURCES@
Source2000:     update-translations.sh
Source2001:     update-docs.sh
Source2002:     update_spec.pl
Source2003:     attributes
%define build_languages @LANGUAGES@

%description
description

#@PACKAGES@

%prep
%setup -q -n kde-i18n-af-%version
cd ..
#@EXTRACT@
%if %suse_version < 1020
# keyword "msgctxt" unknown, parse error
rm kde-i18n-ko-%version/messages/kdebase/kcmicons.po
rm kde-i18n-ko-%version/messages/kdebase/drkonqi.po
rm kde-i18n-ko-%version/messages/kdebase/filetypes.po
rm kde-i18n-ko-%version/messages/kdebase/kcmcgi.po
rm kde-i18n-ko-%version/messages/kdebase/kcmbackground.po
rm kde-i18n-ko-%version/messages/kdebase/kcmcomponentchooser.po
rm kde-i18n-ko-%version/messages/kdebase/kcmfonts.po
rm kde-i18n-ko-%version/messages/kdenetwork/krfb.po
rm kde-i18n-ko-%version/messages/kdenetwork/knewsticker.po
%endif

cd kde-i18n-af-%version
. /etc/opt/kde3/common_options
for i in %build_languages; do
   cd ../kde-i18n-$i-%version || exit 1
   rm -rf */docs/kdereview
   rm -rf */docs/play*
   sed -i -e "s,docs/common,common," docs/common/Makefile.am || true
%if %suse_version < 1030
   update_admin
%endif
   unsermake -c 
done

%build
. /etc/opt/kde3/common_options
for i in %build_languages; do
   cd ../kde-i18n-$i-%version || exit 1
   ./configure $configkde
   unsermake 
done

%install
. /etc/opt/kde3/common_options
mkdir -p $RPM_BUILD_ROOT/opt/kde3/share/doc/HTML/en
for i in %build_languages; do
   cd ../kde-i18n-$i-%version || exit 1
   unsermake DESTDIR="$RPM_BUILD_ROOT" install
done
rm -rf "${RPM_BUILD_ROOT}"/opt/kde3/share/doc/HTML/en/khelpcenter/visualdict/
rm -rf $RPM_BUILD_ROOT/opt/kde3/share/doc/HTML/en/kicker
rm -rf $RPM_BUILD_ROOT/opt/kde3/share/doc/kinfocenter

#
# convert man-pages from xml to utf-8:
#
for i in $RPM_BUILD_ROOT/usr/share/man/*/*/*.[0-9].gz
do
    if [ -f $i ] ; then
          gunzip $i;
    fi
done
for i in $RPM_BUILD_ROOT/usr/share/man/*/*/*.[0-9]
do
    if iconv -s -c -f ascii -t ascii >/dev/null ; then
        # it is ascii, conversion from xml to utf-8 is safe
        recode xml..utf-8 $i
    else
        if iconv -s -c -f utf-8 -t utf-8 >/dev/null ; then
            # it is already utf-8, do nothing
            :
        else
            # it is iso-8859-1, conversion from xml to utf-8 is safe
            recode xml..utf-8 $i
        fi
    fi
done

#
# remove unwanted files
#
rm -f  ${RPM_BUILD_ROOT}/opt/kde3/share/locale/*/charset
#
for i in %build_languages; do
   turtlelang=$i
   filename=$i
   case $i in
	de)
	   turtlelang=de_DE
	   ;;
        fr)
	   turtlelang=fr_FR
	   ;;
	sr@Latn)
	   filename=srLatn
	   ;;
	uz@cyrillic)
	   filename=uzcyrillic
	   ;;
   esac
   {
   echo "%defattr(-,root,root)"
   if test "$i" = "sr@Latn" ; then
       echo "%dir %lang(sr@Latn) /opt/kde3/share/locale/sr@Latn"
       echo "%dir %lang(sr@Latn) /opt/kde3/share/locale/sr@Latn/LC_MESSAGES"
   fi
   for mo in kteatime kweather kworldclock konquest ksnake ksokoban kspaceduel kmid kodo kolf kiconedit khtmlkttsd kedit keduca kenolaba kfax kfaxview kfifteenapplet katomic kcron ktron ktuberling libkdeedu libkdepim ark_plugin kmines kjots kjumpingcube kolourpicker kmoon kmousetool kdevdesigner kdevtipofday kcoloredit kdepimwizards kdessh kverbos kviewbrowserplugin kviewcanvas kvieweffectsplugin kview kviewpresenterplugin kview_scale kviewscannerplugin kviewshell kviewviewer ktux kuick_plugin kuickshow kfouleggs kmag kmahjongg kmathapplet korn krec kwin4 lskat superkaramba kanagram kaboodle kasteroids kbattleship kblackbox kbounce kbstateapplet blinken amor atlantikdesigner atlantik kiten kcalc kmix kfloppy kdict kbruch ksame ksayit kscd kshisen ksig klatin klettres klickety klines kreversi krfb kruler kcm_krfb khangman kpf kpoker kghostview ksim libkdegames kaudiocreator kturtle kpackage kpat kpdf kpercentage karm kontact kcmkontactnt krdb krdc kompare ksysv kcmlilo ark kregexpeditor kget kdat noatun kooka kmouth juk ktouch kwordquiz ksirc ksirtet ksmiletris akregator_konqplugin akregator khexedit2part khexedit kuser kbackgammon kolourpaint kdvi kgoldrunner knewsticker knotes kmplot kppplogview kppp kpovmodeler knode kaddressbook kvoctrain kttsd kgpg kalarm kalzium kig kpilot korganizer kgeography kopete kmailcvt kmail kmail_text_calendar_plugin kmail_text_vcard_plugin kstars kdevelop konnector_local libkitchensync konnector_dummy konnector_kabc konnector_kcal multisynk konnector_remote konnector_qtopia konnetor_local vimpart taskbarextension kttsmgr kttsjobmgr kttsd_commandplugin.mo kttsd_eposplugin.mo kttsd_festivalintplugin.mo kttsd_fliteplugin.mo kttsd_freettsplugin.mo kttsd_hadifixplugin.mo kttsd_sbdplugin.mo kttsd_stringreplacerplugin.mo kttsd_talkerchooserplugin.mo kttsd_xmltransformerplugin.mo kabc_format_binary jefferson katedefaultproject katekttsd katepartkttsd kateprojectmanager katespell kcmkmix kcmkttsd  kcmkxmlrpcd kcmmediacontrol kcmvim kio_newimap4 klegacyimport kmathtool kmessedwords konq_smbmounterplugin kpartapp kres_opengroupware ktalkd ktaskbarapplet ktexteditor_kttsd kttsd_commandplugin kttsd_eposplugin kttsd_festivalintplugin kttsd_fliteplugin kttsd_freettsplugin kttsd_hadifixplugin kttsd_sbdplugin kttsd_stringreplacerplugin kttsd_talkerchooserplugin kttsd_xmltransformerplugin kviewtemplateplugin kxmlrpcd libcalendarresources libkcalsystem libkdehighscores libkdenetwork cervisia umbrello kbugbuster kcachegrind kbabel kfilereplace kimagemapeditor klinkstatus  kxsldbg; do
   if test -f $RPM_BUILD_ROOT/opt/kde3/share/locale/$i/LC_MESSAGES/$mo.mo; then
	echo "%lang($i) /opt/kde3/share/locale/$i/LC_MESSAGES/$mo.mo"
   fi
   done
   if test -d $RPM_BUILD_ROOT/usr/share/man/$i; then
       echo "%dir %lang($i) /usr/share/man/$i"
       echo "%dir %lang($i) /usr/share/man/$i/*"
   fi
   for man in {man1/ark.1,man1/indiserver.1,man1/kalzium.1,man1/kbruch.1,man1/keduca.1,man1/keducabuilder.1,man1/kig.1,man1/lx200_16.1,man1/lx200autostar.1,man1/lx200classic.1,man1/lx200generic.1,man6/amor.6,man6/atlantik.6,man6/kenolaba.6,man6/khangman.6,man6/kpat.6,man1/kmag.1,man1/kmousetool.1,man1/kmouth.1,man1/kmplot.1,man1/ktouch.1,man1/kworldclock.1,man1/karm.1,man1/catalogmanager.1,man1/adddebug.1,man1/cheatmake.1,man1/create_cvsignore.1,man1/create_makefile.1,man1/create_makefiles.1,man1/cvscheck.1,man1/cvslastchange.1,man1/cvslastlog.1,man1/cvsrevertlast.1,man1/cxxmetric.1,man1/kapptemplate.1,man1/pruneemptydirs.1,man1/swappo.1,man1/transxx.1}; do
   if test -f $RPM_BUILD_ROOT/usr/share/man/$i/$man; then
	echo "%lang($i) /usr/share/man/$i/$man.gz"
   fi
   done
   } > ../files.$filename
   {
   echo "%defattr(-,root,root)"
   if test -d $RPM_BUILD_ROOT/usr/share/man/$i; then
       echo "%dir %lang($i) /usr/share/man/$i"
       echo "%dir %lang($i) /usr/share/man/$i/*"
   fi
   if test "$i" = "sr@Latn" ; then
       echo "%dir %lang(sr@Latn) /opt/kde3/share/locale/sr@Latn"
       echo "%dir %lang(sr@Latn) /opt/kde3/share/locale/sr@Latn/LC_MESSAGES"
   fi
   for file in entry.desktop flag.png da.compendium COPYING nbsp_gui_fr.txt relecture_docs relecture_gui 30x16.png 60x40.png flag_new_30x16.png README ChangeLog;do
   if test -f $RPM_BUILD_ROOT/opt/kde3/share/locale/$i/$file; then
       echo "%lang($i) /opt/kde3/share/locale/$i/$file"
   fi
   done 
   for mo in alsaplayerui appletproxy artsbuilder artscontrol artsmodules audiocd_encoder_lame audiocd_encoder_vorbis audiorename_plugin autorefresh babelfish charlatanui clockapplet crashesplugin cupsdconf cvsservice dcoprss dirfilterplugin display dockbarextension domtreeviewer drkonqi dub extensionproxy ffrs filetypes fsview htmlsearch imagerename_plugin imgalleryplugin irkick joystick kabc2mutt kabc_dir kabc_file kabcformat_binary kabc_ldapkio kabc_net kabc_slox kabc_sql kaccess kandy kappfinder kasbarextension katecppsymbolviewer katefiletemplates katefll_initplugin katefll_plugin katehelloworld katehtmltools kateinsertcommand katekjswrapper katemake kate katemodeline kateopenheader katepart katepybrowse katesnippets katetabbarextension katetextfilter katexmlcheck katexmltools kay kbinaryclock kcharselectapplet kcharselect kcmaccessibility kcmaccess kcmarts kcmaudiocd kcmbackground kcmbell kcmcddb kcmcgi kcmcolors kcmcomponentchooser kcmcrypto kcmcss kcmenergy kcmfonts kcmhtmlsearch kcmicons kcminfo kcminput kcmioslaveinfo kcmkabconfig kcmkamera kcmkclock kcmkded kcmkdnssd kcmkeys kcmkicker kcmkio kcmkonqhtml kcmkonq kcmkonsole kcmktalkd kcmkuick kcmkurifilt kcmkvaio kcm_kviewcanvasconfig kcm_kviewgeneralconfig kcm_kviewpluginsconfig kcm_kviewviewerpluginsconfig kcmkwallet kcmkwindecoration kcmkwinrules kcmkwm kcmlanbrowser kcmlaptop kcmlaunch kcmlayout kcmlirc kcmlocale kcmmedia kcmnic kcmnotify kcmperformance kcmprintmgr kcmsamba kcmscreensaver kcmshell kcmsmartcard kcmsmserver kcmspellchecking kcmstyle kcmtaskbar kcmthinkpad kcmusb kcmview1394 kcmwifi kcmxinerama kcontrol kdcop kdebugdialog kdelibs_colors kdelibs kdelirc kdepasswd kdepimresources kdeprintfax kdeprint kdeprint_part kdesktop kdesud kdesu kdf kdgantt kdialog kdictapplet kdjview kdmconfig kdmgreet kfileaudiopreview kfile_au kfile_avi kfile_bmp kfile_cert kfile_cpp kfile_dds kfile_deb kfile_desktop kfile_diff kfile_drgeo kfile_dvi kfile_exr kfile_flac kfile_folder kfile_gif kfile_html kfile_ico kfile_ics kfile_jpeg kfile_kig kfile_lnk kfile_m3u kfile_mhtml kfile_mp3 kfile_mpc kfile_mpeg kfile_ogg kfile_palm kfile_pcx kfile_pdf kfile_png kfile_pnm kfile_po kfile_ps kfile_rfc822 kfile_rgb kfile_rpm kfileshare kfile_sid kfile_tga kfile_theora kfile_tiff kfile_torrent kfile_ts kfile_txt kfile_vcf kfile_wav kfile_xbm kfile_xpm kfindpart kfmclient kfontinst kgamma kgantt kgreet_classic kgreet_winbind khelpcenter khotkeys khtmlsettingsplugin kickermenu_kate kicker kinetd kio_audiocd kioexec kio_finger kio_fish kio_floppy kio_groupwise kio_help kio_home kio_imap4 kio_jabberdisco kio_lan kio_ldap kio_mac kio_man kio_media kio kio_mobile kio_nfs kio_nntp kio_pop3 kio_print kio_remote kio_scalix kio_settings kio_sftp kio_sieve kio_smb kio_smtp kio_svn kio_system kio_tar kio_thumbnail kio_trash kio_zeroconf kitchensync kjobviewer klaptopdaemon kleopatra klipper klock kmcop kmenuapplet kmenuedit kmilo_delli8k kmilod kmilo_generic kmilo_kvaio kmilo_powerbook kmilo_thinkpad kminipagerapplet kmobile kmrml knetattach knetwalk knetworkconf knotify kommander konqsidebar_delicious konqsidebar_mediaplayer konqsidebar_metabar konqsidebar_news konqueror konsolekalendar konsole kpager kpartsaver kpersonalizer kprinter krandr kreadconfig kres_birthday kres_blogging kres_bugzilla kres_exchange kres_featureplan kres_groupware kres_groupwise kres_kolab kres_remote kres_scalix kres_tvanytime kres_xmlrpc krunapplet kscreensaver ksmserver ksnapshot ksplash ksplashthemes kstart kstartperf kstyle_highcontrast_config kstyle_keramik_config kstyle_phase_config kstyle_plastik_config ksvgplugin ksync ksysguard ksystemtrayapplet ksystraycmd ktexteditor_autobookmarker ktexteditor_docwordcompletion ktexteditor_insertfile ktexteditor_isearch ktexteditor_kdatatool kthememanager ktimemon ktimer ktip ktnef kuiviewer kwalletmanager kwatchgnupg kwifimanager kwin_art_clients kwin_clients kwin_lib kwin kwireless kwriteconfig kxkb kxsconfig libdmctl libkaddrbk_geo_xxport libkaddrbk_gmx_xxport libkcal libkcddb libkfaximgage libkholidays libkickermenu_kdeprint libkickermenu_konsole libkickermenu_prefmenu libkickermenu_recentdocs libkickermenu_remotemenu libkickermenu_systemmenu libkickermenu_tom libkicker libkleopatra libkmime libkonq libkpgp libkpimexchange libkscan libkscreensaver libksieve libksirtet libksync libKTTSD libtaskbar libtaskmanager lockout lyrics mediaapplet mediacontrol mf_konqplugin minitoolsplugin naughtyapplet nexscope nsplugin pitchablespeed ppdtranslations privacy quanta quicklauncher rellinks scalixadmin searchbarplugin secpolicy spy susetranslations synaescope timezones tippecanoe trashapplet tyler uachangerplugin useraccount validatorsplugin wakeup wavecapture webarchiver; do
   if test -f $RPM_BUILD_ROOT/opt/kde3/share/locale/$i/LC_MESSAGES/$mo.mo; then
	echo "%lang($i) /opt/kde3/share/locale/$i/LC_MESSAGES/$mo.mo"
   fi
   done
   for man in {man1/appletproxy.1,man1/artsmessage.1,man1/celestrongps.1,man1/checkXML.1,man1/dcop.1,man1/demangle.1,man1/extend_dmalloc.1,man1/extractrc.1,man1/fixincludes.1,man1/fliccd.1,man1/kappfinder.1,man1/kate.1,man1/kbookmarkmerger.1,man1/kdesu.1,man1/kfind.1,man1/kicker.1,man1/po2xml.1,man1/qtdoc.1,man1/quanta.1,man1/reportview.1,man1/split2po.1,man1/spotlight2kvtml.1,man1/temma.1,man1/v4ldriver.1,man1/v4lphilips.1,man1/xml2pot.1,man1/zonetab2pot.1,man7/kdeoptions.7,man7/qtoptions.7,man8/kbuildsycoca.8}; do
   if test -f $RPM_BUILD_ROOT/usr/share/man/$i/$man; then
	echo "%lang($i) /usr/share/man/$i/$man.gz"
   fi
   done
   } > ../files.base.$filename
   {
   echo "%defattr(-,root,root)"
   if test -d $RPM_BUILD_ROOT/opt/kde3/share/apps/khangman/data/$i; then
	echo "%lang($i) /opt/kde3/share/apps/khangman/data/$i"
	echo "%dir /opt/kde3/share/apps/khangman"
	echo "%dir /opt/kde3/share/apps/khangman/data"
   fi
   if test -d $RPM_BUILD_ROOT/opt/kde3/share/apps/kanagram/data/$i; then
	echo "%lang($i) /opt/kde3/share/apps/kanagram/data/$i"
	echo "%dir /opt/kde3/share/apps/kanagram"
	echo "%dir /opt/kde3/share/apps/kanagram/data"
   fi
   if test -f $RPM_BUILD_ROOT/opt/kde3/share/apps/khangman/$i.txt; then
	echo "%lang($i) /opt/kde3/share/apps/khangman/$i.txt"
   fi
   if test -f $RPM_BUILD_ROOT/opt/kde3/share/apps/katepart/syntax/logohighlightstyle.$turtlelang.xml; then
	echo "%lang($i) /opt/kde3/share/apps/katepart/syntax/logohighlightstyle.$turtlelang.xml"
        echo "%dir /opt/kde3/share/apps/katepart/syntax"
	echo "%dir /opt/kde3/share/apps/katepart"
   fi
   kturtle=0
   if test -f $RPM_BUILD_ROOT/opt/kde3/share/apps/kturtle/data/logokeywords.$turtlelang.xml; then
	echo "%lang($i) /opt/kde3/share/apps/kturtle/data/logokeywords.$turtlelang.xml"
	echo "%dir /opt/kde3/share/apps/kturtle/data"
	echo "%dir /opt/kde3/share/apps/kturtle"
	kturtle=1
   fi
   if test -d $RPM_BUILD_ROOT/opt/kde3/share/apps/kturtle/examples/$turtlelang; then
	echo "%lang($i) /opt/kde3/share/apps/kturtle/examples/$turtlelang"
	echo "%dir /opt/kde3/share/apps/kturtle/examples"
	if test "$kturtle" = 0; then
	   echo "%dir /opt/kde3/share/apps/kturtle"
        fi
   fi
   if test -d $RPM_BUILD_ROOT/opt/kde3/share/apps/klettres/$i; then
	echo "%lang($i) /opt/kde3/share/apps/klettres/$i"
	echo "%dir /opt/kde3/share/apps/klettres"
   fi
   if test -d $RPM_BUILD_ROOT/opt/kde3/share/apps/ktuberling/sounds/$i; then
	echo "%lang($i) /opt/kde3/share/apps/ktuberling/sounds/$i"
	echo "%dir /opt/kde3/share/apps/ktuberling"
	echo "%dir /opt/kde3/share/apps/ktuberling/sounds"
   fi
   if test -d $RPM_BUILD_ROOT/opt/kde3/share/apps/klatin/data/vocabs/$i; then
	echo "%lang($i) /opt/kde3/share/apps/klatin/data/vocabs/$i"
	echo "%dir /opt/kde3/share/apps/klatin/data/vocabs"
	echo "%dir /opt/kde3/share/apps/klatin/data"
	echo "%dir /opt/kde3/share/apps/klatin"
   fi
   } > ../files.data.$filename
   {
   echo "%defattr(-,root,root)"
   for doc in akregator amor ark atlantik blinken irkick juk kaboodle kaddressbook kalarm kalzium kamera kanagram kandy karm kasteroids kate-plugins katomic kbabel kbackgammon kbattleship kblackbox kbounce kbruch kcalc kcharselect kcmlirc kcoloredit kcron kdat kdf kdict kdvi keduca kenolaba kfilereplace kfloppy kfouleggs kgamma kgeography kget kghostview kgoldrunner kgpg khangman khexedit kiconedit kig kiten kjots kjumpingcube klatin kleopatra klettres klickety klines kmag kmahjongg kmail kmid kmines kmix kmoon kmousetool kmouth kmplot knetworkconf knewsticker knode knotes kodo kolf kolourpaint kompare konq-plugins konquest konsolekalendar kontact kooka kopete korganizer korn kpackage kpat kpdf kpercentage kpf kpilot kpoker kpovmodeler kppp krdc krec KRegExpEditor kreversi krfb kruler ksame kscd kshisen ksig ksim ksirc ksirtet ksmiletris ksnake ksnapshot ksokoban kspaceduel kspell ksplashml kstars ksysv ktalkd kteatime ktimer ktnef ktouch ktron kttsd ktuberling kturtle kuickshow kuser kverbos kview kvoctrain kwallet kwatchgnupg kweather kwifimanager kwin4 kwordquiz kworldclock kxkb lilo-config lisa lskat noatun superkaramba kedit kmessedwords kaudiocreator kde_app_devel kpaint kmidi kdearch kdevelop api flashkard multisynk kio_audiocd kmathtool kwuftpd kxconfig megami cervisia kbugbuster kcachegrind kdesvn-build umbrello klinkstatus kxsldbg xsldbg; do
   if test -d $RPM_BUILD_ROOT/opt/kde3/share/doc/HTML/$i/$doc; then
	echo "%lang($i) %doc /opt/kde3/share/doc/HTML/$i/$doc"
   fi
   done
   } > ../files.doc.$filename
   {
   echo "%defattr(-,root,root)"
   for doc in artsbuilder common quanta kate kcontrol kdcop kdebugdialog kdeprint kdesu kfind khelpcenter kicker kicker-applets kinfocenter kioslave kwrite kmenuedit knetattach konsole konqueror ksysguard kdm klipper kompmgr kpager kommander; do
   if test -d $RPM_BUILD_ROOT/opt/kde3/share/doc/HTML/$i/$doc; then
	echo "%lang($i) %doc /opt/kde3/share/doc/HTML/$i/$doc"
   fi
   done	
   } > ../files.doc.base.$filename
   cat ../files.$filename ../files.data.$filename ../files.doc.$filename >../files.all.$filename
   cat ../files.base.$filename ../files.doc.base.$filename >../files.all.base.$filename
done

%if %suse_version > 1020
%fdupes $RPM_BUILD_ROOT
%endif

for file in $RPM_BUILD_ROOT/opt/kde3/share/locale/*/entry.desktop; do
   %suse_update_desktop_file $file
done

#@FILES@

%changelog -n kde3-i18n