Magellan Linux

Contents of /branches/magellan-next/extras/kde4-l10n/kde4-l10n-4.5.1-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 7259 - (show annotations) (download)
Tue Oct 12 14:19:58 2010 UTC (14 years ago) by niro
File size: 2895 byte(s)
-fixed KDE_LANG
1 # $Id: kde4-l10n-4.4.2-r1.smage2 5335 2010-04-22 12:56:33Z niro $
2
3 PVER="4.5.1"
4 PNAME="kde4-l10n"
5 PBUILD="r1"
6
7 PCATEGORIE="kde-base"
8 STATE="unstable"
9
10 SDEPEND="== kde-base/kdebase4-runtime-${PVER}"
11
12 # do not include kde4-split here, we split on our own
13 sminclude kde4
14
15 # get missing languages via:
16 #get_missing_lang()
17 #{
18 # local UPSTREAM_LANG="$(lynx -dump -listonly http://ftp.gwdg.de/pub/x11/kde/stable/4.5.1/src/kde-l10n/ | grep .tar.bz2 | sed 's:.*/kde-l10n-\(.*\)-[0-9].*.tar.bz2:\1:')"
19 # local MISSING=""
20 # local found
21 # local i
22 # local x
23 #
24 # for i in ${UPSTREAM_LANG}
25 # do
26 # found=0
27 # for x in ${KDE_LANG}
28 # do
29 # if [[ ${i} = ${x} ]]
30 # then
31 # found=1
32 # # and break here, no need to search all others
33 # break
34 # fi
35 # done
36 # # if still found=0 here, lang was not found
37 # [[ ${found} = 0 ]] && MISSING+=" ${i}"
38 # done
39 #
40 # echo "missing: ${MISSING}"
41 #}
42
43 # lynx -dump -listonly http://ftp.gwdg.de/pub/x11/kde/stable/${PVER}/src/kde-l10n/ | grep .tar.bz2 | sed 's:.*/kde-l10n-\(.*\)-[0-9].*.tar.bz2:\1:'
44 KDE_LANG="ar
45 bg
46 ca
47 ca@valencia
48 cs
49 da
50 de
51 el
52 en_GB
53 eo
54 es
55 et
56 eu
57 fi
58 fr
59 fy
60 ga
61 gl
62 gu
63 he
64 hi
65 hr
66 hu
67 ia
68 id
69 is
70 it
71 ja
72 kk
73 km
74 kn
75 ko
76 lt
77 lv
78 ml
79 nb
80 nds
81 nl
82 nn
83 pa
84 pl
85 pt
86 pt_BR
87 ro
88 ru
89 sk
90 sl
91 sr
92 sv
93 th
94 tr
95 uk
96 wa
97 zh_CN
98 zh_TW"
99
100 # broken atm
101 KDE_LANG="${KDE_LANG/sv/}"
102
103 # being a little hackish here:
104 for lang in ${KDE_LANG}
105 do
106 SPLIT_PACKAGES+=" ${PNAME}-${lang}"
107 done
108
109 # unset SRC_URI from kde4 include here
110 unset SRC_URI
111 for lang in ${KDE_LANG}
112 do
113 SRC_URI=( ${SRC_URI[*]}
114 kde://${PVER}/src/kde-l10n/${PNAME/4/}-${lang}-${PVER}.tar.bz2
115 mirror://${PNAME}/${PNAME/4/}-${lang}-${PVER}.tar.bz2
116 )
117 done
118
119 UP2DATE="updatecmd ftp://ftp.kde.org/pub/kde/stable/latest/src/kde-l10n/ | grep ${PNAME/4/} | lasttarball"
120
121 # being a little hackish here:
122 for subpackage in ${SPLIT_PACKAGES}
123 do
124 eval "split_info_${subpackage}() { DESCRIPTION=\"'${subpackage/${PNAME}-/}' language files for KDE4.\"; DEPEND=\"== kde-base/kdebase4-runtime-${PVER}\"; }"
125 done
126
127 src_prepare()
128 {
129 local lang
130 for lang in ${KDE_LANG}
131 do
132 munpack ${PNAME/4/}-${lang}-${PVER}.tar.bz2 || die "munpack ${lang}"
133 done
134 }
135
136 src_compile()
137 {
138 local lang
139 for lang in ${KDE_LANG}
140 do
141 # set the right SRCDIR for kde4_configure/cmake_configure
142 SRCDIR="${BUILDDIR}/${PNAME/4/}-${lang}-${PVER}"
143
144 cd ${SRCDIR}
145 kde4_configure || die "configure ${lang}"
146 mmake || die "make ${lang}"
147
148 # don't overwrite the build dir
149 mv ${BUILDDIR}/build ${BUILDDIR}/build-${PNAME}-${lang} || die "move build ${lang}"
150 done
151 }
152
153 # being a little hackish here:
154 for subpackage in ${SPLIT_PACKAGES}
155 do
156
157 # move build-subpackage to build, install it, and move it back
158 eval "src_install_${subpackage}(){
159 mv ${BUILDDIR}/build-${subpackage} ${BUILDDIR}/build;
160 cd ${BUILDDIR}/build;
161 mmake DESTDIR=\${BINDIR} install || die; cd ${BUILDDIR};
162 mv ${BUILDDIR}/build ${BUILDDIR}/build-${subpackage}; }"
163 done