$NetBSD: patch-ef,v 1.2 2008/11/26 15:33:23 hira Exp $ --- sysui/desktop/share/create_tree.sh.orig 2008-05-15 18:11:15.000000000 +0900 +++ sysui/desktop/share/create_tree.sh 2008-11-26 23:56:44.000000000 +0900 @@ -1,46 +1,41 @@ umask 022 -if [ "${KDEMAINDIR}" ] +ICON_THEMES="hicolor/??x??" + +if [ "${KDE}" ] then + for i in `cat mimelnklist`; do + ${BSD_INSTALL_DATA} $i ${DESTDIR}${_PREFIX}/share/kde/mimelnk/application/${PREFIX}-$i + done + ICON_THEMES="${ICON_THEMES} locolor" +fi + echo Copying icons .. - for i in `cd ${ICON_SOURCE_DIR}; find ${ICON_THEMES:-hicolor/??x?? locolor} -name "*.png"` + for i in `cd ${ICON_SOURCE_DIR}; find ${ICON_THEMES} -name "*.png"` do - targetdir=${DESTDIR}/${KDEMAINDIR}/share/icons/`dirname $i` - mkdir -p $targetdir + targetdir=${DESTDIR}${_PREFIX}/share/icons/`dirname $i` + ${BSD_INSTALL_DATA_DIR} $targetdir destfile=$targetdir/${ICON_PREFIX:-}${ICON_PREFIX:+-}`basename $i` - cp ${ICON_SOURCE_DIR}/$i $destfile - chmod 0644 $destfile + ${BSD_INSTALL_DATA} ${ICON_SOURCE_DIR}/$i $destfile done - - mkdir -p ${DESTDIR}/${KDEMAINDIR}/share/mimelnk/application - for i in `cat mimelnklist`; do - cp $i ${DESTDIR}/${KDEMAINDIR}/share/mimelnk/application/${PREFIX}-$i - done - chmod 0644 ${DESTDIR}/${KDEMAINDIR}/share/mimelnk/application/* -fi -if [ "${GNOMEDIR}" ] +if [ "${GNOME}" ] then echo Copying GNOME icons .. for i in `cd ${ICON_SOURCE_DIR}/hicolor; find ??x?? -name "*.png"` do - targetdir=${DESTDIR}/${GNOMEDIR}/share/icons/gnome/`dirname $i` - mkdir -p $targetdir + targetdir=${DESTDIR}${_PREFIX}/share/icons/gnome/`dirname $i` destfile=$targetdir/${ICON_PREFIX:-}${ICON_PREFIX:+-}`basename $i` - cp ${ICON_SOURCE_DIR}/hicolor/$i $destfile - chmod 0644 $destfile + ${BSD_INSTALL_DATA} ${ICON_SOURCE_DIR}/hicolor/$i $destfile done +fi - mkdir -p ${DESTDIR}/${GNOMEDIR}/share/mime-info - cp openoffice.mime ${DESTDIR}/${GNOMEDIR}/share/mime-info/${PREFIX}.mime - cp openoffice.keys ${DESTDIR}/${GNOMEDIR}/share/mime-info/${PREFIX}.keys - chmod 0644 ${DESTDIR}/${GNOMEDIR}/share/mime-info/${PREFIX}.* - - mkdir -p ${DESTDIR}/${GNOMEDIR}/share/application-registry - cp openoffice.applications ${DESTDIR}/${GNOMEDIR}/share/application-registry/${PREFIX}.applications - chmod 0644 ${DESTDIR}/${GNOMEDIR}/share/application-registry/${PREFIX}.* + ${BSD_INSTALL_DATA} openoffice.mime ${DESTDIR}${_PREFIX}/share/mime-info/${PREFIX}.mime + ${BSD_INSTALL_DATA} openoffice.keys ${DESTDIR}${_PREFIX}/share/mime-info/${PREFIX}.keys - if [ "${GNOME_MIME_THEME}" ] + ${BSD_INSTALL_DATA} openoffice.applications ${DESTDIR}${_PREFIX}/share/application-registry/${PREFIX}.applications + + if [ ] then echo "Creating legacy mimetype symlinks for GNOME .." # add symlinks so that nautilus can identify the mime-icons @@ -88,24 +83,17 @@ ln -sf $link_target_dir${ICON_PREFIX:-}${ICON_PREFIX:+-}extension.png ${link_dir}/gnome-mime-application-vnd.openofficeorg.extension.png done fi -fi - -mkdir -p ${DESTDIR}/usr/bin -office_root=/opt/${PREFIX} +office_root=${DESTDIR}${OO_PREFIX} -ln -sf ${office_root}/program/soffice ${DESTDIR}/usr/bin/soffice +# ln -sf ${office_root}/program/soffice ${DESTDIR}/usr/bin/soffice -cp openoffice.sh ${DESTDIR}/usr/bin/${PREFIX} -cp printeradmin.sh ${DESTDIR}/usr/bin/${PREFIX}-printeradmin -chmod 0755 ${DESTDIR}/usr/bin/${PREFIX} ${DESTDIR}/usr/bin/${PREFIX}-printeradmin +${BSD_INSTALL_SCRIPT} openoffice.sh ${DESTDIR}${_PREFIX}/bin/${PREFIX} +${BSD_INSTALL_SCRIPT} printeradmin.sh ${DESTDIR}${_PREFIX}/bin/${PREFIX}-printeradmin -mkdir -p ${DESTDIR}/usr/share/mime/packages -cp openoffice.org.xml ${DESTDIR}/usr/share/mime/packages/ -chmod 0644 ${DESTDIR}/usr/share/mime/packages/openoffice.org.xml +${BSD_INSTALL_DATA} openoffice.org.xml ${DESTDIR}${_PREFIX}/share/mime/packages/ -mkdir -p ${DESTDIR}/usr/share/applications for i in `cat launcherlist`; do - ln -sf ${office_root}/share/xdg/$i ${DESTDIR}/usr/share/applications/${PREFIX}-$i + ln -sf ${office_root}/${PREFIX}/share/xdg/$i ${DESTDIR}${_PREFIX}/share/applications/${PREFIX}-$i done