Commit cefc8f6149295d9c0d328db3452130890d87caf6

Authored by Silvan Calarco
1 parent ffe669f786
Exists in master

livedvd: staging changes for multilanguage support

Showing 5 changed files with 34 additions and 17 deletions Side-by-side Diff

... ... @@ -35,17 +35,17 @@
35 35 kdelibs3:
36 36 @[ `echo " $$INSTALLED " | grep -c " $@ "` -eq 0 ] && \
37 37 { echo -n "$@ "; \
38   - [ "$(MULTILANGUAGE)" != "" ] && for l in it es; do echo -n "kde-i18n-$$l "; done; \
  38 + [ "$(MULTILANGUAGE)" ] && for l in $(MULTILANGUAGE); do echo -n "kde-i18n-$$l "; done; \
39 39 [ ! "$(LANGUAGE)" = "" ] && [ ! "$(LANGUAGE)" = "en" ] && echo -n "kde-i18n-$(LANGUAGE) "; } || :
40 40 kdelibs:
41 41 @[ `echo " $$INSTALLED " | grep -c " $@ "` -eq 0 ] && \
42 42 { echo -n "$@ "; \
43   - [ "$(MULTILANGUAGE)" != "" ] && for l in it es; do echo -n "kde-l10n-$$l "; done; \
  43 + [ "$(MULTILANGUAGE)" != "" ] && for l in $(MULTILANGUAGE); do echo -n "kde-l10n-$$l "; done; \
44 44 [ ! "$(LANGUAGE)" = "" ] && [ ! "$(LANGUAGE)" = "en" ] && echo -n "kde-l10n-$(LANGUAGE) "; } || :
45 45 koffice:
46 46 @[ `echo " $$INSTALLED " | grep -c " $@ "` -eq 0 ] && \
47 47 { echo -n "$@ "; \
48   -# [ "$(MULTILANGUAGE)" != "" ] && for l in it es; do echo -n "koffice-i18n-$$l "; done; \
  48 +# [ "$(MULTILANGUAGE)" != "" ] && for l in $(MULTILANGUAGE); do echo -n "koffice-i18n-$$l "; done; \
49 49 [ ! "$(LANGUAGE)" = "" ] && [ ! "$(LANGUAGE)" = "en" ] && echo -n "koffice-i18n-$(LANGUAGE) "; } || :
50 50 #k3b:
51 51 # @[ `echo " $$INSTALLED " | grep -c " $@ "` -eq 0 ] && \
52 52  
... ... @@ -55,10 +55,11 @@
55 55 aspell:
56 56 @[ `echo " $$INSTALLED " | grep -c " $@ "` -eq 0 ] && \
57 57 { echo -n "$@ "; \
58   - [ "$(MULTILANGUAGE)" != "" ] && for l in it en es; do echo -n "aspell-$$l "; done; \
  58 + [ "$(MULTILANGUAGE)" ] && for l in $(MULTILANGUAGE); do echo -n "aspell-$$l "; done; \
59 59 [ ! "$(LANGUAGE)" = "" ] && echo -n "aspell-$(LANGUAGE) "; } || :
60 60 libreoffice:
61 61 @[ `echo " $$INSTALLED " | grep -c " $@ "` -eq 0 ] && \
62 62 { echo -n "$@ "; \
  63 + [ "$(MULTILANGUAGE)" != "" ] && for l in $(MULTILANGUAGE); do echo -n "libreoffice-i18n-$$l "; done; \
63 64 [ ! "$(LANGUAGE)" = "" ] && echo -n "libreoffice-i18n-$(LANGUAGE) "; } || :
... ... @@ -88,7 +88,13 @@
88 88 #install_rpms_by_target "Installing tools packages for ${MAKEDIST_TARGET} target" ${MAKEDIST_TARGET}-tools ""
89 89 install_rpms_by_target "Installing ${PLATFORM} platform packages" ${MAKEDIST_TARGET}-${PLATFORM} "${RPMEXTRAARGS}"
90 90  
91   -[ "$LANGUAGE" ] && install_rpms_by_target "Installing ${PLATFORM} platform localization packages for language $LANGUAGE" ${MAKEDIST_TARGET}-${PLATFORM}-${LANGUAGE} "${RPMEXTRAARGS}"
  91 +if [ "$MULTILANGUAGE" ]; then
  92 + for l in $MULTILANGUAGE; do
  93 + install_rpms_by_target "Installing ${PLATFORM} platform localization packages for language $l" ${MAKEDIST_TARGET}-${PLATFORM}-${l} "${RPMEXTRAARGS}"
  94 + done
  95 +else
  96 + [ "$LANGUAGE" ] && install_rpms_by_target "Installing ${PLATFORM} platform localization packages for language $LANGUAGE" ${MAKEDIST_TARGET}-${PLATFORM}-${LANGUAGE} "${RPMEXTRAARGS}"
  97 +fi
