aboutsummaryrefslogtreecommitdiffstats
path: root/editors/libreoffice4/files/patch-bin__distro-install-desktop-integration
blob: 9d2f21886c0296801c153f2d88e48b38942b88ef (plain) (blame)
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
--- bin/distro-install-desktop-integration.orig 2014-09-16 16:10:41.000000000 -0400
+++ bin/distro-install-desktop-integration  2014-10-08 17:00:29.000000000 -0400
@@ -94,13 +94,13 @@
 }
 
 # install desktop integration from plain packages
-sysui_temp=`mktemp -t -d distro-pack-desktop-integration-XXXXXX`
+sysui_temp=`mktemp -d /tmp/distro-pack-desktop-integration-XXXXXX`
 cp -a workdir/CustomTarget/sysui/share/libreoffice/* "$sysui_temp"
 cp -a sysui/desktop/share/create_tree.sh "$sysui_temp"
 builddir=`pwd`
 cd $sysui_temp
 # we want non-versioned stuff in the distro packages
-sed -i \
+sed -i "" \
     -e "s/\($INSTALLDIRNAME\)$PRODUCTVERSION_NODOT/\1/" \
     -e "s/\($INSTALLDIRNAME\)$PRODUCTVERSION/\1/" \
     -e "s/\($PRODUCTNAME\) $PRODUCTVERSION/\1/" \
@@ -111,9 +111,11 @@
     export PREFIX=$INSTALLDIRNAME
     export ICON_PREFIX=$INSTALLDIRNAME
     export ICON_SOURCE_DIR=$builddir/sysui/desktop/icons
+    export APPDATA_SOURCE_DIR=$builddir/sysui/desktop/appstream-appdata
     export PRODUCTVERSION=
     export KDEMAINDIR=$PREFIXDIR
     export GNOMEDIR=$PREFIXDIR
+    export PREFIXDIR=$PREFIXDIR
     export GNOME_MIME_THEME=hicolor
     bash ./create_tree.sh
 )
@@ -129,7 +131,7 @@
 # we want non-versioned desktop files
 cd $DESTDIR/$INSTALLDIR/share/xdg
 # we want non-versioned stuff in the distro packages
-sed -i \
+sed -i "" \
     -e "s/\($INSTALLDIRNAME\)$PRODUCTVERSION_NODOT/\1/" \
     -e "s/\($INSTALLDIRNAME\)$PRODUCTVERSION/\1/" \
     -e "s/\($PRODUCTNAME\) $PRODUCTVERSION/\1/" \
@@ -144,7 +146,7 @@
                $PREFIXDIR/share/mime/packages \
                $PREFIXDIR/share/mime-info \
                $PREFIXDIR/share/icons ; do
-        find "$DESTDIR$dir" \( -type f -o -type l \) -printf "$dir/%P\n" >>$DESTDIR/gid_Module_Root_Brand
+        find "$DESTDIR$dir" \( -type f -o -type l \) | sed -e "s|^$DESTDIR||" >>$DESTDIR/gid_Module_Root_Brand
     done
 fi
 
@@ -176,12 +178,12 @@
 test -f $DESTDIR/gid_Module_Root_Brand && echo "$PREFIXDIR/bin/soffice" >>$DESTDIR/gid_Module_Root_Brand
 
 # create bash completion
-mkdir -p $DESTDIR/etc/bash_completion.d
-./bin/generate-bash-completion bin/bash-completion.in $DESTDIR/etc/bash_completion.d/$INSTALLDIRNAME.sh
-test -f $DESTDIR/gid_Module_Root_Brand && echo "/etc/bash_completion.d/$INSTALLDIRNAME.sh" >>$DESTDIR/gid_Module_Root_Brand
+mkdir -p $DESTDIR$PREFIXDIR/etc/bash_completion.d
+./bin/generate-bash-completion bin/bash-completion.in $DESTDIR$PREFIXDIR/etc/bash_completion.d/$INSTALLDIRNAME.sh
+test -f $DESTDIR/gid_Module_Root_Brand && echo "$PREFIXDIR/etc/bash_completion.d/$INSTALLDIRNAME.sh" >>$DESTDIR/gid_Module_Root_Brand
 if test "$WITH_COMPAT_OOWRAPPERS" = "TRUE" ; then
-    ./bin/generate-bash-completion --compat-oowrappers bin/bash-completion.in $DESTDIR/etc/bash_completion.d/ooffice.sh
-    test -f $DESTDIR/gid_Module_Root_Brand && echo "/etc/bash_completion.d/ooffice.sh" >>$DESTDIR/gid_Module_Root_Brand
+    ./bin/generate-bash-completion --compat-oowrappers bin/bash-completion.in $DESTDIR$PREFIXDIR/etc/bash_completion.d/ooffice.sh
+    test -f $DESTDIR/gid_Module_Root_Brand && echo "$PREFIXDIR/etc/bash_completion.d/ooffice.sh" >>$DESTDIR/gid_Module_Root_Brand
 fi
 
 echo "Install $OOINSTDIR/basis$VERSION/program/java-set-classpath";