1umask 022 2 3if [ "${KDEMAINDIR}" ] 4then 5 echo Copying icons .. 6 for i in `cd ${ICON_SOURCE_DIR}; find ${ICON_THEMES:-hicolor/??x?? locolor} -name "*.png"` 7 do 8 targetdir=${DESTDIR}/${KDEMAINDIR}/share/icons/`dirname $i` 9 mkdir -p $targetdir 10 destfile=$targetdir/${ICON_PREFIX:-}${ICON_PREFIX:+-}`basename $i` 11 cp ${ICON_SOURCE_DIR}/$i $destfile 12 chmod 0644 $destfile 13 done 14 15 mkdir -p ${DESTDIR}/${KDEMAINDIR}/share/mimelnk/application 16 for i in `cat mimelnklist`; do 17 cp $i ${DESTDIR}/${KDEMAINDIR}/share/mimelnk/application/${PREFIX}-$i 18 done 19 chmod 0644 ${DESTDIR}/${KDEMAINDIR}/share/mimelnk/application/* 20fi 21 22if [ "${GNOMEDIR}" ] 23then 24 echo Copying GNOME icons .. 25 for i in `cd ${ICON_SOURCE_DIR}/hicolor; find ??x?? -name "*.png"` 26 do 27 targetdir=${DESTDIR}/${GNOMEDIR}/share/icons/gnome/`dirname $i` 28 mkdir -p $targetdir 29 destfile=$targetdir/${ICON_PREFIX:-}${ICON_PREFIX:+-}`basename $i` 30 cp ${ICON_SOURCE_DIR}/hicolor/$i $destfile 31 chmod 0644 $destfile 32 done 33 34 mkdir -p ${DESTDIR}/${GNOMEDIR}/share/mime-info 35 cp openoffice.mime ${DESTDIR}/${GNOMEDIR}/share/mime-info/${PREFIX}.mime 36 cp openoffice.keys ${DESTDIR}/${GNOMEDIR}/share/mime-info/${PREFIX}.keys 37 chmod 0644 ${DESTDIR}/${GNOMEDIR}/share/mime-info/${PREFIX}.* 38 39 mkdir -p ${DESTDIR}/${GNOMEDIR}/share/application-registry 40 cp openoffice.applications ${DESTDIR}/${GNOMEDIR}/share/application-registry/${PREFIX}.applications 41 chmod 0644 ${DESTDIR}/${GNOMEDIR}/share/application-registry/${PREFIX}.* 42 43 if [ "${GNOME_MIME_THEME}" ] 44 then 45 echo "Creating legacy mimetype symlinks for GNOME .." 46 # add symlinks so that nautilus can identify the mime-icons 47 # not strictly freedesktop-stuff but there is no common naming scheme yet. 48 # One proposal is "mime-application:vnd.oasis.opendocument.spreadsheet.png" 49 # for e.g. application/vnd.oasis.opendocument.spreadsheet 50 link_target_root="${DESTDIR}/${GNOMEDIR}/share/icons/${GNOME_MIME_THEME}" 51 if [ ! -d "${link_target_root}" ] 52 then 53 link_target_root="${DESTDIR}/${GNOMEDIR}/share/icons/gnome" 54 fi 55 56 for subdir in `cd ${link_target_root}; ls -d *` 57 do 58 link_target_dir="" 59 link_dir="${DESTDIR}/${GNOMEDIR}/share/icons/${GNOME_MIME_THEME}/$subdir/mimetypes" 60 if [ ! -d "${link_dir}" ] 61 then 62 mkdir -p "${link_dir}" 63 link_target_dir="../../../gnome/$subdir/mimetypes/" 64 fi 65 ln -sf $link_target_dir${ICON_PREFIX:-}${ICON_PREFIX:+-}drawing.png ${link_dir}/gnome-mime-application-vnd.sun.xml.draw.png 66 ln -sf $link_target_dir${ICON_PREFIX:-}${ICON_PREFIX:+-}drawing-template.png ${link_dir}/gnome-mime-application-vnd.sun.xml.draw.template.png 67 ln -sf $link_target_dir${ICON_PREFIX:-}${ICON_PREFIX:+-}formula.png ${link_dir}/gnome-mime-application-vnd.sun.xml.math.png 68 ln -sf $link_target_dir${ICON_PREFIX:-}${ICON_PREFIX:+-}master-document.png ${link_dir}/gnome-mime-application-vnd.sun.xml.writer.global.png 69 ln -sf $link_target_dir${ICON_PREFIX:-}${ICON_PREFIX:+-}oasis-database.png ${link_dir}/gnome-mime-application-vnd.sun.xml.base.png 70 ln -sf $link_target_dir${ICON_PREFIX:-}${ICON_PREFIX:+-}oasis-database.png ${link_dir}/gnome-mime-application-vnd.oasis.opendocument.database.png 71 ln -sf $link_target_dir${ICON_PREFIX:-}${ICON_PREFIX:+-}oasis-drawing.png ${link_dir}/gnome-mime-application-vnd.oasis.opendocument.graphics.png 72 ln -sf $link_target_dir${ICON_PREFIX:-}${ICON_PREFIX:+-}oasis-drawing-template.png ${link_dir}/gnome-mime-application-vnd.oasis.opendocument.graphics-template.png 73 ln -sf $link_target_dir${ICON_PREFIX:-}${ICON_PREFIX:+-}oasis-formula.png ${link_dir}/gnome-mime-application-vnd.oasis.opendocument.formula.png 74 ln -sf $link_target_dir${ICON_PREFIX:-}${ICON_PREFIX:+-}oasis-master-document.png ${link_dir}/gnome-mime-application-vnd.oasis.opendocument.text-master.png 75 ln -sf $link_target_dir${ICON_PREFIX:-}${ICON_PREFIX:+-}oasis-presentation.png ${link_dir}/gnome-mime-application-vnd.oasis.opendocument.presentation.png 76 ln -sf $link_target_dir${ICON_PREFIX:-}${ICON_PREFIX:+-}oasis-presentation-template.png ${link_dir}/gnome-mime-application-vnd.oasis.opendocument.presentation-template.png 77 ln -sf $link_target_dir${ICON_PREFIX:-}${ICON_PREFIX:+-}oasis-spreadsheet.png ${link_dir}/gnome-mime-application-vnd.oasis.opendocument.spreadsheet.png 78 ln -sf $link_target_dir${ICON_PREFIX:-}${ICON_PREFIX:+-}oasis-spreadsheet-template.png ${link_dir}/gnome-mime-application-vnd.oasis.opendocument.spreadsheet-template.png 79 ln -sf $link_target_dir${ICON_PREFIX:-}${ICON_PREFIX:+-}oasis-text.png ${link_dir}/gnome-mime-application-vnd.oasis.opendocument.text.png 80 ln -sf $link_target_dir${ICON_PREFIX:-}${ICON_PREFIX:+-}oasis-text-template.png ${link_dir}/gnome-mime-application-vnd.oasis.opendocument.text-template.png 81 ln -sf $link_target_dir${ICON_PREFIX:-}${ICON_PREFIX:+-}oasis-web-template.png ${link_dir}/gnome-mime-application-vnd.oasis.opendocument.text-web.png 82 ln -sf $link_target_dir${ICON_PREFIX:-}${ICON_PREFIX:+-}presentation.png ${link_dir}/gnome-mime-application-vnd.sun.xml.impress.png 83 ln -sf $link_target_dir${ICON_PREFIX:-}${ICON_PREFIX:+-}presentation-template.png ${link_dir}/gnome-mime-application-vnd.sun.xml.impress.template.png 84 ln -sf $link_target_dir${ICON_PREFIX:-}${ICON_PREFIX:+-}spreadsheet.png ${link_dir}/gnome-mime-application-vnd.sun.xml.calc.png 85 ln -sf $link_target_dir${ICON_PREFIX:-}${ICON_PREFIX:+-}spreadsheet-template.png ${link_dir}/gnome-mime-application-vnd.sun.xml.calc.template.png 86 ln -sf $link_target_dir${ICON_PREFIX:-}${ICON_PREFIX:+-}text.png ${link_dir}/gnome-mime-application-vnd.sun.xml.writer.png 87 ln -sf $link_target_dir${ICON_PREFIX:-}${ICON_PREFIX:+-}text-template.png ${link_dir}/gnome-mime-application-vnd.sun.xml.writer.template.png 88 ln -sf $link_target_dir${ICON_PREFIX:-}${ICON_PREFIX:+-}extension.png ${link_dir}/gnome-mime-application-vnd.openofficeorg.extension.png 89 done 90 fi 91fi 92 93mkdir -p ${DESTDIR}/usr/bin 94 95office_root=/opt/${PREFIX} 96 97ln -sf ${office_root}/program/soffice ${DESTDIR}/usr/bin/soffice 98 99cp openoffice.sh ${DESTDIR}/usr/bin/${PREFIX} 100cp printeradmin.sh ${DESTDIR}/usr/bin/${PREFIX}-printeradmin 101chmod 0755 ${DESTDIR}/usr/bin/${PREFIX} ${DESTDIR}/usr/bin/${PREFIX}-printeradmin 102 103mkdir -p ${DESTDIR}/usr/share/mime/packages 104cp openoffice.org.xml ${DESTDIR}/usr/share/mime/packages/ 105chmod 0644 ${DESTDIR}/usr/share/mime/packages/openoffice.org.xml 106 107mkdir -p ${DESTDIR}/usr/share/applications 108for i in `cat launcherlist`; do 109 ln -sf ${office_root}/share/xdg/$i ${DESTDIR}/usr/share/applications/${PREFIX}-$i 110done 111 112