92 98 [ "$ARCH" ] && install_rpms_by_target "Installing ${PLATFORM} platform packages for arch $ARCH" ${MAKEDIST_TARGET}-${PLATFORM}-${ARCH} "${RPMEXTRAARGS}"
93 99  
94 100 if [ "$APPLICATION_TARGET" ]; then
95 101  
... ... @@ -110,12 +116,14 @@
110 116  
111 117 # delete unused localizations
112 118 #
113   -echo "Deleting other languages l10n files..."
114   -for d in /usr/share/locale /opt/kde/share/locale \
  119 +if [ ! "$MULTILANGUAGE" ]; then
  120 + echo "Deleting other languages l10n files..."
  121 + for d in /usr/share/locale /opt/kde/share/locale \
115 122 /opt/kde/share/locale/l10n /opt/kde3/share/locale; do
116   - find ${MOUNTDIR}${d} -maxdepth 1 -mindepth 1 -type d \
117   - ! -name ${LANGUAGE}* ! -name en* ! -name C ! -name l10n -exec rm -rf {} \; 2>/dev/null
118   -done
  123 + find ${MOUNTDIR}${d} -maxdepth 1 -mindepth 1 -type d \
  124 + ! -name ${LANGUAGE}* ! -name en* ! -name C ! -name l10n -exec rm -rf {} \; 2>/dev/null
  125 + done
  126 +fi
119 127  
120 128 if [ "$U_BOOT" ]; then
121 129 echo "Copying u-boot Image for Kernel"
... ... @@ -150,8 +158,15 @@
150 158 cp -a --no-preserve=ownership $TARGETDIR/platforms/$PLATFORM/root/* $MOUNTDIR/
151 159  
152 160 # copy localized static files for specific platform
153   -[ "$LANGUAGE" -a -e $TARGETDIR/platforms/$PLATFORM/root-$LANGUAGE ] &&
154   - cp -a --no-preserve=ownership $TARGETDIR/platforms/$PLATFORM/root-$LANGUAGE/* $MOUNTDIR/
  161 +if [ "$MULTILANGUAGE" ]; then
  162 + for l in $MULTILANGUAGE; do
  163 + [ -e $TARGETDIR/platforms/$PLATFORM/root-$l ] &&
  164 + cp -a --no-preserve=ownership $TARGETDIR/platforms/$PLATFORM/root-$l/* $MOUNTDIR/
  165 + done
  166 +else
  167 + [ "$LANGUAGE" -a -e $TARGETDIR/platforms/$PLATFORM/root-$LANGUAGE ] &&
  168 + cp -a --no-preserve=ownership $TARGETDIR/platforms/$PLATFORM/root-$LANGUAGE/* $MOUNTDIR/
  169 +fi
155 170  
156 171 # enable additional smart repositories
157 172 if [ "$SMART_CHANNELS_ENABLE" != "" ]; then
platforms/livedvd-root/Makefile
1   -$(MAKEDIST_TARGET)-livedvd-kde4: kppp krfb ark kcalc kdf kgpg desktop-base-kde4 \
2   - ksnapshot okular kontact kmail akregator desktop-base-kde4 kmix \
  1 +$(MAKEDIST_TARGET)-livedvd-kde4: desktop-base-kde4 kppp krfb ark kcalc kdf kgpg \
  2 + ksnapshot okular kontact kmail akregator kmix \
3 3 kopete bluedevil smb4k amarok kwallet dragon kate
4 4 $(MAKEDIST_TARGET)-livedvd-libreoffice: libreoffice-calc libreoffice-writer libreoffice-impress
5 5  
6 6  
... ... @@ -20,10 +20,10 @@
20 20 kde-l10n-en_GB
21 21 $(MAKEDIST_TARGET)-livedvd-root-es: \
22 22 kde-l10n-es
23   -# firefox-i18n-es-ES
  23 +$(MAKEDIST_TARGET)-livedvd-root-fr: \
  24 + kde-l10n-fr
24 25 $(MAKEDIST_TARGET)-livedvd-root-it: \
25 26 kde-l10n-it
26   -# firefox-i18n-it
27 27 # FIXME: add kdepim
28 28 syslog-ng:
29 29 @echo
platforms/livedvd-root/settings.inc
... ... @@ -12,6 +12,7 @@
12 12 KERNEL_PLATFORM=""
13 13 #KERNEL_ADDITIONAL="vboxvideo"
14 14 KERNEL_MORE_EXTRAVER=
  15 + MULTILANGUAGE="it en es fr"
15 16 fi
16 17  
17 18 TARGET_HOSTNAME=openmamba-livedvd
platforms/livedvd/Makefile
... ... @@ -2,5 +2,6 @@
2 2 # Localized targets
3 3 $(MAKEDIST_TARGET)-livedvd-en:
4 4 $(MAKEDIST_TARGET)-livedvd-it:
  5 +$(MAKEDIST_TARGET)-livedvd-fr:
5 6 $(MAKEDIST_TARGET)-livedvd-es: