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-freedesktop-menus 26cdf0e10cSrcweir#BuildRequires: sed 27cdf0e10cSrcweir#BuildRequires: perl 28cdf0e10cSrcweirGroup: Office 29bda541ebSArmin Le GrandLicense: ALv2 30599cc5b4SOliver-Rainer WittmannProvides: openoffice-desktop-integration 31cdf0e10cSrcweirConflicts: %pkgprefix-suse-menus 32cdf0e10cSrcweirConflicts: %pkgprefix-debian-menus 33cdf0e10cSrcweirConflicts: %pkgprefix-redhat-menus 34cdf0e10cSrcweirConflicts: %pkgprefix-mandriva-menus 35*891164acSAriel Constenla-HaileObsoletes: openoffice.org3.0-freedesktop-menus 36*891164acSAriel Constenla-HaileObsoletes: openoffice.org3.1-freedesktop-menus 37*891164acSAriel Constenla-HaileObsoletes: openoffice.org3.2-freedesktop-menus 38*891164acSAriel Constenla-HaileObsoletes: openoffice.org3.3-freedesktop-menus 39*891164acSAriel Constenla-HaileObsoletes: openoffice.org3.4-freedesktop-menus 40cdf0e10cSrcweirBuildArch: noarch 41cdf0e10cSrcweirAutoReqProv: no 42cdf0e10cSrcweir%define _binary_filedigest_algorithm 1 43cdf0e10cSrcweir%define _binary_payload w9.gzdio 44cdf0e10cSrcweir 45cdf0e10cSrcweir%description 46cdf0e10cSrcweir%productname desktop integration for desktop-environments that implement 47cdf0e10cSrcweirthe menu- and mime-related specifications from http://www.freedesktop.org 48cdf0e10cSrcweirInstall this package if you're using a distribution not covered by any of 49cdf0e10cSrcweirthe other %pkgprefix-<distribution>-menus packages. 50cdf0e10cSrcweir 51cdf0e10cSrcweir%install 52cdf0e10cSrcweirrm -rf $RPM_BUILD_ROOT 53cdf0e10cSrcweir 54cdf0e10cSrcweir# hack/workaround to make SuSE's brp-symlink-script happy. It wants the targets of all links 55cdf0e10cSrcweir# to be present on the build-system/the buildroot. But the point is that we generate stale 56cdf0e10cSrcweir# links intentionally (until we find a better solution) #46226 57cdf0e10cSrcweirexport NO_BRP_STALE_LINK_ERROR=yes 58cdf0e10cSrcweir 59cdf0e10cSrcweirmkdir -p $RPM_BUILD_ROOT 60cdf0e10cSrcweir 61cdf0e10cSrcweir# FIXME: remove - only purpose is to create packages identical to OOF680 m8 62cdf0e10cSrcweirumask 0000 63cdf0e10cSrcweir 64cdf0e10cSrcweir# set parameters for the create_tree script 65cdf0e10cSrcweirexport DESTDIR=$RPM_BUILD_ROOT 66cdf0e10cSrcweirexport KDEMAINDIR=/usr 67cdf0e10cSrcweirexport GNOMEDIR=/usr 68cdf0e10cSrcweirexport GNOME_MIME_THEME=hicolor 69cdf0e10cSrcweir 70cdf0e10cSrcweir./create_tree.sh 71cdf0e10cSrcweir 72cdf0e10cSrcweircd $RPM_BUILD_ROOT 73cdf0e10cSrcweir 74cdf0e10cSrcweir# freedesktop-based desktop-environments don't need/use this. 75cdf0e10cSrcweirrm -rf usr/share/application-registry 76cdf0e10cSrcweirrm -rf usr/share/applications.flag 77cdf0e10cSrcweirrm -rf usr/share/mime-info 78cdf0e10cSrcweirrm -rf usr/share/mimelnk 79cdf0e10cSrcweirrm -rf usr/share/applnk-redhat 80cdf0e10cSrcweir#find usr/share/icons -name '*.png' -exec chmod g+w {} \; 81cdf0e10cSrcweir 82cdf0e10cSrcweir%clean 83cdf0e10cSrcweirrm -rf $RPM_BUILD_ROOT 84cdf0e10cSrcweir 85cdf0e10cSrcweir%triggerin -- %pkgprefix, %pkgprefix-writer, %pkgprefix-calc, %pkgprefix-draw, %pkgprefix-impress, %pkgprefix-math 86cdf0e10cSrcweir# this is run when one of the above packages is already installed and the menu 87cdf0e10cSrcweir# package gets installed OR when the menu-package is already installed and one 88cdf0e10cSrcweir# of the above listed packages gets installed 89cdf0e10cSrcweir 90cdf0e10cSrcweir# Dut to a bug in rpm it is not possible to check why the script is triggered... 91cdf0e10cSrcweir# This is how it should be: 1st arg: number of this package, 2nd arg: number of 92cdf0e10cSrcweir# package that triggers - the bug is that rpm reports the same number for both 93cdf0e10cSrcweir# (the value of the 2nd one), so just run this always... 94cdf0e10cSrcweir# http://rhn.redhat.com/errata/RHBA-2004-098.html 95cdf0e10cSrcweir# https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100509 96cdf0e10cSrcweir 97cdf0e10cSrcweirif [ -x /opt/gnome/bin/update-desktop-database ]; then 98cdf0e10cSrcweir /opt/gnome/bin/update-desktop-database -q 99cdf0e10cSrcweirelif (which update-desktop-database); then 100cdf0e10cSrcweir update-desktop-database -q /usr/share/applications 101cdf0e10cSrcweirfi 102cdf0e10cSrcweir 103cdf0e10cSrcweir%triggerun -- %pkgprefix, %pkgprefix-writer, %pkgprefix-calc, %pkgprefix-draw, %pkgprefix-impress, %pkgprefix-math 104cdf0e10cSrcweirif [ "$1" = "0" ] ; then 105cdf0e10cSrcweir # the menu-package gets uninstalled/updated - postun will run the command 106cdf0e10cSrcweir exit 0 107cdf0e10cSrcweirfi 108cdf0e10cSrcweirif [ "$2" = "0" ] ; then 109cdf0e10cSrcweir # the triggering package gets removed 110cdf0e10cSrcweir if [ -x /opt/gnome/bin/update-desktop-database ]; then 111cdf0e10cSrcweir /opt/gnome/bin/update-desktop-database -q 112cdf0e10cSrcweir elif (which update-desktop-database); then 113cdf0e10cSrcweir update-desktop-database -q /usr/share/applications 114cdf0e10cSrcweir fi 115cdf0e10cSrcweirfi 116cdf0e10cSrcweir 117cdf0e10cSrcweir%post 118cdf0e10cSrcweir# no need to run it when updating, since %postun of the old package is run 119cdf0e10cSrcweir# afterwards 120cdf0e10cSrcweir 121cdf0e10cSrcweirif [ "$1" = "1" ] ; then # first install 122cdf0e10cSrcweir if [ -x /opt/gnome/bin/update-desktop-database ]; then 123cdf0e10cSrcweir /opt/gnome/bin/update-desktop-database -q 124cdf0e10cSrcweir elif (which update-desktop-database); then 125cdf0e10cSrcweir update-desktop-database -q /usr/share/applications 126cdf0e10cSrcweir fi 127cdf0e10cSrcweir 128cdf0e10cSrcweir if (which update-mime-database); then 129cdf0e10cSrcweir update-mime-database /usr/share/mime 130cdf0e10cSrcweir fi 131cdf0e10cSrcweirfi 132cdf0e10cSrcweir 133cdf0e10cSrcweir 134cdf0e10cSrcweir#run always 135cdf0e10cSrcweirfor theme in gnome hicolor locolor; do 136cdf0e10cSrcweir if [ -e /usr/share/icons/$theme/icon-theme.cache ] ; then 137cdf0e10cSrcweir # touch it, just in case we cannot find the binary... 138cdf0e10cSrcweir touch /usr/share/icons/$theme 139cdf0e10cSrcweir if [ -x /opt/gnome/bin/gtk-update-icon-cache ]; then 140cdf0e10cSrcweir /opt/gnome/bin/gtk-update-icon-cache -q /usr/share/icons/$theme 141cdf0e10cSrcweir elif (which gtk-update-icon-cache); then 142cdf0e10cSrcweir gtk-update-icon-cache -q /usr/share/icons/$theme 143cdf0e10cSrcweir fi 144cdf0e10cSrcweir # ignore errors (e.g. when there is a cache, but no index.theme) 145cdf0e10cSrcweir true 146cdf0e10cSrcweir fi 147cdf0e10cSrcweirdone 148cdf0e10cSrcweir 149cdf0e10cSrcweir 150cdf0e10cSrcweir# update /etc/mime.types 151cdf0e10cSrcweir# backing out existing entries to avoid duplicates 152cdf0e10cSrcweirsed ' 153cdf0e10cSrcweir/application\/vnd\.oasis\.opendocument/d 154cdf0e10cSrcweir/application\/vnd\.sun/d 155cdf0e10cSrcweir/application\/vnd\.stardivision/d 156cdf0e10cSrcweir/application\/vnd\.openofficeorg/d 157cdf0e10cSrcweir' /etc/mime.types 2>/dev/null >> /etc/mime.types.tmp$$ 158cdf0e10cSrcweir 159cdf0e10cSrcweir# now append our stuff to the temporary file 160cdf0e10cSrcweircat >> /etc/mime.types.tmp$$ << END 161cdf0e10cSrcweirapplication/vnd.oasis.opendocument.text odt 162cdf0e10cSrcweirapplication/vnd.oasis.opendocument.text-template ott 163cdf0e10cSrcweirapplication/vnd.oasis.opendocument.text-web oth 164cdf0e10cSrcweirapplication/vnd.oasis.opendocument.text-master odm 165cdf0e10cSrcweirapplication/vnd.oasis.opendocument.graphics odg 166cdf0e10cSrcweirapplication/vnd.oasis.opendocument.graphics-template otg 167cdf0e10cSrcweirapplication/vnd.oasis.opendocument.presentation odp 168cdf0e10cSrcweirapplication/vnd.oasis.opendocument.presentation-template otp 169cdf0e10cSrcweirapplication/vnd.oasis.opendocument.spreadsheet ods 170cdf0e10cSrcweirapplication/vnd.oasis.opendocument.spreadsheet-template ots 171cdf0e10cSrcweirapplication/vnd.oasis.opendocument.chart odc 172cdf0e10cSrcweirapplication/vnd.oasis.opendocument.formula odf 173cdf0e10cSrcweirapplication/vnd.oasis.opendocument.image odi 174cdf0e10cSrcweirapplication/vnd.sun.xml.writer sxw 175cdf0e10cSrcweirapplication/vnd.sun.xml.writer.template stw 176cdf0e10cSrcweirapplication/vnd.sun.xml.writer.global sxg 177cdf0e10cSrcweirapplication/vnd.stardivision.writer sdw vor 178cdf0e10cSrcweirapplication/vnd.stardivision.writer-global sgl 179cdf0e10cSrcweirapplication/vnd.sun.xml.calc sxc 180cdf0e10cSrcweirapplication/vnd.sun.xml.calc.template stc 181cdf0e10cSrcweirapplication/vnd.stardivision.calc sdc 182cdf0e10cSrcweirapplication/vnd.stardivision.chart sds 183cdf0e10cSrcweirapplication/vnd.sun.xml.impress sxi 184cdf0e10cSrcweirapplication/vnd.sun.xml.impress.template sti 185cdf0e10cSrcweirapplication/vnd.stardivision.impress sdd sdp 186cdf0e10cSrcweirapplication/vnd.sun.xml.draw sxd 187cdf0e10cSrcweirapplication/vnd.sun.xml.draw.template std 188cdf0e10cSrcweirapplication/vnd.stardivision.draw sda 189cdf0e10cSrcweirapplication/vnd.sun.xml.math sxm 190cdf0e10cSrcweirapplication/vnd.sun.xml.base odb 191cdf0e10cSrcweirapplication/vnd.stardivision.math smf 192cdf0e10cSrcweirapplication/vnd.openofficeorg.extension oxt 193cdf0e10cSrcweirapplication/vnd.openxmlformats-officedocument.wordprocessingml.document docx 194cdf0e10cSrcweirapplication/vnd.ms-word.document.macroenabled.12 docm 195cdf0e10cSrcweirapplication/vnd.openxmlformats-officedocument.wordprocessingml.template dotx 196cdf0e10cSrcweirapplication/vnd.ms-word.template.macroenabled.12 dotm 197cdf0e10cSrcweirapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx 198cdf0e10cSrcweirapplication/vnd.ms-excel.sheet.macroenabled.12 xlsm 199cdf0e10cSrcweirapplication/vnd.openxmlformats-officedocument.spreadsheetml.template xltx 200cdf0e10cSrcweirapplication/vnd.ms-excel.template.macroenabled.12 xltm 201cdf0e10cSrcweirapplication/vnd.openxmlformats-officedocument.presentationml.presentation pptx 202cdf0e10cSrcweirapplication/vnd.ms-powerpoint.presentation.macroenabled.12 pptm 203cdf0e10cSrcweirapplication/vnd.openxmlformats-officedocument.presentationml.template potx 204cdf0e10cSrcweirapplication/vnd.ms-powerpoint.template.macroenabled.12 potm 205cdf0e10cSrcweirEND 206cdf0e10cSrcweir 207cdf0e10cSrcweir# and replace the original file 208cdf0e10cSrcweirmv -f /etc/mime.types.tmp$$ /etc/mime.types 2>/dev/null 209cdf0e10cSrcweir 210cdf0e10cSrcweir# update /etc/mailcap only at initial install 211cdf0e10cSrcweirif [ "$1" = 1 ] 212cdf0e10cSrcweirthen 213cdf0e10cSrcweir # backing out existing entries to avoid duplicates 214cdf0e10cSrcweir sed ' 215cdf0e10cSrcweir/^# OpenOffice.org/d 216cdf0e10cSrcweir/^application\/vnd\.oasis\.opendocument/d 217cdf0e10cSrcweir/^application\/vnd\.openofficeorg/d 218cdf0e10cSrcweir/^application\/vnd\.sun/d 219cdf0e10cSrcweir/^application\/vnd\.stardivision/d 220cdf0e10cSrcweir/^application\/vnd\.ms-word/d 221cdf0e10cSrcweir/^application\/vnd\.ms-excel/d 222cdf0e10cSrcweir/^application\/vnd\.ms-powerpoint/d 223cdf0e10cSrcweir/^application\/x-star/d 224cdf0e10cSrcweir/excel/d 225cdf0e10cSrcweir/ms[-]*word/d 226cdf0e10cSrcweir/powerpoint/d 227cdf0e10cSrcweir' /etc/mailcap 2>/dev/null >> /etc/mailcap.tmp$$ 228cdf0e10cSrcweir 229cdf0e10cSrcweir # now append our stuff to the temporary file 230cdf0e10cSrcweir cat >> /etc/mailcap.tmp$$ << END 231bda541ebSArmin Le Grand# Apache OpenOffice 232cdf0e10cSrcweirapplication/vnd.oasis.opendocument.text; %unixfilename -view %s 233cdf0e10cSrcweirapplication/vnd.oasis.opendocument.text-template; %unixfilename -view %s 234cdf0e10cSrcweirapplication/vnd.oasis.opendocument.text-web; %unixfilename -view %s 235cdf0e10cSrcweirapplication/vnd.oasis.opendocument.text-master; %unixfilename -view %s 236cdf0e10cSrcweirapplication/vnd.sun.xml.writer; %unixfilename -view %s 237cdf0e10cSrcweirapplication/vnd.sun.xml.writer.template; %unixfilename -view %s 238cdf0e10cSrcweirapplication/vnd.sun.xml.writer.global; %unixfilename -view %s 239cdf0e10cSrcweirapplication/vnd.stardivision.writer; %unixfilename -view %s 240cdf0e10cSrcweirapplication/vnd.stardivision.writer-global; %unixfilename -view %s 241cdf0e10cSrcweirapplication/x-starwriter; %unixfilename -view %s 242cdf0e10cSrcweirapplication/vnd.oasis.opendocument.formula; %unixfilename -view %s 243cdf0e10cSrcweirapplication/vnd.sun.xml.math; %unixfilename -view %s 244cdf0e10cSrcweirapplication/vnd.stardivision.math; %unixfilename -view %s 245cdf0e10cSrcweirapplication/x-starmath; %unixfilename -view %s 246cdf0e10cSrcweirapplication/msword; %unixfilename -view %s 247cdf0e10cSrcweirapplication/vnd.oasis.opendocument.spreadsheet; %unixfilename -view %s 248cdf0e10cSrcweirapplication/vnd.oasis.opendocument.spreadsheet-template; %unixfilename -view %s 249cdf0e10cSrcweirapplication/vnd.sun.xml.calc; %unixfilename -view %s 250cdf0e10cSrcweirapplication/vnd.sun.xml.calc.template; %unixfilename -view %s 251cdf0e10cSrcweirapplication/vnd.stardivision.calc; %unixfilename -view %s 252cdf0e10cSrcweirapplication/x-starcalc; %unixfilename -view %s 253cdf0e10cSrcweirapplication/vnd.stardivision.chart; %unixfilename -view %s 254cdf0e10cSrcweirapplication/x-starchart; %unixfilename -view %s 255cdf0e10cSrcweirapplication/excel; %unixfilename -view %s 256cdf0e10cSrcweirapplication/msexcel; %unixfilename -view %s 257cdf0e10cSrcweirapplication/vnd.ms-excel; %unixfilename -view %s 258cdf0e10cSrcweirapplication/x-msexcel; %unixfilename -view %s 259cdf0e10cSrcweirapplication/vnd.oasis.opendocument.presentation; %unixfilename -view %s 260cdf0e10cSrcweirapplication/vnd.oasis.opendocument.presentation-template; %unixfilename -view %s 261cdf0e10cSrcweirapplication/vnd.sun.xml.impress; %unixfilename -view %s 262cdf0e10cSrcweirapplication/vnd.sun.xml.impress.template; %unixfilename -view %s 263cdf0e10cSrcweirapplication/vnd.stardivision.impress; %unixfilename -view %s 264cdf0e10cSrcweirapplication/x-starimpress; %unixfilename -view %s 265cdf0e10cSrcweirapplication/powerpoint; %unixfilename -view %s 266cdf0e10cSrcweirapplication/mspowerpoint; %unixfilename -view %s 267cdf0e10cSrcweirapplication/vnd.ms-powerpoint; %unixfilename -view %s 268cdf0e10cSrcweirapplication/x-mspowerpoint; %unixfilename -view %s 269cdf0e10cSrcweirapplication/vnd.oasis.opendocument.graphics; %unixfilename -view %s 270cdf0e10cSrcweirapplication/vnd.oasis.opendocument.graphics-template; %unixfilename -view %s 271cdf0e10cSrcweirapplication/vnd.sun.xml.draw; %unixfilename -view %s 272cdf0e10cSrcweirapplication/vnd.sun.xml.draw.template; %unixfilename -view %s 273cdf0e10cSrcweirapplication/vnd.stardivision.draw; %unixfilename -view %s 274cdf0e10cSrcweirapplication/x-stardraw; %unixfilename -view %s 275cdf0e10cSrcweirapplication/vnd.oasis.opendocument.database; %unixfilename -view %s 276cdf0e10cSrcweirapplication/vnd.sun.xml.base; %unixfilename -view %s 277cdf0e10cSrcweirapplication/vnd.openofficeorg.extension; %unixfilename %s 278cdf0e10cSrcweirapplication/vnd.openxmlformats-officedocument.wordprocessingml.document; %unixfilename -view %s 279cdf0e10cSrcweirapplication/vnd.ms-word.document.macroenabled.12;%unixfilename -view %s 280cdf0e10cSrcweirapplication/vnd.openxmlformats-officedocument.wordprocessingml.template; %unixfilename -view %s 281cdf0e10cSrcweirapplication/vnd.ms-word.template.macroenabled.12; %unixfilename -view %s 282cdf0e10cSrcweirapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet; %unixfilename -view %s 283cdf0e10cSrcweirapplication/vnd.ms-excel.sheet.macroenabled.12; %unixfilename -view %s 284cdf0e10cSrcweirapplication/vnd.openxmlformats-officedocument.spreadsheetml.template; %unixfilename -view %s 285cdf0e10cSrcweirapplication/vnd.ms-excel.template.macroenabled.12; %unixfilename -view %s 286cdf0e10cSrcweirapplication/vnd.openxmlformats-officedocument.presentationml.presentation; %unixfilename -view %s 287cdf0e10cSrcweirapplication/vnd.ms-powerpoint.presentation.macroenabled.12; %unixfilename -view %s 288cdf0e10cSrcweirapplication/vnd.openxmlformats-officedocument.presentationml.template; %unixfilename -view %s 289cdf0e10cSrcweirapplication/vnd.ms-powerpoint.template.macroenabled.12; %unixfilename -view %s 290cdf0e10cSrcweirEND 291cdf0e10cSrcweir 292cdf0e10cSrcweir # and replace the original file 293cdf0e10cSrcweir mv -f /etc/mailcap.tmp$$ /etc/mailcap 294cdf0e10cSrcweirfi 295cdf0e10cSrcweir 296cdf0e10cSrcweirif [ -x /opt/gnome/bin/update-desktop-database ]; then 297cdf0e10cSrcweir /opt/gnome/bin/update-desktop-database -q 298cdf0e10cSrcweirelif (which update-desktop-database); then 299cdf0e10cSrcweir update-desktop-database -q /usr/share/applications 300cdf0e10cSrcweirfi 301cdf0e10cSrcweir 302cdf0e10cSrcweir%preun 303cdf0e10cSrcweir# remove from /etc/mailcap only on de-install 304cdf0e10cSrcweirif [ "$1" = 0 ] 305cdf0e10cSrcweirthen 306cdf0e10cSrcweir # backing all entries pointing to our binary 307cdf0e10cSrcweir sed '/%unixfilename/d' /etc/mailcap 2>/dev/null >> /etc/mailcap.tmp$$ 308cdf0e10cSrcweir 309cdf0e10cSrcweir # and replace the original file 310cdf0e10cSrcweir mv -f /etc/mailcap.tmp$$ /etc/mailcap 311cdf0e10cSrcweirfi 312cdf0e10cSrcweir 313cdf0e10cSrcweir%postun 314cdf0e10cSrcweirif [ "$1" = 0 ] ; then # only run when erasing the package - other cases handled by the triggers 315cdf0e10cSrcweir if [ -x /opt/gnome/bin/update-desktop-database ]; then 316cdf0e10cSrcweir /opt/gnome/bin/update-desktop-database -q 317cdf0e10cSrcweir elif (which update-desktop-database); then 318cdf0e10cSrcweir update-desktop-database -q 319cdf0e10cSrcweir fi 320cdf0e10cSrcweir# run always - both when upgrading as well as when erasing the package 321cdf0e10cSrcweir if (which update-mime-database); then 322cdf0e10cSrcweir update-mime-database /usr/share/mime 323cdf0e10cSrcweir fi 324cdf0e10cSrcweirfi 325cdf0e10cSrcweir 326cdf0e10cSrcweir#run always 327cdf0e10cSrcweirfor theme in gnome hicolor locolor; do 328cdf0e10cSrcweir if [ -e /usr/share/icons/$theme/icon-theme.cache ] ; then 329cdf0e10cSrcweir # touch it, just in case we cannot find the binary... 330cdf0e10cSrcweir touch /usr/share/icons/$theme 331cdf0e10cSrcweir if [ -x /opt/gnome/bin/gtk-update-icon-cache ]; then 332cdf0e10cSrcweir /opt/gnome/bin/gtk-update-icon-cache -q /usr/share/icons/$theme 333cdf0e10cSrcweir elif (which gtk-update-icon-cache); then 334cdf0e10cSrcweir gtk-update-icon-cache -q /usr/share/icons/$theme 335cdf0e10cSrcweir fi 336cdf0e10cSrcweir # ignore errors (e.g. when there is a cache, but no index.theme) 337cdf0e10cSrcweir true 338cdf0e10cSrcweir fi 339cdf0e10cSrcweirdone 340cdf0e10cSrcweir 341cdf0e10cSrcweir%files 342cdf0e10cSrcweir# specify stale symlinks verbatim, not as glob - a change in recent versions of 343cdf0e10cSrcweir# glibc breaks rpm unless rpm is build with internal glob-matching (issue 49374) 344cdf0e10cSrcweir# https://bugzilla.redhat.com/beta/show_bug.cgi?id=134362 345cdf0e10cSrcweir%defattr(-, root, root) 346cdf0e10cSrcweir%attr(0755, root, root) /usr/bin/* 347cdf0e10cSrcweir/usr/share/applications/%unixfilename-base.desktop 348cdf0e10cSrcweir/usr/share/applications/%unixfilename-calc.desktop 349cdf0e10cSrcweir/usr/share/applications/%unixfilename-draw.desktop 350cdf0e10cSrcweir/usr/share/applications/%unixfilename-impress.desktop 351cdf0e10cSrcweir/usr/share/applications/%unixfilename-math.desktop 352cdf0e10cSrcweir/usr/share/applications/%unixfilename-printeradmin.desktop 353cdf0e10cSrcweir/usr/share/applications/%unixfilename-writer.desktop 354cdf0e10cSrcweir/usr/share/applications/%unixfilename-startcenter.desktop 355cdf0e10cSrcweir/usr/share/applications/%unixfilename-javafilter.desktop 356cdf0e10cSrcweir/usr/share/icons/gnome/*/apps/*png 357cdf0e10cSrcweir/usr/share/icons/gnome/*/mimetypes/*png 358cdf0e10cSrcweir/usr/share/icons/hicolor/*/apps/*png 359cdf0e10cSrcweir/usr/share/icons/hicolor/*/mimetypes/*png 360cdf0e10cSrcweir/usr/share/icons/locolor/*/apps/*png 361cdf0e10cSrcweir/usr/share/icons/locolor/*/mimetypes/*png 362cdf0e10cSrcweir/usr/share/mime/packages/* 363