3 if test -z "${SRC_ROOT}"; then
4 echo "distro-install-clean-up: No environment set!"
9 FILELISTSDIR
="$BUILDDIR/file-lists"
11 # remove installed file even from the file list
12 # Params: file_list file_to_remove
16 perl
-pi -e "s|^$2$||" "$1"
19 # move one file from one list of files to a second one
20 # Params: target_file_list source_file_list file_to_move
21 mv_file_between_flists
()
23 if grep "^$3\$" $2 >/dev
/null
2>&1 ; then
24 # \$3 can be regular expression
26 perl
-pi -e "s|^$3$||" $2
29 # add the directories from the source list of files to the target list of
30 # file which are used in the target list of files but are missing there
31 # Params: target_file_list source_file_list
32 add_used_directories
()
34 sort -u -r $2 |
sed -n "s|^%dir \(.*\)\$|s%^\\\\(\1\\\\).*%\\\\1%p|p" >$2.pattern
35 sed -n -f $2.pattern
$1 |
sort -u |
sed "s|^|%dir |" >>$1
41 # remove a duplicity between two filelist
42 # Params: filelist_with_original filelist_with_duplicity duplicit_path
43 remove_duplicity_from_flists
()
45 if grep "$3" "$1" >/dev
/null
2>&1 && \
46 grep "$3" "$2" >/dev
/null
2>&1 ; then
47 perl
-pi -e "s|^$3$||" $2
51 # merges one file list into another one
52 # Params: source_filelist dest_filelist replace_dest
55 if test -f "$1" ; then
57 sort -u "$2" >"$2".sorted
62 if ! test -f $DESTDIR/gid_Module_Root
; then
63 echo "Error: Failed to generate package file lists";
64 echo " Have you defined DESTDIR?"
69 rm -rf "$FILELISTSDIR"
70 mkdir
-p "$FILELISTSDIR"
74 if test "z$OOO_VENDOR" != "zDebian" ; then
76 echo "Generating package file lists for $OOO_VENDOR..."
79 for module
in gid_Module_Root gid_Module_Root_Brand \
80 gid_Module_Root_Files_
[0-9] \
81 gid_Module_Root_Hack \
82 gid_Module_Oo_Linguistic \
83 gid_Module_Root_Extension_Dictionary_
* \
84 gid_Module_Root_Ure_Hidden
; do
85 merge_flists
$module $FILELISTSDIR/common_list.txt
88 # it is not a real extension; it used to be in the main package...
89 merge_flists gid_Module_Optional_Extensions_Script_Provider_For_JS
$FILELISTSDIR/common_list.txt
91 if test "$SPLIT_APP_MODULES" = "TRUE" ; then
92 merge_flists gid_Module_Prg_Base_Bin
$FILELISTSDIR/base_list.txt
93 merge_flists gid_Module_Prg_Calc_Bin
$FILELISTSDIR/calc_list.txt
94 merge_flists gid_Module_Prg_Draw_Bin
$FILELISTSDIR/draw_list.txt
95 merge_flists gid_Module_Prg_Math_Bin
$FILELISTSDIR/math_list.txt
96 merge_flists gid_Module_Prg_Impress_Bin
$FILELISTSDIR/impress_list.txt
97 merge_flists gid_Module_Prg_Wrt_Bin
$FILELISTSDIR/writer_list.txt
98 merge_flists gid_Module_Brand_Prg_Base
$FILELISTSDIR/base_list.txt
99 merge_flists gid_Module_Brand_Prg_Calc
$FILELISTSDIR/calc_list.txt
100 merge_flists gid_Module_Brand_Prg_Draw
$FILELISTSDIR/draw_list.txt
101 merge_flists gid_Module_Brand_Prg_Math
$FILELISTSDIR/math_list.txt
102 merge_flists gid_Module_Brand_Prg_Impress
$FILELISTSDIR/impress_list.txt
103 merge_flists gid_Module_Brand_Prg_Wrt
$FILELISTSDIR/writer_list.txt
104 merge_flists gid_Module_Reportbuilder
$FILELISTSDIR/base_list.txt
105 merge_flists gid_Module_Pdfimport
$FILELISTSDIR/draw_list.txt
107 # FIXME: small; low dependencies; why optional module?
108 merge_flists gid_Module_Optional_OGLTrans
$FILELISTSDIR/impress_list.txt
110 merge_flists gid_Module_Prg_Base_Bin
$FILELISTSDIR/common_list.txt
111 merge_flists gid_Module_Prg_Calc_Bin
$FILELISTSDIR/common_list.txt
112 merge_flists gid_Module_Prg_Draw_Bin
$FILELISTSDIR/common_list.txt
113 merge_flists gid_Module_Prg_Math_Bin
$FILELISTSDIR/common_list.txt
114 merge_flists gid_Module_Prg_Impress_Bin
$FILELISTSDIR/common_list.txt
115 merge_flists gid_Module_Prg_Wrt_Bin
$FILELISTSDIR/common_list.txt
116 merge_flists gid_Module_Brand_Prg_Base
$FILELISTSDIR/common_list.txt
117 merge_flists gid_Module_Brand_Prg_Calc
$FILELISTSDIR/common_list.txt
118 merge_flists gid_Module_Brand_Prg_Draw
$FILELISTSDIR/common_list.txt
119 merge_flists gid_Module_Brand_Prg_Math
$FILELISTSDIR/common_list.txt
120 merge_flists gid_Module_Brand_Prg_Impress
$FILELISTSDIR/common_list.txt
121 merge_flists gid_Module_Brand_Prg_Wrt
$FILELISTSDIR/common_list.txt
122 merge_flists gid_Module_Reportbuilder
$FILELISTSDIR/common_list.txt
123 merge_flists gid_Module_Pdfimport
$FILELISTSDIR/common_list.txt
124 # FIXME: small; low dependencies; why optional module?
125 merge_flists gid_Module_Optional_OGLTrans
$FILELISTSDIR/common_list.txt
128 if test "$SPLIT_APP_MODULES" = "TRUE" -a "$OOO_VENDOR" = "SUSE" ; then
129 # move the prebuilt icons into a hacky temporary package
130 # we want to repack them into a noarch package as soon as possible
131 # without the build dependency on the huge devel package
132 merge_flists gid_Module_Root_Files_Images
$FILELISTSDIR/icon_themes_prebuilt.txt
134 merge_flists gid_Module_Root_Files_Images
$FILELISTSDIR/common_list.txt
137 if test "$SPLIT_OPT_FEATURES" = "TRUE" ; then
138 if test "z$OOO_VENDOR" = "zMandriva" ; then
139 merge_flists gid_Module_Optional_Grfflt
$FILELISTSDIR/draw_list.txt
140 merge_flists gid_Module_Optional_Headless
$FILELISTSDIR/common_list.txt
141 merge_flists gid_Module_Optional_Pymailmerge
$FILELISTSDIR/pyuno_list.txt
142 merge_flists gid_Module_Pyuno
$FILELISTSDIR/pyuno_list.txt
143 merge_flists gid_Module_Script_Provider_For_Python
$FILELISTSDIR/pyuno_list.txt
144 merge_flists gid_Module_Optional_Pyuno_LibreLogo
$FILELISTSDIR/pyuno_list.txt
145 merge_flists gid_Module_Optional_Xsltfiltersamples
$FILELISTSDIR/common_list.txt
147 merge_flists gid_Module_Optional_Grfflt
$FILELISTSDIR/common_list.txt
148 merge_flists gid_Module_Optional_Headless
$FILELISTSDIR/common_list.txt
149 merge_flists gid_Module_Optional_Pymailmerge
$FILELISTSDIR/mailmerge_list.txt
150 merge_flists gid_Module_Pyuno
$FILELISTSDIR/pyuno_list.txt
151 merge_flists gid_Module_Optional_Pyuno_LibreLogo
$FILELISTSDIR/pyuno_list.txt
152 merge_flists gid_Module_Script_Provider_For_Python
$FILELISTSDIR/pyuno_list.txt
153 merge_flists gid_Module_Optional_Xsltfiltersamples
$FILELISTSDIR/filters_list.txt
156 merge_flists gid_Module_Optional_Grfflt
$FILELISTSDIR/common_list.txt
157 merge_flists gid_Module_Optional_Headless
$FILELISTSDIR/common_list.txt
158 merge_flists gid_Module_Optional_Pymailmerge
$FILELISTSDIR/common_list.txt
159 merge_flists gid_Module_Pyuno
$FILELISTSDIR/common_list.txt
160 merge_flists gid_Module_Optional_Pyuno_LibreLogo
$FILELISTSDIR/common_list.txt
161 merge_flists gid_Module_Script_Provider_For_Python
$FILELISTSDIR/common_list.txt
162 merge_flists gid_Module_Optional_Xsltfiltersamples
$FILELISTSDIR/common_list.txt
166 for lang
in `echo $WITH_LANG_LIST | sed -e s/-/_/g`; do
168 if test "$OOO_VENDOR" = "Mandriva" -o \
( "$OOO_VENDOR" = "SUSE" -a "$SPLIT_APP_MODULES" = "TRUE" \
) ; then
169 test -f gid_Module_Langpack_Basis_
$lang && lang_lists
="$lang_lists gid_Module_Langpack_Basis_$lang" ||
:
170 test -f gid_Module_Langpack_Brand_
$lang && lang_lists
="$lang_lists gid_Module_Langpack_Brand_$lang" ||
:
171 test -f gid_Module_Langpack_Resource_
$lang && lang_lists
="$lang_lists gid_Module_Langpack_Resource_$lang" ||
:
172 test -f gid_Module_Langpack_Impress_
$lang && lang_lists
="$lang_lists gid_Module_Langpack_Impress_$lang" ||
:
173 test -f gid_Module_Langpack_Draw_
$lang && lang_lists
="$lang_lists gid_Module_Langpack_Draw_$lang" ||
:
174 test -f gid_Module_Langpack_Math_
$lang && lang_lists
="$lang_lists gid_Module_Langpack_Math_$lang" ||
:
175 test -f gid_Module_Langpack_Calc_
$lang && lang_lists
="$lang_lists gid_Module_Langpack_Calc_$lang" ||
:
176 test -f gid_Module_Langpack_Base_
$lang && lang_lists
="$lang_lists gid_Module_Langpack_Base_$lang" ||
:
177 test -f gid_Module_Langpack_Writer_
$lang && lang_lists
="$lang_lists gid_Module_Langpack_Writer_$lang" ||
:
178 # Place helps on dedicated packages.
179 test -f gid_Module_Helppack_Help_
$lang && sort -u gid_Module_Helppack_Help_
$lang > $FILELISTSDIR/help_
${lang}_list.txt ||
:
181 test -f gid_Module_Langpack_Basis_
$lang && lang_lists
="$lang_lists gid_Module_Langpack_Basis_$lang" ||
:
182 test -f gid_Module_Langpack_Brand_
$lang && lang_lists
="$lang_lists gid_Module_Langpack_Brand_$lang" ||
:
183 test -f gid_Module_Langpack_Resource_
$lang && lang_lists
="$lang_lists gid_Module_Langpack_Resource_$lang" ||
:
184 test -f gid_Module_Langpack_Impress_
$lang && lang_lists
="$lang_lists gid_Module_Langpack_Impress_$lang" ||
:
185 test -f gid_Module_Langpack_Draw_
$lang && lang_lists
="$lang_lists gid_Module_Langpack_Draw_$lang" ||
:
186 test -f gid_Module_Langpack_Math_
$lang && lang_lists
="$lang_lists gid_Module_Langpack_Math_$lang" ||
:
187 test -f gid_Module_Langpack_Calc_
$lang && lang_lists
="$lang_lists gid_Module_Langpack_Calc_$lang" ||
:
188 test -f gid_Module_Langpack_Base_
$lang && lang_lists
="$lang_lists gid_Module_Langpack_Base_$lang" ||
:
189 test -f gid_Module_Langpack_Writer_
$lang && lang_lists
="$lang_lists gid_Module_Langpack_Writer_$lang" ||
:
190 test -f gid_Module_Helppack_Help_
$lang && lang_lists
="$lang_lists gid_Module_Helppack_Help_$lang" ||
:
192 if test -n "$lang_lists" ; then
193 # all files are installed below $INSTALLDIR/basis; we want to own also $INSTALLDIR
194 echo "%dir $INSTALLDIR" >$FILELISTSDIR/lang_
${lang}_list.txt
195 cat $lang_lists |
sort -u >>$FILELISTSDIR/lang_
${lang}_list.txt
197 # some help files are in _Langpack_{Writer,Impress,...}_<lang>
198 # move them from -l10n to -help
199 if test "$OOO_VENDOR" = "Mandriva" -o \
( "$OOO_VENDOR" = "SUSE" -a "$SPLIT_APP_MODULES" = "TRUE" \
) ; then
200 for lang
in `echo $WITH_LANG_LIST | sed -e s/-/_/g`; do
201 test -f $FILELISTSDIR/help_
${lang}_list.txt ||
continue;
202 mv_file_between_flists
$FILELISTSDIR/help_
${lang}_list.txt
$FILELISTSDIR/lang_
${lang}_list.txt
$INSTALLDIR/help
/.
*
203 add_used_directories
$FILELISTSDIR/help_
${lang}_list.txt
$FILELISTSDIR/lang_
${lang}_list.txt
208 if test -f $FILELISTSDIR/lang_en_US_list.txt
-a "$OOO_VENDOR" = "SUSE" -a "$SPLIT_APP_MODULES" != "TRUE" ; then
209 cat $FILELISTSDIR/lang_en_US_list.txt
>>$FILELISTSDIR/common_list.txt
210 rm $FILELISTSDIR/lang_en_US_list.txt
213 if test -f gid_Module_Root_SDK
; then
214 cp gid_Module_Root_SDK
$FILELISTSDIR/sdk_list.txt
219 # create kde4 subpackage
220 test -f $DESTDIR/gid_Module_Optional_Kde
&& cp $DESTDIR/gid_Module_Optional_Kde kde4_list.txt ||
:
221 mv_file_between_flists kde4_list.txt common_list.txt
$INSTALLDIR/program
/libvclplug_kde4l..so
222 mv_file_between_flists kde4_list.txt common_list.txt
$INSTALLDIR/program
/fps_kde4lo.so
223 add_used_directories kde4_list.txt common_list.txt
226 test -f $DESTDIR/gid_Module_Optional_Gnome
&& cp $DESTDIR/gid_Module_Optional_Gnome gnome_list.txt ||
:
227 mv_file_between_flists gnome_list.txt common_list.txt
$INSTALLDIR/program
/libevoab2.so
228 mv_file_between_flists gnome_list.txt common_list.txt
$INSTALLDIR/program
/libvclplug_gtk
[0-9]*l..so
229 add_used_directories gnome_list.txt common_list.txt
232 mv_file_between_flists mono_list.txt common_list.txt
$INSTALLDIR/program
/cli_.
*.dll
233 mv_file_between_flists mono_list.txt common_list.txt
$INSTALLDIR/program
/cli_.
*.dll.config
234 mv_file_between_flists mono_list.txt common_list.txt
$INSTALLDIR/program
/policy.
*.cli_.
*.dll
235 mv_file_between_flists mono_list.txt common_list.txt
$INSTALLDIR/program
/cli_.
*.dll
236 mv_file_between_flists mono_list.txt common_list.txt
$INSTALLDIR/program
/cli_.
*.dll.config
237 mv_file_between_flists mono_list.txt common_list.txt
$INSTALLDIR/program
/policy.
*.cli_.
*.dll
238 mv_file_between_flists mono_list.txt common_list.txt
$INSTALLDIR/program
/libcli_.
*.so
239 add_used_directories mono_list.txt common_list.txt
240 # add the files from GAC if it was installed
241 test -f mono_gac
&& cat mono_gac
>>mono_list.txt
243 # postgresql subpackage
244 test -f $DESTDIR/gid_Module_Optional_PostgresqlSdbc
&& cp $DESTDIR/gid_Module_Optional_PostgresqlSdbc postgresql_list.txt ||
:
247 if test "$SPLIT_OPT_FEATURES" = "TRUE" ; then
248 if test "z$OOO_VENDOR" = "zMandriva" ; then
251 flist
=mailmerge_list.txt
253 mv_file_between_flists
$flist common_list.txt
$INSTALLDIR/program
/mailmerge.py
254 add_used_directories
$flist common_list.txt
257 if test "z$OOO_VENDOR" = "zSUSE" ; then
258 # officebean subpackage
259 test -f $DESTDIR/gid_Module_Optional_Extensions_Script_Provider_For_BS
&& cp $DESTDIR/gid_Module_Optional_Extensions_Script_Provider_For_BS officebean_list.txt ||
:
260 mv_file_between_flists officebean_list.txt common_list.txt
$INSTALLDIR/program
/classes
/officebean.jar
261 mv_file_between_flists officebean_list.txt common_list.txt
$INSTALLDIR/program
/libofficebean.so
262 add_used_directories officebean_list.txt common_list.txt
265 if test -f sdk_list.txt
; then
266 # in this case we move all entries including directories
267 mv_file_between_flists sdk_doc_list.txt sdk_list.txt
"%dir $DOCDIR/sdk/docs.*"
268 mv_file_between_flists sdk_doc_list.txt sdk_list.txt
"$DOCDIR/sdk/docs.*"
269 mv_file_between_flists sdk_doc_list.txt sdk_list.txt
"$DOCDIR/sdk/examples"
270 mv_file_between_flists sdk_doc_list.txt sdk_list.txt
"$DOCDIR/sdk/index.html"
271 mv_file_between_flists sdk_doc_list.txt sdk_list.txt
"%dir $INSTALLDIR/sdk/examples.*"
272 mv_file_between_flists sdk_doc_list.txt sdk_list.txt
"$INSTALLDIR/sdk/docs"
273 mv_file_between_flists sdk_doc_list.txt sdk_list.txt
"$INSTALLDIR/sdk/examples.*"
274 mv_file_between_flists sdk_doc_list.txt sdk_list.txt
"$INSTALLDIR/sdk/index.html"
275 add_used_directories sdk_doc_list.txt sdk_list.txt
280 if test "$OOO_VENDOR" = "Mandriva"; then
282 remove_file common_list.txt
$INSTALLDIR/share
/gallery
/htmltheme.orig
283 remove_file common_list.txt
$INSTALLDIR/share
/dict
/ooo
/dictionary.lst
285 # And these are in -draw package
286 mv_file_between_flists draw_list.txt common_list.txt
$INSTALLDIR/share
/registry
/modules
/org
/openoffice
/TypeDetection
/Filter
/fcfg_drawgraphics_filters.xcu
287 mv_file_between_flists draw_list.txt common_list.txt
$INSTALLDIR/share
/registry
/modules
/org
/openoffice
/TypeDetection
/Filter
/fcfg_drawgraphics_types.xcu
289 # And these are in -impress package
290 mv_file_between_flists impress_list.txt common_list.txt
$INSTALLDIR/share
/registry
/modules
/org
/openoffice
/TypeDetection
/Filter
/fcfg_impressgraphics_filters.xcu
291 mv_file_between_flists impress_list.txt common_list.txt
$INSTALLDIR/share
/registry
/modules
/org
/openoffice
/TypeDetection
/Types
/fcfg_impressgraphics_types.xcu
293 # Split out the gallery
294 mv_file_between_flists gallery_list.txt common_list.txt
"$INSTALLDIR/share/gallery.*"
295 test -r galleries.txt
&& cat galleries.txt
>> gallery_list.txt
297 # Split out dtd-officedocument1.0
298 mv_file_between_flists dtd_list.txt common_list.txt
"$INSTALLDIR/share/dtd/officedocument.*"
300 # Split out java stuff
301 mv_file_between_flists java_common_list.txt common_list.txt
$INSTALLDIR/program
/JREProperties.class
302 mv_file_between_flists java_common_list.txt common_list.txt
"$INSTALLDIR/program/classes.*"
303 mv_file_between_flists java_common_list.txt common_list.txt
$INSTALLDIR/program
/libofficebean.so
304 mv_file_between_flists java_common_list.txt common_list.txt
"$INSTALLDIR/share/Scripts/java.*"
305 mv_file_between_flists java_common_list.txt writer_list.txt
$INSTALLDIR/program
/classes
/writer2latex.jar
307 # Move arch-dependent/dup files from common to core
312 program
/configimport.bin \
314 program
/msfontextract \
315 program
/oosplash.bin \
317 program
/pagein-calc \
318 program
/pagein-common \
319 program
/pagein-draw \
320 program
/pagein-impress \
321 program
/pagein-writer \
323 program
/pluginapp.bin \
324 program
/setofficelang.bin \
325 program
/soffice.bin \
330 mv_file_between_flists core_list.txt common_list.txt
"$INSTALLDIR/$f"
333 # Ship ooqstart for gnome in gnome package
334 mv_file_between_flists gnome_list.txt core_list.txt
"$INSTALLDIR/program/libqstart_gtk680.*"
336 # themes are included in other packages
337 # don't use remove_file as we don't want them removed from the buildroot.
338 mv_file_between_flists
/dev
/null common_list.txt
$INSTALLDIR/share
/config
/images_crystal.
zip
339 mv_file_between_flists
/dev
/null common_list.txt
$INSTALLDIR/share
/config
/images_hicontrast.
zip
340 mv_file_between_flists
/dev
/null common_list.txt
$INSTALLDIR/share
/config
/images_tango.
zip
341 mv_file_between_flists
/dev
/null common_list.txt
$INSTALLDIR/share
/config
/images.
zip
344 # remove known duplicities to do not have files packaged in two packages
345 # the Bulgarian fixes can be removed after the issue #54110 is fixed
346 remove_duplicity_from_flists common_list.txt lang_bg_list.txt
$INSTALLDIR/presets
/config
/arrowhd.soe
347 remove_duplicity_from_flists common_list.txt lang_bg_list.txt
$INSTALLDIR/presets
/config
/classic.sog
348 remove_duplicity_from_flists common_list.txt lang_bg_list.txt
$INSTALLDIR/presets
/config
/hatching.soh
349 remove_duplicity_from_flists common_list.txt lang_bg_list.txt
$INSTALLDIR/presets
/config
/modern.sog
350 remove_duplicity_from_flists common_list.txt lang_bg_list.txt
$INSTALLDIR/presets
/config
/palette.soc
351 remove_duplicity_from_flists common_list.txt lang_bg_list.txt
$INSTALLDIR/presets
/config
/styles.sod
352 # the British fixes can be removed after the issue #54113 is fixed
353 remove_duplicity_from_flists common_list.txt lang_en-GB_list.txt
$INSTALLDIR/presets
/config
/standard.sog
357 echo "Creating package directories..."
359 test -d pkg
&& rm -r pkg ||
:
361 # Create package tree (needed by Debian's dpkg)
362 # create_package_directory <list_file> <directory_name>
363 create_package_directory
()
368 -e " if(/^%dir (.*)/)
369 {system('mkdir', '-p', '-m', '755', \"$directory\".\$1);}
371 {rename('./'.\$_, \"$directory\".\$_);}
376 create_package_directory gid_Module_Root_Ure_Hidden pkg
/ure
378 create_package_directory gid_Module_Root pkg
/libreoffice-common
379 create_package_directory gid_Module_Root_Brand pkg
/libreoffice-common
380 create_package_directory gid_Module_Root_Files_Images pkg
/libreoffice-common
381 create_package_directory gid_Module_Oo_Linguistic pkg
/libreoffice-common
382 create_package_directory gid_Module_Optional_Xsltfiltersamples pkg
/libreoffice-common
383 create_package_directory gid_Module_Optional_Grfflt pkg
/libreoffice-draw
384 create_package_directory gid_Module_Prg_Calc_Bin pkg
/libreoffice-calc
385 create_package_directory gid_Module_Prg_Math_Bin pkg
/libreoffice-math
386 create_package_directory gid_Module_Prg_Draw_Bin pkg
/libreoffice-draw
387 create_package_directory gid_Module_Prg_Wrt_Bin pkg
/libreoffice-writer
388 create_package_directory gid_Module_Prg_Impress_Bin pkg
/libreoffice-impress
389 create_package_directory gid_Module_Prg_Base_Bin pkg
/libreoffice-base
390 create_package_directory gid_Module_Brand_Prg_Calc pkg
/libreoffice-calc
391 create_package_directory gid_Module_Brand_Prg_Math pkg
/libreoffice-math
392 create_package_directory gid_Module_Brand_Prg_Draw pkg
/libreoffice-draw
393 create_package_directory gid_Module_Brand_Prg_Wrt pkg
/libreoffice-writer
394 create_package_directory gid_Module_Brand_Prg_Impress pkg
/libreoffice-impress
395 create_package_directory gid_Module_Brand_Prg_Base pkg
/libreoffice-base
396 create_package_directory gid_Module_Pyuno pkg
/python-uno
397 create_package_directory gid_Module_Optional_Gnome pkg
/libreoffice-gnome
399 create_package_directory gid_Module_Root_Files_2 pkg
/libreoffice-common
400 create_package_directory gid_Module_Root_Files_3 pkg
/libreoffice-common
401 create_package_directory gid_Module_Root_Files_4 pkg
/libreoffice-common
402 create_package_directory gid_Module_Root_Files_5 pkg
/libreoffice-common
403 create_package_directory gid_Module_Root_Files_6 pkg
/libreoffice-common
404 create_package_directory gid_Module_Root_Files_7 pkg
/libreoffice-common
405 if [ -e gid_Module_Optional_Pymailmerge
]; then
406 create_package_directory gid_Module_Optional_Pymailmerge pkg
/libreoffice-emailmerge
408 mkdir
-p pkg
/libreoffice-emailmerge
/$INSTALLDIR/program
409 mv pkg
/libreoffice-common
/$INSTALLDIR/program
/mailmerge.py \
410 pkg
/libreoffice-emailmerge
/$INSTALLDIR/program
/mailmerge.py
412 create_package_directory gid_Module_Optional_OGLTrans pkg
/libreoffice-ogltrans
414 create_package_directory gid_Module_Root_SDK pkg
/libreoffice-dev
416 for l
in `echo $WITH_LANG_LIST`; do
417 for p
in Impress Draw Math Calc Base Writer
; do
418 create_package_directory gid_Module_Langpack_
${p}_
`echo $l | sed -e s/-/_/g` pkg
/libreoffice-l10n-
$l
420 create_package_directory gid_Module_Langpack_Basis_
`echo $l | sed -e s/-/_/g` pkg
/libreoffice-l10n-
$l
421 create_package_directory gid_Module_Langpack_Brand_
`echo $l | sed -e s/-/_/g` pkg
/libreoffice-l10n-
$l
422 create_package_directory gid_Module_Langpack_Resource_
`echo $l | sed -e s/-/_/g` pkg
/libreoffice-l10n-
$l
423 create_package_directory gid_Module_Helppack_Help_
`echo $l | sed -e s/-/_/g` pkg
/libreoffice-help-
$l
425 # some help files are in _Langpack_{Writer,Impress,...}_<lang>
426 # move them from -l10n to -help
427 if [ "$l" = "en-US" ]; then d
=en
; else d
=$l; fi
428 mv pkg
/libreoffice-l10n-
$l/$INSTALLDIR/help
/$d/* \
429 pkg
/libreoffice-help-
$l/$INSTALLDIR/help
/$d && \
430 rmdir pkg
/libreoffice-l10n-
$l/$INSTALLDIR/help
/$d
433 # move_wrappers <directory_name> <name> [...]
438 mkdir
-m755 -p "$directory"/usr
/bin
439 while test -n "$1"; do
440 mv usr
/*bin
/"$1$BINSUFFIX" "$directory"/usr
/bin
444 move_wrappers pkg
/libreoffice-common soffice unopkg
445 if test "$COMPAT_OOWRAPPERS" = "YES" ; then
446 move_wrappers pkg
/libreoffice-common ooffice oofromtemplate
447 move_wrappers pkg
/libreoffice-base oobase
448 move_wrappers pkg
/libreoffice-writer oowriter ooweb
449 move_wrappers pkg
/libreoffice-calc oocalc
450 move_wrappers pkg
/libreoffice-impress ooimpress
451 move_wrappers pkg
/libreoffice-math oomath
452 move_wrappers pkg
/libreoffice-draw oodraw
454 move_wrappers pkg
/libreoffice-common libreoffice lofromtemplate
455 move_wrappers pkg
/libreoffice-base lobase
456 move_wrappers pkg
/libreoffice-writer lowriter loweb
457 move_wrappers pkg
/libreoffice-calc localc
458 move_wrappers pkg
/libreoffice-impress loimpress
459 move_wrappers pkg
/libreoffice-math lomath
460 move_wrappers pkg
/libreoffice-draw lodraw
462 # Move all libraries, binaries, *.rdb from -common to -core
463 for d
in $INSTALLDIR/program
$INSTALLDIR/program
; do \
464 if [ ! -d $DESTDIR/pkg
/libreoffice-core
/$d ]; then \
465 mkdir
-p $DESTDIR/pkg
/libreoffice-core
/$d; \
467 ( cd pkg
/libreoffice-common
/$d
469 -regex '\./\(.*\.so.*\|.*\.bin\|pagein\|msfontextract\|.*\.rdb\|javaldx\|uri-encode\)' \
470 -exec mv {} $DESTDIR/pkg
/libreoffice-core
/$d \
;
474 # install additional ooo-build scripts & misc stuff
475 mkdir
-p pkg
/libreoffice-common
/usr
/share
/man
/man1
476 if test "$COMPAT_OOWRAPPERS" = "YES" ; then
477 mv usr
/share
/man
/man
1/openoffice
$BINSUFFIX.1 \
478 pkg
/libreoffice-common
/usr
/share
/man
/man1
480 mv usr
/share
/man
/man
1/libreoffice
$BINSUFFIX.1 \
481 pkg
/libreoffice-common
/usr
/share
/man
/man1
482 mkdir
-p pkg
/libreoffice-common
/etc
/bash_completion.d
483 if test "$COMPAT_OOWRAPPERS" = "YES" ; then
484 mv etc
/bash_completion.d
/ooffice
$BINSUFFIX.sh \
485 pkg
/libreoffice-common
/etc
/bash_completion.d
487 mv etc
/bash_completion.d
/libreoffice
$BINSUFFIX.sh \
488 pkg
/libreoffice-common
/etc
/bash_completion.d
489 mv .
$INSTALLDIR/program
/java-set-classpath \
490 pkg
/libreoffice-common
/$INSTALLDIR/program
491 if echo $WITH_LANG_LIST |
grep -q en-US
; then
492 for i
in forms
/resume.ott officorr
/project-proposal.ott
; do \
493 mkdir
-p pkg
/libreoffice-common
/$INSTALLDIR/share
/template
/en-US
/`dirname $i`; \
494 mv .
$INSTALLDIR/share
/template
/en-US
/$i \
495 pkg
/libreoffice-common
/$INSTALLDIR/share
/template
/en-US
/$i; \
498 # Warn for any remaining files
499 find .
-path './pkg' -prune -o -not -name 'gid_Module_*' -not -type d
-exec echo "File not packaged: {}" \
;
502 # mark the config files
503 RPM_CONFIG_FILE_TAGS
=
504 if test "$OOO_VENDOR" = "SUSE" -o "$OOO_VENDOR" = "RedHat"; then
505 RPM_CONFIG_FILE_TAGS
="%config"
506 elif test "$OOO_VENDOR" = "PLD" ; then
507 RPM_CONFIG_FILE_TAGS
="%config(noreplace) %verify(not md5 size mtime)"
510 if test "z$RPM_CONFIG_FILE_TAGS" != "z" ; then
512 perl
-pi -e "s|^($INSTALLDIR/help/.*\.xsl)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
513 -e "s|^($INSTALLDIR/help/.*\.css)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
514 -e "s|^($INSTALLDIR/program/[a-zA-Z0-9_\.]*rc)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
515 -e "s|^($INSTALLDIR/program/.*\.xsl)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
516 -e "s|^($INSTALLDIR/share/config/[a-zA-Z0-9]*rc)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
517 -e "s|^($INSTALLDIR/share/dict/ooo/.*\.lst)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
518 -e "s|^($INSTALLDIR/share/psprint/.*\.conf)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
519 -e "s|^($INSTALLDIR/share/registry/.*\.xcu)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
520 -e "s|^($INSTALLDIR/share/registry/.*\.properties)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
521 -e "s|^($INSTALLDIR/share/registry/.*\.xcs)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
522 -e "s|^($INSTALLDIR/user/config/.*\.so.)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
526 mkdir
-p $FILELISTSDIR/orig
527 mv -f $DESTDIR/gid_Module_
* $FILELISTSDIR/orig