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