130cfceefSAndrew Rist# *************************************************************
230cfceefSAndrew Rist#
330cfceefSAndrew Rist#  Licensed to the Apache Software Foundation (ASF) under one
430cfceefSAndrew Rist#  or more contributor license agreements.  See the NOTICE file
530cfceefSAndrew Rist#  distributed with this work for additional information
630cfceefSAndrew Rist#  regarding copyright ownership.  The ASF licenses this file
730cfceefSAndrew Rist#  to you under the Apache License, Version 2.0 (the
830cfceefSAndrew Rist#  "License"); you may not use this file except in compliance
930cfceefSAndrew Rist#  with the License.  You may obtain a copy of the License at
1030cfceefSAndrew Rist#
1130cfceefSAndrew Rist#    http://www.apache.org/licenses/LICENSE-2.0
1230cfceefSAndrew Rist#
1330cfceefSAndrew Rist#  Unless required by applicable law or agreed to in writing,
1430cfceefSAndrew Rist#  software distributed under the License is distributed on an
1530cfceefSAndrew Rist#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
1630cfceefSAndrew Rist#  KIND, either express or implied.  See the License for the
1730cfceefSAndrew Rist#  specific language governing permissions and limitations
1830cfceefSAndrew Rist#  under the License.
1930cfceefSAndrew Rist#
2030cfceefSAndrew Rist# *************************************************************
21cdf0e10cSrcweir# version and release passed by command-line
22cdf0e10cSrcweirVersion: %version
23cdf0e10cSrcweirRelease: %release
24cdf0e10cSrcweirSummary: %productname desktop integration
25cdf0e10cSrcweirName: %pkgprefix-mandriva-menus
26*891164acSAriel Constenla-HaileObsoletes: openoffice.org3.0-mandriva-menus
27*891164acSAriel Constenla-HaileObsoletes: openoffice.org3.1-mandriva-menus
28*891164acSAriel Constenla-HaileObsoletes: openoffice.org3.2-mandriva-menus
29*891164acSAriel Constenla-HaileObsoletes: openoffice.org3.3-mandriva-menus
30*891164acSAriel Constenla-HaileObsoletes: openoffice.org3.4-mandriva-menus
31cdf0e10cSrcweirGroup: Office
32bda541ebSArmin Le GrandLicense: ALv2
33cdf0e10cSrcweirAutoReqProv: no
34cdf0e10cSrcweirBuildArch: noarch
35cdf0e10cSrcweir#
36cdf0e10cSrcweir# FIXME: Limited Edition 2005 contains package mandrakelinux-release,
37cdf0e10cSrcweir#        which provides 'mandrake-release'. We should leave 'mandrake-release'
38cdf0e10cSrcweir#        here and check for the 'mandriva-release' in the future (next year).
39cdf0e10cSrcweir#
40cdf0e10cSrcweirRequires: mandrake-release
41599cc5b4SOliver-Rainer WittmannProvides: openoffice-desktop-integration
42cdf0e10cSrcweir
43cdf0e10cSrcweir%define _unpackaged_files_terminate_build 0
44cdf0e10cSrcweir%define _binary_filedigest_algorithm 1
45cdf0e10cSrcweir%define _binary_payload w9.gzdio
46cdf0e10cSrcweir
47cdf0e10cSrcweir%define menuversion %(echo %version|cut -d'.' -f 1-2)
48cdf0e10cSrcweir%{?!update_menus:%define update_menus if [ -x /usr/bin/update-menus ]; then /usr/bin/update-menus || true ; fi}
49cdf0e10cSrcweir%{?!trigger_clean_menus:%define trigger_clean_menus if [ "$2" = "0" -a -x /usr/bin/update-menus ]; then /usr/bin/update-menus || true ; fi}
50cdf0e10cSrcweir
51cdf0e10cSrcweir%description
52cdf0e10cSrcweir%productname desktop integration
53cdf0e10cSrcweir
54cdf0e10cSrcweir# Update menus
55cdf0e10cSrcweir#
56cdf0e10cSrcweir# - core02 for spadmin (printeradmin)
57cdf0e10cSrcweir#
58cdf0e10cSrcweir%triggerin -- %pkgprefix, %pkgprefix-core01 %pkgprefix-calc %pkgprefix-draw %pkgprefix-impress %pkgprefix-writer %pkgprefix-math %pkgprefix-core02
59cdf0e10cSrcweir%{update_menus}
60cdf0e10cSrcweir
61cdf0e10cSrcweir# Update menus
62cdf0e10cSrcweir#
63cdf0e10cSrcweir# - core02 for spadmin (printeradmin)
64cdf0e10cSrcweir#
65cdf0e10cSrcweir%triggerpostun -- %pkgprefix, %pkgprefix-core01 %pkgprefix-calc %pkgprefix-draw %pkgprefix-impress %pkgprefix-writer %pkgprefix-math %pkgprefix-core02
66cdf0e10cSrcweir%{trigger_clean_menus}
67cdf0e10cSrcweir
68cdf0e10cSrcweir%post
69cdf0e10cSrcweir
70cdf0e10cSrcweir# update /etc/mime.types
71cdf0e10cSrcweir# backing out existing entries to avoid duplicates
72cdf0e10cSrcweirsed '
73cdf0e10cSrcweir/application\/vnd\.oasis\.opendocument/d
74cdf0e10cSrcweir/application\/vnd\.openofficeorg/d
75cdf0e10cSrcweir/application\/vnd\.sun/d
76cdf0e10cSrcweir/application\/vnd\.stardivision/d
77cdf0e10cSrcweir' /etc/mime.types 2>/dev/null >> /etc/mime.types.tmp$$
78cdf0e10cSrcweir
79cdf0e10cSrcweir# now append our stuff to the temporary file
80cdf0e10cSrcweircat >> /etc/mime.types.tmp$$ << END
81cdf0e10cSrcweirapplication/vnd.oasis.opendocument.text	odt
82cdf0e10cSrcweirapplication/vnd.oasis.opendocument.text-template ott
83cdf0e10cSrcweirapplication/vnd.oasis.opendocument.text-web oth
84cdf0e10cSrcweirapplication/vnd.oasis.opendocument.text-master odm
85cdf0e10cSrcweirapplication/vnd.oasis.opendocument.graphics odg
86cdf0e10cSrcweirapplication/vnd.oasis.opendocument.graphics-template otg
87cdf0e10cSrcweirapplication/vnd.oasis.opendocument.presentation odp
88cdf0e10cSrcweirapplication/vnd.oasis.opendocument.presentation-template otp
89cdf0e10cSrcweirapplication/vnd.oasis.opendocument.spreadsheet ods
90cdf0e10cSrcweirapplication/vnd.oasis.opendocument.spreadsheet-template ots
91cdf0e10cSrcweirapplication/vnd.oasis.opendocument.chart odc
92cdf0e10cSrcweirapplication/vnd.oasis.opendocument.formula odf
93cdf0e10cSrcweirapplication/vnd.oasis.opendocument.image odi
94cdf0e10cSrcweirapplication/vnd.sun.xml.writer sxw
95cdf0e10cSrcweirapplication/vnd.sun.xml.writer.template stw
96cdf0e10cSrcweirapplication/vnd.sun.xml.writer.global sxg
97cdf0e10cSrcweirapplication/vnd.stardivision.writer sdw vor
98cdf0e10cSrcweirapplication/vnd.stardivision.writer-global sgl
99cdf0e10cSrcweirapplication/vnd.sun.xml.calc sxc
100cdf0e10cSrcweirapplication/vnd.sun.xml.calc.template stc
101cdf0e10cSrcweirapplication/vnd.stardivision.calc sdc
102cdf0e10cSrcweirapplication/vnd.stardivision.chart sds
103cdf0e10cSrcweirapplication/vnd.sun.xml.impress sxi
104cdf0e10cSrcweirapplication/vnd.sun.xml.impress.template sti
105cdf0e10cSrcweirapplication/vnd.stardivision.impress sdd sdp
106cdf0e10cSrcweirapplication/vnd.sun.xml.draw sxd
107cdf0e10cSrcweirapplication/vnd.sun.xml.draw.template std
108cdf0e10cSrcweirapplication/vnd.stardivision.draw sda
109cdf0e10cSrcweirapplication/vnd.sun.xml.math sxm
110cdf0e10cSrcweirapplication/vnd.stardivision.math smf
111cdf0e10cSrcweirapplication/vnd.sun.xml.base odb
112cdf0e10cSrcweirapplication/vnd.openofficeorg.extension oxt
113cdf0e10cSrcweirapplication/vnd.openxmlformats-officedocument.wordprocessingml.document docx
114cdf0e10cSrcweirapplication/vnd.ms-word.document.macroenabled.12 docm
115cdf0e10cSrcweirapplication/vnd.openxmlformats-officedocument.wordprocessingml.template dotx
116cdf0e10cSrcweirapplication/vnd.ms-word.template.macroenabled.12 dotm
117cdf0e10cSrcweirapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
118cdf0e10cSrcweirapplication/vnd.ms-excel.sheet.macroenabled.12 xlsm
119cdf0e10cSrcweirapplication/vnd.openxmlformats-officedocument.spreadsheetml.template xltx
120cdf0e10cSrcweirapplication/vnd.ms-excel.template.macroenabled.12 xltm
121cdf0e10cSrcweirapplication/vnd.openxmlformats-officedocument.presentationml.presentation pptx
122cdf0e10cSrcweirapplication/vnd.ms-powerpoint.presentation.macroenabled.12 pptm
123cdf0e10cSrcweirapplication/vnd.openxmlformats-officedocument.presentationml.template potx
124cdf0e10cSrcweirapplication/vnd.ms-powerpoint.template.macroenabled.12 potm
125cdf0e10cSrcweirEND
126cdf0e10cSrcweir
127cdf0e10cSrcweir# and replace the original file
128cdf0e10cSrcweirmv -f /etc/mime.types.tmp$$ /etc/mime.types 2>/dev/null
129cdf0e10cSrcweir
130cdf0e10cSrcweir# update /etc/mailcap only at initial install
131cdf0e10cSrcweirif [ "$1" = 1 ]
132cdf0e10cSrcweirthen
133cdf0e10cSrcweir  # backing out existing entries to avoid duplicates
134cdf0e10cSrcweir  sed '
135cdf0e10cSrcweir/^# OpenOffice.org/d
136cdf0e10cSrcweir/^application\/vnd\.oasis\.opendocument/d
137cdf0e10cSrcweir/^application\/vnd\.openofficeorg/d
138cdf0e10cSrcweir/^application\/vnd\.sun/d
139cdf0e10cSrcweir/^application\/vnd\.stardivision/d
140cdf0e10cSrcweir/^application\/vnd\.ms-word/d
141cdf0e10cSrcweir/^application\/vnd\.ms-excel/d
142cdf0e10cSrcweir/^application\/vnd\.ms-powerpoint/d
143cdf0e10cSrcweir/^application\/x-star/d
144cdf0e10cSrcweir/excel/d
145cdf0e10cSrcweir/ms[-]*word/d
146cdf0e10cSrcweir/powerpoint/d
147cdf0e10cSrcweir' /etc/mailcap 2>/dev/null >> /etc/mailcap.tmp$$
148cdf0e10cSrcweir
149cdf0e10cSrcweir  # now append our stuff to the temporary file
150cdf0e10cSrcweir  cat >> /etc/mailcap.tmp$$ << END
151bda541ebSArmin Le Grand# Apache OpenOffice
152cdf0e10cSrcweirapplication/vnd.oasis.opendocument.text; %unixfilename -view %s
153cdf0e10cSrcweirapplication/vnd.oasis.opendocument.text-template; %unixfilename -view %s
154cdf0e10cSrcweirapplication/vnd.oasis.opendocument.text-web; %unixfilename -view %s
155cdf0e10cSrcweirapplication/vnd.oasis.opendocument.text-master; %unixfilename -view %s
156cdf0e10cSrcweirapplication/vnd.sun.xml.writer; %unixfilename -view %s
157cdf0e10cSrcweirapplication/vnd.sun.xml.writer.template; %unixfilename -view %s
158cdf0e10cSrcweirapplication/vnd.sun.xml.writer.global; %unixfilename -view %s
159cdf0e10cSrcweirapplication/vnd.stardivision.writer; %unixfilename -view %s
160cdf0e10cSrcweirapplication/vnd.stardivision.writer-global; %unixfilename -view %s
161cdf0e10cSrcweirapplication/x-starwriter; %unixfilename -view %s
162cdf0e10cSrcweirapplication/vnd.oasis.opendocument.formula; %unixfilename -view %s
163cdf0e10cSrcweirapplication/vnd.sun.xml.math; %unixfilename -view %s
164cdf0e10cSrcweirapplication/vnd.stardivision.math; %unixfilename -view %s
165cdf0e10cSrcweirapplication/x-starmath; %unixfilename -view %s
166cdf0e10cSrcweirapplication/msword; %unixfilename -view %s
167cdf0e10cSrcweirapplication/vnd.oasis.opendocument.spreadsheet; %unixfilename -view %s
168cdf0e10cSrcweirapplication/vnd.oasis.opendocument.spreadsheet-template; %unixfilename -view %s
169cdf0e10cSrcweirapplication/vnd.sun.xml.calc; %unixfilename -view %s
170cdf0e10cSrcweirapplication/vnd.sun.xml.calc.template; %unixfilename -view %s
171cdf0e10cSrcweirapplication/vnd.stardivision.calc; %unixfilename -view %s
172cdf0e10cSrcweirapplication/x-starcalc; %unixfilename -view %s
173cdf0e10cSrcweirapplication/vnd.stardivision.chart; %unixfilename -view %s
174cdf0e10cSrcweirapplication/x-starchart; %unixfilename -view %s
175cdf0e10cSrcweirapplication/excel; %unixfilename -view %s
176cdf0e10cSrcweirapplication/msexcel; %unixfilename -view %s
177cdf0e10cSrcweirapplication/vnd.ms-excel; %unixfilename -view %s
178cdf0e10cSrcweirapplication/x-msexcel; %unixfilename -view %s
179cdf0e10cSrcweirapplication/vnd.oasis.opendocument.presentation; %unixfilename -view %s
180cdf0e10cSrcweirapplication/vnd.oasis.opendocument.presentation-template; %unixfilename -view %s
181cdf0e10cSrcweirapplication/vnd.sun.xml.impress; %unixfilename -view %s
182cdf0e10cSrcweirapplication/vnd.sun.xml.impress.template; %unixfilename -view %s
183cdf0e10cSrcweirapplication/vnd.stardivision.impress; %unixfilename -view %s
184cdf0e10cSrcweirapplication/x-starimpress; %unixfilename -view %s
185cdf0e10cSrcweirapplication/powerpoint; %unixfilename -view %s
186cdf0e10cSrcweirapplication/mspowerpoint; %unixfilename -view %s
187cdf0e10cSrcweirapplication/vnd.ms-powerpoint; %unixfilename -view %s
188cdf0e10cSrcweirapplication/x-mspowerpoint; %unixfilename -view %s
189cdf0e10cSrcweirapplication/vnd.oasis.opendocument.graphics; %unixfilename -view %s
190cdf0e10cSrcweirapplication/vnd.oasis.opendocument.graphics-template; %unixfilename -view %s
191cdf0e10cSrcweirapplication/vnd.sun.xml.draw; %unixfilename -view %s
192cdf0e10cSrcweirapplication/vnd.sun.xml.draw.template; %unixfilename -view %s
193cdf0e10cSrcweirapplication/vnd.stardivision.draw; %unixfilename -view %s
194cdf0e10cSrcweirapplication/x-stardraw; %unixfilename -view %s
195cdf0e10cSrcweirapplication/vnd.oasis.opendocument.database; %unixfilename -view %s
196cdf0e10cSrcweirapplication/vnd.sun.xml.base; %unixfilename -view %s
197cdf0e10cSrcweirapplication/vnd.openofficeorg.extension; %unixfilename %s
198cdf0e10cSrcweirapplication/vnd.openxmlformats-officedocument.wordprocessingml.document; %unixfilename -view %s
199cdf0e10cSrcweirapplication/vnd.ms-word.document.macroenabled.12;%unixfilename -view %s
200cdf0e10cSrcweirapplication/vnd.openxmlformats-officedocument.wordprocessingml.template; %unixfilename -view %s
201cdf0e10cSrcweirapplication/vnd.ms-word.template.macroenabled.12; %unixfilename -view %s
202cdf0e10cSrcweirapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet; %unixfilename -view %s
203cdf0e10cSrcweirapplication/vnd.ms-excel.sheet.macroenabled.12; %unixfilename -view %s
204cdf0e10cSrcweirapplication/vnd.openxmlformats-officedocument.spreadsheetml.template; %unixfilename -view %s
205cdf0e10cSrcweirapplication/vnd.ms-excel.template.macroenabled.12; %unixfilename -view %s
206cdf0e10cSrcweirapplication/vnd.openxmlformats-officedocument.presentationml.presentation; %unixfilename -view %s
207cdf0e10cSrcweirapplication/vnd.ms-powerpoint.presentation.macroenabled.12; %unixfilename -view %s
208cdf0e10cSrcweirapplication/vnd.openxmlformats-officedocument.presentationml.template; %unixfilename -view %s
209cdf0e10cSrcweirapplication/vnd.ms-powerpoint.template.macroenabled.12; %unixfilename -view %s
210cdf0e10cSrcweirEND
211cdf0e10cSrcweir
212cdf0e10cSrcweir  # and replace the original file
213cdf0e10cSrcweir  mv -f /etc/mailcap.tmp$$ /etc/mailcap
214cdf0e10cSrcweirfi
215cdf0e10cSrcweir
216cdf0e10cSrcweir%{update_menus}
217cdf0e10cSrcweir
218cdf0e10cSrcweir
219cdf0e10cSrcweir%install
220cdf0e10cSrcweirrm -rf $RPM_BUILD_ROOT/*
221cdf0e10cSrcweir
222cdf0e10cSrcweir# hack/workaround to make SuSE's brp-symlink-script happy. It wants the targets of all links
223cdf0e10cSrcweir# to be present on the build-system/the buildroot. But the point is that we generate stale
224cdf0e10cSrcweir# links intentionally (until we find a better solution) #46226
225cdf0e10cSrcweirexport NO_BRP_STALE_LINK_ERROR=yes
226cdf0e10cSrcweir
227cdf0e10cSrcweirmkdir -p $RPM_BUILD_ROOT
228cdf0e10cSrcweir
229cdf0e10cSrcweirexport DESTDIR=$RPM_BUILD_ROOT
230cdf0e10cSrcweirexport KDEMAINDIR=/usr
231cdf0e10cSrcweirexport GNOMEDIR=/usr
232cdf0e10cSrcweir
233cdf0e10cSrcweir./create_tree.sh
234cdf0e10cSrcweir
235cdf0e10cSrcweir#
236cdf0e10cSrcweir# Mandriva menus fun
237cdf0e10cSrcweir#
238cdf0e10cSrcweir# For more info, see:
239cdf0e10cSrcweir#
240cdf0e10cSrcweir#   http://qa.mandriva.com/twiki/bin/view/Main/MenuSystem
241cdf0e10cSrcweir#
242cdf0e10cSrcweir%define _menudir /usr/lib/menu
243cdf0e10cSrcweirmkdir -p $RPM_BUILD_ROOT%{_menudir}
244cdf0e10cSrcweirrm -f "$RPM_BUILD_ROOT%{_menudir}/%{name}"
245cdf0e10cSrcweir
246cdf0e10cSrcweirGenerateMenu() {
247cdf0e10cSrcweir[ -f "$RPM_BUILD_ROOT%{_menudir}/%{name}" ] || touch $RPM_BUILD_ROOT%{_menudir}/%{name}
248cdf0e10cSrcweirmimetypes_item=
249cdf0e10cSrcweir[ "$7" != "" ] && mimetypes_item="mimetypes=\"$7\""
250cdf0e10cSrcweircat >> $RPM_BUILD_ROOT%{_menudir}/%{name} << EOF
251cdf0e10cSrcweir?package(%pkgprefix-$6): needs=x11 section="$2" icon="%iconprefix-$3.png" title="$4" longtitle="$5" command="$1" \
252cdf0e10cSrcweir$mimetypes_item kde_opt="InitialPreference=100" startup_notify="true"
253cdf0e10cSrcweirEOF
254cdf0e10cSrcweir}
255cdf0e10cSrcweir
256cdf0e10cSrcweir#
257cdf0e10cSrcweir# FIXME: Office/Database request in the Cooker ML, leave in Spreadsheets
258cdf0e10cSrcweir# until new group will be created
259cdf0e10cSrcweir#
260cdf0e10cSrcweirGenerateMenu "%unixfilename -base" \
261cdf0e10cSrcweir	"More Applications/Databases" \
262cdf0e10cSrcweir	"base" \
263cdf0e10cSrcweir	"%productname %{menuversion} Base" \
264cdf0e10cSrcweir	"%productname %{menuversion} Database" \
265cdf0e10cSrcweir	"core01" \
266cdf0e10cSrcweir	"application/vnd.oasis.opendocument.database,application/vnd.sun.xml.base"
267cdf0e10cSrcweir
268cdf0e10cSrcweirGenerateMenu "%unixfilename -calc" \
269cdf0e10cSrcweir	"Office/Spreadsheets" \
270cdf0e10cSrcweir	"calc" \
271cdf0e10cSrcweir	"%productname %{menuversion} Calc" \
272cdf0e10cSrcweir	"%productname %{menuversion} Spreadsheet" \
273cdf0e10cSrcweir	"calc" \
274cdf0e10cSrcweir	"application/vnd.oasis.opendocument.spreadsheet,application/vnd.oasis.opendocument.spreadsheet-template,application/vnd.sun.xml.calc,application/vnd.sun.xml.calc.template,application/vnd.stardivision.calc,application/vnd.stardivision.chart,application/msexcel,application/vnd.ms-excel"
275cdf0e10cSrcweir
276cdf0e10cSrcweirGenerateMenu "%unixfilename -draw" \
277cdf0e10cSrcweir	"Office/Drawing" \
278cdf0e10cSrcweir	"draw" \
279cdf0e10cSrcweir	"%productname %{menuversion} Draw" \
280cdf0e10cSrcweir	"%productname %{menuversion} Drawing" \
281cdf0e10cSrcweir	"draw" \
282cdf0e10cSrcweir	"application/vnd.oasis.opendocument.graphics,application/vnd.oasis.opendocument.graphics-template,application/vnd.sun.xml.draw,application/vnd.sun.xml.draw.template,application/vnd.stardivision.draw"
283cdf0e10cSrcweir
284cdf0e10cSrcweirGenerateMenu "%unixfilename -impress" \
285cdf0e10cSrcweir	"Office/Presentations" \
286cdf0e10cSrcweir	"impress" \
287cdf0e10cSrcweir	"%productname %{menuversion} Impress" \
288cdf0e10cSrcweir	"%productname %{menuversion} Presentation" \
289cdf0e10cSrcweir	"impress" \
290cdf0e10cSrcweir	"application/vnd.oasis.opendocument.presentation,application/vnd.oasis.opendocument.presentation-template,application/vnd.sun.xml.impress,application/vnd.sun.xml.impress.template,application/vnd.stardivision.impress,application/mspowerpoint"
291cdf0e10cSrcweir
292cdf0e10cSrcweirGenerateMenu "%unixfilename -writer" \
293cdf0e10cSrcweir	"Office/Wordprocessors" \
294cdf0e10cSrcweir	"writer" \
295cdf0e10cSrcweir	"%productname %{menuversion} Writer" \
296cdf0e10cSrcweir	"%productname %{menuversion} Word Processing Component" \
297cdf0e10cSrcweir	"writer" \
298cdf0e10cSrcweir	"application/vnd.oasis.opendocument.text,application/vnd.oasis.opendocument.text-template,application/vnd.oasis.opendocument.text-web,application/vnd.oasis.opendocument.text-master,application/vnd.sun.xml.writer,application/vnd.sun.xml.writer.template,application/vnd.sun.xml.writer.global,application/vnd.stardivision.writer,application/msword,application/vnd.ms-word,application/x-doc,application/rtf"
299cdf0e10cSrcweir
300cdf0e10cSrcweirGenerateMenu "%unixfilename -math" \
301cdf0e10cSrcweir	"Office/Wordprocessors" \
302cdf0e10cSrcweir	"math" \
303cdf0e10cSrcweir	"%productname %{menuversion} Math" \
304cdf0e10cSrcweir	"%productname %{menuversion} Formula Editor" \
305cdf0e10cSrcweir	"math" \
306cdf0e10cSrcweir	"application/vnd.oasis.opendocument.formula,application/vnd.sun.xml.math,application/vnd.stardivision.math"
307cdf0e10cSrcweir
308cdf0e10cSrcweir#
309cdf0e10cSrcweir# FIXME: Is there a better group than System/Configuration/Printing? I think no ...
310cdf0e10cSrcweir#
311cdf0e10cSrcweirGenerateMenu "%unixfilename-printeradmin" \
312cdf0e10cSrcweir    "System/Configuration/Printing" \
313cdf0e10cSrcweir    "printeradmin" \
314cdf0e10cSrcweir    "%productname %{menuversion} Printeradmin" \
315cdf0e10cSrcweir    "%productname %{menuversion} Printer Administration" \
316cdf0e10cSrcweir	"core02"
317cdf0e10cSrcweir
318cdf0e10cSrcweir%clean
319cdf0e10cSrcweirrm -rf $RPM_BUILD_ROOT
320cdf0e10cSrcweir
321cdf0e10cSrcweir%preun
322cdf0e10cSrcweir# remove from /etc/mailcap only on de-install
323cdf0e10cSrcweirif [ "$1" = 0 ]
324cdf0e10cSrcweirthen
325cdf0e10cSrcweir  # backing all entries pointing to our binary
326cdf0e10cSrcweir  sed '/%unixfilename/d' /etc/mailcap 2>/dev/null >> /etc/mailcap.tmp$$
327cdf0e10cSrcweir
328cdf0e10cSrcweir  # and replace the original file
329cdf0e10cSrcweir  mv -f /etc/mailcap.tmp$$ /etc/mailcap
330cdf0e10cSrcweirfi
331cdf0e10cSrcweir
332cdf0e10cSrcweir%postun
333cdf0e10cSrcweir%{update_menus}
334cdf0e10cSrcweir
335cdf0e10cSrcweir
336cdf0e10cSrcweir%files
337cdf0e10cSrcweir%attr(0755,root,root) /usr/bin/soffice
338cdf0e10cSrcweir%attr(0755,root,root) %verify(not size md5) /usr/bin/%unixfilename
339cdf0e10cSrcweir%attr(0755,root,root) /usr/bin/%unixfilename-printeradmin
340cdf0e10cSrcweir%defattr(0644, root, root)
341cdf0e10cSrcweir%{_menudir}/%{name}
342cdf0e10cSrcweir/usr/share/application-registry/*.applications
343cdf0e10cSrcweir/usr/share/applications/%unixfilename-writer.desktop
344cdf0e10cSrcweir/usr/share/applications/%unixfilename-calc.desktop
345cdf0e10cSrcweir/usr/share/applications/%unixfilename-draw.desktop
346cdf0e10cSrcweir/usr/share/applications/%unixfilename-impress.desktop
347cdf0e10cSrcweir/usr/share/applications/%unixfilename-math.desktop
348cdf0e10cSrcweir/usr/share/applications/%unixfilename-base.desktop
349cdf0e10cSrcweir/usr/share/applications/%unixfilename-printeradmin.desktop
350cdf0e10cSrcweir/usr/share/applications/%unixfilename-startcenter.desktop
351cdf0e10cSrcweir/usr/share/mime-info/*.keys
352cdf0e10cSrcweir/usr/share/mime-info/*.mime
353cdf0e10cSrcweir/usr/share/mimelnk/application/*.desktop
354cdf0e10cSrcweir/usr/share/icons/gnome/*/apps/*png
355cdf0e10cSrcweir/usr/share/icons/gnome/*/mimetypes/*png
356cdf0e10cSrcweir/usr/share/icons/hicolor/*/apps/*png
357cdf0e10cSrcweir/usr/share/icons/hicolor/*/mimetypes/*png
358cdf0e10cSrcweir/usr/share/icons/locolor/*/apps/*png
359cdf0e10cSrcweir/usr/share/icons/locolor/*/mimetypes/*png
360cdf0e10cSrcweir
361