2 # This file is part of the LibreOffice project.
4 # This Source Code Form is subject to the terms of the Mozilla Public
5 # License, v. 2.0. If a copy of the MPL was not distributed with this
6 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 # This file incorporates work covered by the following license notice:
10 # Licensed to the Apache Software Foundation (ASF) under one or more
11 # contributor license agreements. See the NOTICE file distributed
12 # with this work for additional information regarding copyright
13 # ownership. The ASF licenses this file to you under the Apache
14 # License, Version 2.0 (the "License"); you may not use this file
15 # except in compliance with the License. You may obtain a copy of
16 # the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 if [ "${KDEMAINDIR}" ]; then
22 for i
in `cd "${ICON_SOURCE_DIR}"; find ${ICON_THEMES:-hicolor/???x??? hicolor/??x?? hicolor/scalable locolor} -name "*.png" -o -name "*.svg"`
24 targetdir
=${DESTDIR}/${KDEMAINDIR}/share/icons/`dirname ${i}`
25 mkdir -p "${targetdir}"
26 destfile=$targetdir/${ICON_PREFIX:-}${ICON_PREFIX:+-}`basename ${i}`
27 cp "${ICON_SOURCE_DIR}/${i}" "${destfile}"
28 chmod 0644 "${destfile}"
30 unset targetdir destfile
32 mkdir
-p "${DESTDIR}/${KDEMAINDIR}/share/mimelnk/application"
33 for i
in `cat mimelnklist`; do
34 cp "${i}" "${DESTDIR}/${KDEMAINDIR}/share/mimelnk/application/${PREFIX}-`basename ${i}`"
36 chmod 0644 "${DESTDIR}/${KDEMAINDIR}/share/mimelnk/application/"*
39 if [ "${GNOMEDIR}" ]; then
40 for i
in `cd "${ICON_SOURCE_DIR}/hicolor"; find ??x?? ???x??? scalable -name "*.png" -o -name "*.svg"`
42 targetdir
=${DESTDIR}/${GNOMEDIR}/share/icons/gnome/`dirname ${i}`
43 mkdir -p "${targetdir}"
44 destfile=$targetdir/${ICON_PREFIX:-}${ICON_PREFIX:+-}`basename ${i}`
45 cp "${ICON_SOURCE_DIR}/hicolor/${i}" "${destfile}"
46 chmod 0644 "${destfile}"
48 unset targetdir destfile
50 mkdir
-p "${DESTDIR}/${GNOMEDIR}/share/mime-info"
51 cp openoffice.mime
"${DESTDIR}/${GNOMEDIR}/share/mime-info/${PREFIX}.mime"
52 cp openoffice.keys
"${DESTDIR}/${GNOMEDIR}/share/mime-info/${PREFIX}.keys"
53 chmod 0644 "${DESTDIR}/${GNOMEDIR}/share/mime-info/${PREFIX}".
*
55 mkdir
-p "${DESTDIR}/${GNOMEDIR}/share/application-registry"
56 cp openoffice.applications
"${DESTDIR}/${GNOMEDIR}/share/application-registry/${PREFIX}.applications"
57 chmod 0644 "${DESTDIR}/${GNOMEDIR}/share/application-registry/${PREFIX}".
*
60 mkdir
-p "${DESTDIR}/usr/bin"
62 test -n "${OFFICE_PREFIX}" && office_prefix
="${OFFICE_PREFIX}" || office_prefix
=/opt
63 office_root
=${office_prefix}/${PREFIX}
65 #this symlink is needed to have the API boostrap functions running right
66 ln -sf "${office_root}/program/soffice" "${DESTDIR}/usr/bin/${PREFIX}"
68 cp printeradmin.sh
"${DESTDIR}/usr/bin/${PREFIX}-printeradmin"
69 chmod 0755 "${DESTDIR}/usr/bin/${PREFIX}-printeradmin"
71 if test "${PREFIX}" != libreoffice${PRODUCTVERSION} -a "${PREFIX}" != libreofficedev${PRODUCTVERSION} ; then
73 mkdir -p "${DESTDIR}${office_prefix}"
74 ln -sf libreoffice${PRODUCTVERSION} "${DESTDIR}${office_root}"
75 ln -sf /usr
/bin
/${PREFIX} "${DESTDIR}/usr/bin/libreoffice${PRODUCTVERSION}"
76 ln -sf /usr/bin/${PREFIX}-printeradmin "${DESTDIR}/usr/bin/libreoffice${PRODUCTVERSION}-printeradmin"
79 test "${PREFIX}" = libreofficedev${PRODUCTVERSION} && mime_def_file="libreofficedev${PRODUCTVERSION}.xml" || mime_def_file="libreoffice${PRODUCTVERSION}.xml"
80 mkdir
-p "${DESTDIR}/usr/share/mime/packages"
81 cp openoffice.org.xml
"${DESTDIR}/usr/share/mime/packages/$mime_def_file"
82 chmod 0644 "${DESTDIR}/usr/share/mime/packages/$mime_def_file"
84 mkdir
-p "${DESTDIR}/usr/share/applications"
85 for i
in `cat launcherlist`; do
86 ln -sf "${office_root}/share/xdg/${i}" "${DESTDIR}/usr/share/applications/${PREFIX}-${i}"