6 FILELISTSDIR
="$BUILDDIR/file-lists"
8 # remove installed file even from the file list
9 # Params: file_list file_to_remove
13 perl
-pi -e "s|^$2$||" "$1"
16 # move one file from one list of files to a second one
17 # Params: target_file_list source_file_list file_to_move
18 mv_file_between_flists
()
20 if grep "^$3\$" $2 >/dev
/null
2>&1 ; then
21 # \$3 can be regular expression
23 perl
-pi -e "s|^$3$||" $2
26 # add the directories from the source list of files to the target list of
27 # file which are used in the target list of files but are missing there
28 # Params: target_file_list source_file_list
29 add_used_directories
()
31 sort -u -r $2 |
sed -n "s|^%dir \(.*\)\$|s%^\\\\(\1\\\\).*%\\\\1%p|p" >$2.pattern
32 sed -n -f $2.pattern
$1 |
sort -u |
sed "s|^|%dir |" >>$1
38 # remove a duplicity between two filelist
39 # Params: filelist_with_original filelist_with_duplicity duplicit_path
40 remove_duplicity_from_flists
()
42 if grep "$3" "$1" >/dev
/null
2>&1 && \
43 grep "$3" "$2" >/dev
/null
2>&1 ; then
44 perl
-pi -e "s|^$3$||" $2
48 # merges one file list into another one
49 # Params: source_filelist dest_filelist replace_dest
52 if test -f "$1" ; then
54 sort -u "$2" >"$2".sorted
59 if ! test -f $DESTDIR/gid_Module_Root
; then
60 echo "Error: Failed to generate package file lists";
61 echo " Have you defined DESTDIR?"
66 rm -rf "$FILELISTSDIR"
67 mkdir
-p "$FILELISTSDIR"
71 if test "z$OOO_VENDOR" != "zDebian" ; then
73 echo "Generating package file lists for $OOO_VENDOR..."
76 for module
in gid_Module_Root gid_Module_Root_Brand \
77 gid_Module_Root_Files_Images \
78 gid_Module_Root_Files_
[0-9] \
79 gid_Module_Root_Hack \
80 gid_Module_Oo_Linguistic \
81 gid_Module_Root_Ure_Hidden
; do
82 merge_flists
$module $FILELISTSDIR/common_list.txt
85 if test "$SPLIT_APP_MODULES" = "YES" ; then
86 merge_flists gid_Module_Prg_Base_Bin
$FILELISTSDIR/base_list.txt
87 merge_flists gid_Module_Prg_Calc_Bin
$FILELISTSDIR/calc_list.txt
88 merge_flists gid_Module_Prg_Draw_Bin
$FILELISTSDIR/draw_list.txt
89 merge_flists gid_Module_Prg_Math_Bin
$FILELISTSDIR/math_list.txt
90 merge_flists gid_Module_Prg_Impress_Bin
$FILELISTSDIR/impress_list.txt
91 merge_flists gid_Module_Prg_Wrt_Bin
$FILELISTSDIR/writer_list.txt
92 merge_flists gid_Module_Brand_Prg_Base
$FILELISTSDIR/base_list.txt
93 merge_flists gid_Module_Brand_Prg_Calc
$FILELISTSDIR/calc_list.txt
94 merge_flists gid_Module_Brand_Prg_Draw
$FILELISTSDIR/draw_list.txt
95 merge_flists gid_Module_Brand_Prg_Math
$FILELISTSDIR/math_list.txt
96 merge_flists gid_Module_Brand_Prg_Impress
$FILELISTSDIR/impress_list.txt
97 merge_flists gid_Module_Brand_Prg_Wrt
$FILELISTSDIR/writer_list.txt
98 # FIXME: small; low dependencies; why optional module?
99 merge_flists gid_Module_Optional_OGLTrans
$FILELISTSDIR/impress_list.txt
101 merge_flists gid_Module_Prg_Base_Bin
$FILELISTSDIR/common_list.txt
102 merge_flists gid_Module_Prg_Calc_Bin
$FILELISTSDIR/common_list.txt
103 merge_flists gid_Module_Prg_Draw_Bin
$FILELISTSDIR/common_list.txt
104 merge_flists gid_Module_Prg_Math_Bin
$FILELISTSDIR/common_list.txt
105 merge_flists gid_Module_Prg_Impress_Bin
$FILELISTSDIR/common_list.txt
106 merge_flists gid_Module_Prg_Wrt_Bin
$FILELISTSDIR/common_list.txt
107 merge_flists gid_Module_Brand_Prg_Base
$FILELISTSDIR/common_list.txt
108 merge_flists gid_Module_Brand_Prg_Calc
$FILELISTSDIR/common_list.txt
109 merge_flists gid_Module_Brand_Prg_Draw
$FILELISTSDIR/common_list.txt
110 merge_flists gid_Module_Brand_Prg_Math
$FILELISTSDIR/common_list.txt
111 merge_flists gid_Module_Brand_Prg_Impress
$FILELISTSDIR/common_list.txt
112 merge_flists gid_Module_Brand_Prg_Wrt
$FILELISTSDIR/common_list.txt
113 # FIXME: small; low dependencies; why optional module?
114 merge_flists gid_Module_Optional_OGLTrans
$FILELISTSDIR/common_list.txt
117 if test "$SPLIT_OPT_FEATURES" = "YES" ; then
118 if test "z$OOO_VENDOR" = "zMandriva" ; then
119 merge_flists gid_Module_Optional_Binfilter
$FILELISTSDIR/filter-binfilter_list.txt
120 merge_flists gid_Module_Langpack_Binfilter_en_US
$FILELISTSDIR/filter-binfilter_list.txt
121 merge_flists gid_Module_Optional_Grfflt
$FILELISTSDIR/draw_list.txt
122 merge_flists gid_Module_Optional_Headless
$FILELISTSDIR/common_list.txt
123 merge_flists gid_Module_Optional_Javafilter
$FILELISTSDIR/common_list.txt
124 merge_flists gid_Module_Optional_Pymailmerge
$FILELISTSDIR/pyuno_list.txt
125 merge_flists gid_Module_Optional_Pyuno
$FILELISTSDIR/pyuno_list.txt
126 merge_flists gid_Module_Optional_Testtool
$FILELISTSDIR/testtool_list.txt
127 merge_flists gid_Module_Optional_Xsltfiltersamples
$FILELISTSDIR/common_list.txt
129 merge_flists gid_Module_Optional_Binfilter
$FILELISTSDIR/filters_list.txt
130 merge_flists gid_Module_Optional_Grfflt
$FILELISTSDIR/common_list.txt
131 merge_flists gid_Module_Optional_Headless
$FILELISTSDIR/common_list.txt
132 merge_flists gid_Module_Optional_Javafilter
$FILELISTSDIR/filters_list.txt
133 merge_flists gid_Module_Optional_Pymailmerge
$FILELISTSDIR/mailmerge_list.txt
134 merge_flists gid_Module_Optional_Pyuno
$FILELISTSDIR/pyuno_list.txt
135 merge_flists gid_Module_Optional_Testtool
$FILELISTSDIR/testtool_list.txt
136 merge_flists gid_Module_Optional_Xsltfiltersamples
$FILELISTSDIR/filters_list.txt
139 merge_flists gid_Module_Optional_Binfilter
$FILELISTSDIR/common_list.txt
140 merge_flists gid_Module_Langpack_Binfilter
$FILELISTSDIR/common_list.txt
141 merge_flists gid_Module_Optional_Grfflt
$FILELISTSDIR/common_list.txt
142 merge_flists gid_Module_Optional_Headless
$FILELISTSDIR/common_list.txt
143 merge_flists gid_Module_Optional_Javafilter
$FILELISTSDIR/common_list.txt
144 merge_flists gid_Module_Optional_Pymailmerge
$FILELISTSDIR/common_list.txt
145 merge_flists gid_Module_Optional_Pyuno
$FILELISTSDIR/common_list.txt
146 merge_flists gid_Module_Optional_Testtool
$FILELISTSDIR/common_list.txt
147 merge_flists gid_Module_Optional_Xsltfiltersamples
$FILELISTSDIR/common_list.txt
151 for lang
in `echo $WITH_LANG_LIST | sed -e s/-/_/g`; do
153 if test "$OOO_VENDOR" = "Mandriva" -o \
( "$OOO_VENDOR" = "Novell, Inc." -a "$SPLIT_APP_MODULES" = "YES" \
) ; then
154 test -f gid_Module_Langpack_Basis_
$lang && lang_lists
="$lang_lists gid_Module_Langpack_Basis_$lang" ||
:
155 test -f gid_Module_Langpack_Brand_
$lang && lang_lists
="$lang_lists gid_Module_Langpack_Brand_$lang" ||
:
156 test -f gid_Module_Langpack_Resource_
$lang && lang_lists
="$lang_lists gid_Module_Langpack_Resource_$lang" ||
:
157 test -f gid_Module_Langpack_Impress_
$lang && lang_lists
="$lang_lists gid_Module_Langpack_Impress_$lang" ||
:
158 test -f gid_Module_Langpack_Draw_
$lang && lang_lists
="$lang_lists gid_Module_Langpack_Draw_$lang" ||
:
159 test -f gid_Module_Langpack_Math_
$lang && lang_lists
="$lang_lists gid_Module_Langpack_Math_$lang" ||
:
160 test -f gid_Module_Langpack_Calc_
$lang && lang_lists
="$lang_lists gid_Module_Langpack_Calc_$lang" ||
:
161 test -f gid_Module_Langpack_Base_
$lang && lang_lists
="$lang_lists gid_Module_Langpack_Base_$lang" ||
:
162 test -f gid_Module_Langpack_Writer_
$lang && lang_lists
="$lang_lists gid_Module_Langpack_Writer_$lang" ||
:
163 test -f gid_Module_Langpack_Binfilter_
$lang && lang_lists
="$lang_lists gid_Module_Langpack_Binfilter_$lang" ||
:
164 # Place helps on dedicated packages.
165 test -f gid_Module_Helppack_Help_
$lang && sort -u gid_Module_Helppack_Help_
$lang > $FILELISTSDIR/help_
${lang}_list.txt ||
:
167 test -f gid_Module_Langpack_Basis_
$lang && lang_lists
="$lang_lists gid_Module_Langpack_Basis_$lang" ||
:
168 test -f gid_Module_Langpack_Brand_
$lang && lang_lists
="$lang_lists gid_Module_Langpack_Brand_$lang" ||
:
169 test -f gid_Module_Langpack_Resource_
$lang && lang_lists
="$lang_lists gid_Module_Langpack_Resource_$lang" ||
:
170 test -f gid_Module_Langpack_Impress_
$lang && lang_lists
="$lang_lists gid_Module_Langpack_Impress_$lang" ||
:
171 test -f gid_Module_Langpack_Draw_
$lang && lang_lists
="$lang_lists gid_Module_Langpack_Draw_$lang" ||
:
172 test -f gid_Module_Langpack_Math_
$lang && lang_lists
="$lang_lists gid_Module_Langpack_Math_$lang" ||
:
173 test -f gid_Module_Langpack_Calc_
$lang && lang_lists
="$lang_lists gid_Module_Langpack_Calc_$lang" ||
:
174 test -f gid_Module_Langpack_Base_
$lang && lang_lists
="$lang_lists gid_Module_Langpack_Base_$lang" ||
:
175 test -f gid_Module_Langpack_Writer_
$lang && lang_lists
="$lang_lists gid_Module_Langpack_Writer_$lang" ||
:
176 test -f gid_Module_Langpack_Binfilter_
$lang && lang_lists
="$lang_lists gid_Module_Langpack_Binfilter_$lang" ||
:
177 test -f gid_Module_Helppack_Help_
$lang && lang_lists
="$lang_lists gid_Module_Helppack_Help_$lang" ||
:
179 if test -n "$lang_lists" ; then
180 # all files are installed below $INSTALLDIR/basis; we want to own also $INSTALLDIR
181 echo "%dir $INSTALLDIR" >$FILELISTSDIR/lang_
${lang}_list.txt
182 cat $lang_lists |
sort -u >>$FILELISTSDIR/lang_
${lang}_list.txt
184 # some help files are in _Langpack_{Writer,Impress,...}_<lang>
185 # move them from -l10n to -help
186 if test "$OOO_VENDOR" = "Mandriva" -o \
( "$OOO_VENDOR" = "Novell, Inc." -a "$SPLIT_APP_MODULES" = "YES" \
) ; then
187 for lang
in `echo $WITH_LANG_LIST | sed -e s/-/_/g`; do
188 test -f $FILELISTSDIR/help_
${lang}_list.txt ||
continue;
189 mv_file_between_flists
$FILELISTSDIR/help_
${lang}_list.txt
$FILELISTSDIR/lang_
${lang}_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/help
/.
*
190 add_used_directories
$FILELISTSDIR/help_
${lang}_list.txt
$FILELISTSDIR/lang_
${lang}_list.txt
195 if test -f $FILELISTSDIR/lang_en_US_list.txt
-a "$OOO_VENDOR" = "Novell, Inc." -a "$SPLIT_APP_MODULES" != "YES" ; then
196 cat $FILELISTSDIR/lang_en_US_list.txt
>>$FILELISTSDIR/common_list.txt
197 rm $FILELISTSDIR/lang_en_US_list.txt
200 if test -f gid_Module_Root_SDK
; then
201 cp gid_Module_Root_SDK
$FILELISTSDIR/sdk_list.txt
207 test -f $DESTDIR/gid_Module_Optional_Kde
&& cp $DESTDIR/gid_Module_Optional_Kde kde_list.txt ||
:
208 mv_file_between_flists kde_list.txt common_list.txt
$INSTALLDIR/program
/kdefilepicker
209 mv_file_between_flists kde_list.txt common_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/program
/fps_kde.uno.so
210 mv_file_between_flists kde_list.txt common_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/program
/libvclplug_kdel..so
211 mv_file_between_flists kde_list.txt common_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/program
/libkabdrv1.so
212 add_used_directories kde_list.txt common_list.txt
214 # create kde4 subpackage
215 mv_file_between_flists kde4_list.txt kde_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/program
/kde4be1.uno.so
216 mv_file_between_flists kde4_list.txt common_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/program
/libvclplug_kde4l..so
217 mv_file_between_flists kde4_list.txt common_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/program
/fps_kde4.uno.so
218 add_used_directories kde4_list.txt common_list.txt
221 test -f $DESTDIR/gid_Module_Optional_Gnome
&& cp $DESTDIR/gid_Module_Optional_Gnome gnome_list.txt ||
:
222 mv_file_between_flists gnome_list.txt common_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/program
/libevoab2.so
223 mv_file_between_flists gnome_list.txt common_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/program
/fps_gnome.uno.so
224 mv_file_between_flists gnome_list.txt common_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/program
/libvclplug_gtk
[0-9]*l..so
225 mv_file_between_flists common_list.txt gnome_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/program
/ucpgvfs1.uno.so
226 add_used_directories gnome_list.txt common_list.txt
229 mv_file_between_flists mono_list.txt common_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/program
/cli_.
*.dll
230 mv_file_between_flists mono_list.txt common_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/program
/cli_.
*.dll.config
231 mv_file_between_flists mono_list.txt common_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/program
/policy.
*.cli_.
*.dll
232 mv_file_between_flists mono_list.txt common_list.txt
$INSTALLDIR/ure
/lib
/cli_.
*.dll
233 mv_file_between_flists mono_list.txt common_list.txt
$INSTALLDIR/ure
/lib
/cli_.
*.dll.config
234 mv_file_between_flists mono_list.txt common_list.txt
$INSTALLDIR/ure
/lib
/policy.
*.cli_.
*.dll
235 mv_file_between_flists mono_list.txt common_list.txt
$INSTALLDIR/ure
/lib
/libcli_.
*.so
236 add_used_directories mono_list.txt common_list.txt
237 # add the files from GAC if it was installed
238 test -f mono_gac
&& cat mono_gac
>>mono_list.txt
241 if test "$SPLIT_OPT_FEATURES" = "YES" ; then
242 if test "z$OOO_VENDOR" = "zMandriva" ; then
245 flist
=mailmerge_list.txt
247 mv_file_between_flists
$flist common_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/program
/mailmerge.py
248 add_used_directories
$flist common_list.txt
251 if test "z$OOO_VENDOR" = "zNovell" ; then
252 # officebean subpackage
253 mv_file_between_flists officebean_list.txt common_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/program
/classes
/officebean.jar
254 mv_file_between_flists officebean_list.txt common_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/program
/libofficebean.so
255 add_used_directories officebean_list.txt common_list.txt
258 if test -f sdk_list.txt
; then
259 # in this case we move all entries including directories
260 mv_file_between_flists sdk_doc_list.txt sdk_list.txt
"%dir $DOCDIRBASE/sdk/docs.*"
261 mv_file_between_flists sdk_doc_list.txt sdk_list.txt
"$DOCDIRBASE/sdk/docs.*"
262 mv_file_between_flists sdk_doc_list.txt sdk_list.txt
"$DOCDIRBASE/sdk/examples"
263 mv_file_between_flists sdk_doc_list.txt sdk_list.txt
"$DOCDIRBASE/sdk/index.html"
264 mv_file_between_flists sdk_doc_list.txt sdk_list.txt
"%dir $INSTALLDIR/basis$PRODUCTVERSION/sdk/examples.*"
265 mv_file_between_flists sdk_doc_list.txt sdk_list.txt
"$INSTALLDIR/basis$PRODUCTVERSION/sdk/docs"
266 mv_file_between_flists sdk_doc_list.txt sdk_list.txt
"$INSTALLDIR/basis$PRODUCTVERSION/sdk/examples.*"
267 mv_file_between_flists sdk_doc_list.txt sdk_list.txt
"$INSTALLDIR/basis$PRODUCTVERSION/sdk/index.html"
268 add_used_directories sdk_doc_list.txt sdk_list.txt
271 if test "$OOO_VENDOR" = "Novell, Inc." -a "$SPLIT_APP_MODULES" = "YES" ; then
272 # move the prebuilt icons into a hacky temporary package
273 # we want to repack them into a noarch package as soon as possible
274 # without the build dependency on the huge devel package
275 mv_file_between_flists icon_themes_prebuilt.txt common_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/share
/config
/images_classic8.
zip
276 mv_file_between_flists icon_themes_prebuilt.txt common_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/share
/config
/images_crystal.
zip
277 mv_file_between_flists icon_themes_prebuilt.txt common_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/share
/config
/images_hicontrast.
zip
278 mv_file_between_flists icon_themes_prebuilt.txt common_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/share
/config
/images_industrial.
zip
279 mv_file_between_flists icon_themes_prebuilt.txt common_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/share
/config
/images_tango.
zip
280 mv_file_between_flists icon_themes_prebuilt.txt common_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/share
/config
/images.
zip
284 if test "$OOO_VENDOR" = "Mandriva"; then
286 remove_file common_list.txt
$INSTALLDIR/share
/gallery
/htmltheme.orig
287 remove_file common_list.txt
$INSTALLDIR/share
/dict
/ooo
/dictionary.lst
289 # And these are in -draw package
290 mv_file_between_flists draw_list.txt common_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/share
/registry
/modules
/org
/openoffice
/TypeDetection
/Filter
/fcfg_drawgraphics_filters.xcu
291 mv_file_between_flists draw_list.txt common_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/share
/registry
/modules
/org
/openoffice
/TypeDetection
/Filter
/fcfg_drawgraphics_types.xcu
293 # And these are in -impress package
294 mv_file_between_flists impress_list.txt common_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/share
/registry
/modules
/org
/openoffice
/TypeDetection
/Filter
/fcfg_impressgraphics_filters.xcu
295 mv_file_between_flists impress_list.txt common_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/share
/registry
/modules
/org
/openoffice
/TypeDetection
/Types
/fcfg_impressgraphics_types.xcu
297 # Split out the gallery
298 mv_file_between_flists gallery_list.txt common_list.txt
"$INSTALLDIR/basis$PRODUCTVERSION/share/gallery.*"
299 test -r galleries.txt
&& cat galleries.txt
>> gallery_list.txt
301 # Split out dtd-officedocument1.0
302 mv_file_between_flists dtd_list.txt common_list.txt
"$INSTALLDIR/share/dtd/officedocument.*"
304 # Split out java stuff
305 mv_file_between_flists java_common_list.txt common_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/program
/JREProperties.class
306 mv_file_between_flists java_common_list.txt common_list.txt
"$INSTALLDIR/basis$PRODUCTVERSION/program/classes.*"
307 mv_file_between_flists java_common_list.txt common_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/program
/libofficebean.so
308 mv_file_between_flists java_common_list.txt common_list.txt
"$INSTALLDIR/basis$PRODUCTVERSION/share/Scripts/java.*"
309 mv_file_between_flists java_common_list.txt filter-binfilter_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/program
/classes
/aportisdoc.jar
310 mv_file_between_flists java_common_list.txt filter-binfilter_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/program
/classes
/pocketword.jar
311 mv_file_between_flists java_common_list.txt filter-binfilter_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/program
/classes
/pexcel.jar
312 mv_file_between_flists java_common_list.txt writer_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/program
/classes
/writer2latex.jar
314 # Move arch-dependent/dup files from common to core
319 program
/configimport.bin \
321 program
/msfontextract \
323 program
/oosplash.bin \
325 program
/pagein-calc \
326 program
/pagein-common \
327 program
/pagein-draw \
328 program
/pagein-impress \
329 program
/pagein-writer \
331 program
/pluginapp.bin \
332 program
/setofficelang.bin \
333 program
/soffice.bin \
334 program
/spadmin.bin \
339 mv_file_between_flists core_list.txt common_list.txt
"$INSTALLDIR/basis$PRODUCTVERSION/$f"
342 # Put gtk/gnome stuff into gnome package
343 mv_file_between_flists gnome_list.txt core_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/program
/gnome-open-url.bin
344 mv_file_between_flists gnome_list.txt core_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/program
/fps_gnome.uno.so
345 mv_file_between_flists gnome_list.txt core_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/program
/ucpgvfs1.uno.so
346 mv_file_between_flists gnome_list.txt core_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/program
/libeggtray680li.so
348 # Ship ooqstart for gnome in gnome package
349 mv_file_between_flists gnome_list.txt core_list.txt
"$INSTALLDIR/program/libqstart_gtk680.*"
351 # themes are included in other packages
352 # don't use remove_file as we don't want them removed from the buildroot.
353 mv_file_between_flists
/dev
/null common_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/share
/config
/images_crystal.
zip
354 mv_file_between_flists
/dev
/null common_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/share
/config
/images_hicontrast.
zip
355 mv_file_between_flists
/dev
/null common_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/share
/config
/images_industrial.
zip
356 mv_file_between_flists
/dev
/null common_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/share
/config
/images_tango.
zip
357 mv_file_between_flists
/dev
/null common_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/share
/config
/images.
zip
360 # remove known duplicities to do not have files packaged in two packages
361 # the Bulgarian fixes can be removed after the issue #54110 is fixed
362 remove_duplicity_from_flists common_list.txt lang_bg_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/presets
/config
/arrowhd.soe
363 remove_duplicity_from_flists common_list.txt lang_bg_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/presets
/config
/classic.sog
364 remove_duplicity_from_flists common_list.txt lang_bg_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/presets
/config
/hatching.soh
365 remove_duplicity_from_flists common_list.txt lang_bg_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/presets
/config
/modern.sog
366 remove_duplicity_from_flists common_list.txt lang_bg_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/presets
/config
/palette.soc
367 remove_duplicity_from_flists common_list.txt lang_bg_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/presets
/config
/styles.sod
368 # the British fixes can be removed after the issue #54113 is fixed
369 remove_duplicity_from_flists common_list.txt lang_en-GB_list.txt
$INSTALLDIR/basis
$PRODUCTVERSION/presets
/config
/standard.sog
373 echo "Creating package directories..."
375 test -d pkg
&& rm -r pkg ||
:
377 # Create package tree (needed by Debian's dpkg)
378 # create_package_directory <list_file> <directory_name>
379 create_package_directory
()
384 -e " if(/^%dir (.*)/)
385 {system('mkdir', '-p', '-m', '755', \"$directory\".\$1);}
387 {rename('./'.\$_, \"$directory\".\$_);}
392 create_package_directory gid_Module_Root_Ure_Hidden pkg
/ure
394 create_package_directory gid_Module_Root pkg
/libreoffice-common
395 create_package_directory gid_Module_Root_Brand pkg
/libreoffice-common
396 create_package_directory gid_Module_Root_Files_Images pkg
/libreoffice-common
397 create_package_directory gid_Module_Oo_Linguistic pkg
/libreoffice-common
398 create_package_directory gid_Module_Optional_Xsltfiltersamples pkg
/libreoffice-common
399 create_package_directory gid_Module_Optional_Javafilter pkg
/libreoffice-common
400 if [ -f gid_Module_Optional_Binfilter
]; then
401 create_package_directory gid_Module_Optional_Binfilter pkg
/libreoffice-filter-binfilter
403 create_package_directory gid_Module_Optional_Grfflt pkg
/libreoffice-draw
404 create_package_directory gid_Module_Prg_Calc_Bin pkg
/libreoffice-calc
405 create_package_directory gid_Module_Prg_Math_Bin pkg
/libreoffice-math
406 create_package_directory gid_Module_Prg_Draw_Bin pkg
/libreoffice-draw
407 create_package_directory gid_Module_Prg_Wrt_Bin pkg
/libreoffice-writer
408 create_package_directory gid_Module_Prg_Impress_Bin pkg
/libreoffice-impress
409 create_package_directory gid_Module_Prg_Base_Bin pkg
/libreoffice-base
410 create_package_directory gid_Module_Brand_Prg_Calc pkg
/libreoffice-calc
411 create_package_directory gid_Module_Brand_Prg_Math pkg
/libreoffice-math
412 create_package_directory gid_Module_Brand_Prg_Draw pkg
/libreoffice-draw
413 create_package_directory gid_Module_Brand_Prg_Wrt pkg
/libreoffice-writer
414 create_package_directory gid_Module_Brand_Prg_Impress pkg
/libreoffice-impress
415 create_package_directory gid_Module_Brand_Prg_Base pkg
/libreoffice-base
416 create_package_directory gid_Module_Optional_Pyuno pkg
/python-uno
417 create_package_directory gid_Module_Optional_Gnome pkg
/libreoffice-gnome
418 create_package_directory gid_Module_Optional_Kde pkg
/libreoffice-kde
420 create_package_directory gid_Module_Root_Files_2 pkg
/libreoffice-common
421 create_package_directory gid_Module_Root_Files_3 pkg
/libreoffice-common
422 create_package_directory gid_Module_Root_Files_4 pkg
/libreoffice-common
423 create_package_directory gid_Module_Root_Files_5 pkg
/libreoffice-common
424 create_package_directory gid_Module_Root_Files_6 pkg
/libreoffice-common
425 create_package_directory gid_Module_Root_Files_7 pkg
/libreoffice-common
426 create_package_directory gid_Module_Optional_Testtool pkg
/libreoffice-qa-tools
427 if [ -e gid_Module_Optional_Pymailmerge
]; then
428 create_package_directory gid_Module_Optional_Pymailmerge pkg
/libreoffice-emailmerge
430 mkdir
-p pkg
/libreoffice-emailmerge
/$INSTALLDIR/basis
$PRODUCTVERSION/program
431 mv pkg
/libreoffice-common
/$INSTALLDIR/basis
$PRODUCTVERSION/program
/mailmerge.py \
432 pkg
/libreoffice-emailmerge
/$INSTALLDIR/basis
$PRODUCTVERSION/program
/mailmerge.py
434 create_package_directory gid_Module_Optional_OGLTrans pkg
/libreoffice-ogltrans
436 create_package_directory gid_Module_Root_SDK pkg
/libreoffice-dev
438 for l
in `echo $WITH_LANG_LIST`; do
439 for p
in Impress Draw Math Calc Base Writer
; do
440 create_package_directory gid_Module_Langpack_
${p}_
`echo $l | sed -e s/-/_/g` pkg
/libreoffice-l10n-
$l
442 create_package_directory gid_Module_Langpack_Basis_
`echo $l | sed -e s/-/_/g` pkg
/libreoffice-l10n-
$l
443 create_package_directory gid_Module_Langpack_Brand_
`echo $l | sed -e s/-/_/g` pkg
/libreoffice-l10n-
$l
444 create_package_directory gid_Module_Langpack_Resource_
`echo $l | sed -e s/-/_/g` pkg
/libreoffice-l10n-
$l
445 create_package_directory gid_Module_Helppack_Help_
`echo $l | sed -e s/-/_/g` pkg
/libreoffice-help-
$l
446 if [ -f gid_Module_Optional_Binfilter
]; then
447 if [ "$l" = "en-US" ]; then
448 create_package_directory gid_Module_Langpack_Binfilter_en_US pkg
/libreoffice-filter-binfilter
450 create_package_directory gid_Module_Langpack_Binfilter_
`echo $l | sed -e s/-/_/g` pkg
/libreoffice-l10n-
$l
453 # some help files are in _Langpack_{Writer,Impress,...}_<lang>
454 # move them from -l10n to -help
455 if [ "$l" = "en-US" ]; then d
=en
; else d
=$l; fi
456 mv pkg
/libreoffice-l10n-
$l/$INSTALLDIR/basis
$PRODUCTVERSION/help
/$d/* \
457 pkg
/libreoffice-help-
$l/$INSTALLDIR/basis
$PRODUCTVERSION/help
/$d && \
458 rmdir pkg
/libreoffice-l10n-
$l/$INSTALLDIR/basis
$PRODUCTVERSION/help
/$d
461 # move_wrappers <directory_name> <name> [...]
466 mkdir
-m755 -p "$directory"/usr
/bin
467 while test -n "$1"; do
468 mv usr
/*bin
/"$1$BINSUFFIX" "$directory"/usr
/bin
472 move_wrappers pkg
/libreoffice-common soffice unopkg
473 if test "$COMPAT_OOWRAPPERS" = "YES" ; then
474 move_wrappers pkg
/libreoffice-common ooffice oofromtemplate
475 move_wrappers pkg
/libreoffice-base oobase
476 move_wrappers pkg
/libreoffice-writer oowriter ooweb
477 move_wrappers pkg
/libreoffice-calc oocalc
478 move_wrappers pkg
/libreoffice-impress ooimpress
479 move_wrappers pkg
/libreoffice-math oomath
480 move_wrappers pkg
/libreoffice-draw oodraw
482 move_wrappers pkg
/libreoffice-common libreoffice lofromtemplate
483 move_wrappers pkg
/libreoffice-base lobase
484 move_wrappers pkg
/libreoffice-writer lowriter loweb
485 move_wrappers pkg
/libreoffice-calc localc
486 move_wrappers pkg
/libreoffice-impress loimpress
487 move_wrappers pkg
/libreoffice-math lomath
488 move_wrappers pkg
/libreoffice-draw lodraw
490 # Move all libraries, binaries, *.rdb from -common to -core
491 for d
in $INSTALLDIR/basis
$PRODUCTVERSION/program
$INSTALLDIR/program
; do \
492 if [ ! -d $DESTDIR/pkg
/libreoffice-core
/$d ]; then \
493 mkdir
-p $DESTDIR/pkg
/libreoffice-core
/$d; \
495 ( cd pkg
/libreoffice-common
/$d
497 -regex '\./\(.*\.so.*\|.*\.bin\|pagein\|nsplugin\|kdefilepicker\|msfontextract\|.*\.rdb\|javaldx\|uri-encode\)' \
498 -exec mv {} $DESTDIR/pkg
/libreoffice-core
/$d \
;
502 # install additional ooo-build scripts & misc stuff
503 mkdir
-p pkg
/libreoffice-common
/usr
/share
/man
/man1
504 if test "$COMPAT_OOWRAPPERS" = "YES" ; then
505 mv usr
/share
/man
/man
1/openoffice
$BINSUFFIX.1 \
506 pkg
/libreoffice-common
/usr
/share
/man
/man1
508 mv usr
/share
/man
/man
1/libreoffice
$BINSUFFIX.1 \
509 pkg
/libreoffice-common
/usr
/share
/man
/man1
510 mkdir
-p pkg
/libreoffice-common
/etc
/bash_completion.d
511 if test "$COMPAT_OOWRAPPERS" = "YES" ; then
512 mv etc
/bash_completion.d
/ooffice
$BINSUFFIX.sh \
513 pkg
/libreoffice-common
/etc
/bash_completion.d
515 mv etc
/bash_completion.d
/libreoffice
$BINSUFFIX.sh \
516 pkg
/libreoffice-common
/etc
/bash_completion.d
517 mv .
$INSTALLDIR/basis
$PRODUCTVERSION/program
/java-set-classpath \
518 pkg
/libreoffice-common
/$INSTALLDIR/program
519 if echo $WITH_LANG_LIST |
grep -q en-US
; then
520 for i
in forms
/resume.ott officorr
/project-proposal.ott
; do \
521 mkdir
-p pkg
/libreoffice-common
/$INSTALLDIR/basis
$PRODUCTVERSION/share
/template
/en-US
/`dirname $i`; \
522 mv .
$INSTALLDIR/basis
$PRODUCTVERSION/share
/template
/en-US
/$i \
523 pkg
/libreoffice-common
/$INSTALLDIR/basis
$PRODUCTVERSION/share
/template
/en-US
/$i; \
526 # Warn for any remaining files
527 find .
-path './pkg' -prune -o -not -name 'gid_Module_*' -not -type d
-exec echo "File not packaged: {}" \
;
530 # mark the config files
531 RPM_CONFIG_FILE_TAGS
=
532 if test "$OOO_VENDOR" = "Novell, Inc." -o "$OOO_VENDOR" = "RedHat"; then
533 RPM_CONFIG_FILE_TAGS
="%config"
534 elif test "$OOO_VENDOR" = "PLD" ; then
535 RPM_CONFIG_FILE_TAGS
="%config(noreplace) %verify(not md5 size mtime)"
538 if test "z$RPM_CONFIG_FILE_TAGS" != "z" ; then
540 perl
-pi -e "s|^($INSTALLDIR/help/.*\.xsl)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
541 -e "s|^($INSTALLDIR/help/.*\.css)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
542 -e "s|^($INSTALLDIR/program/[a-zA-Z0-9_\.]*rc)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
543 -e "s|^($INSTALLDIR/program/.*\.xsl)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
544 -e "s|^($INSTALLDIR/share/config/[a-zA-Z0-9]*rc)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
545 -e "s|^($INSTALLDIR/share/dict/ooo/.*\.lst)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
546 -e "s|^($INSTALLDIR/share/psprint/.*\.conf)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
547 -e "s|^($INSTALLDIR/share/registry/.*\.xcu)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
548 -e "s|^($INSTALLDIR/share/registry/.*\.properties)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
549 -e "s|^($INSTALLDIR/share/registry/.*\.xcs)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
550 -e "s|^($INSTALLDIR/user/config/.*\.so.)\$|$RPM_CONFIG_FILE_TAGS \\1|;" \
554 mkdir
-p $FILELISTSDIR/orig
555 mv -f $DESTDIR/gid_Module_
* $FILELISTSDIR/orig