fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / setup_native / source / packinfo / shellscripts_core01.txt
blob96943e131e9acdba9f2a18e8c3770e6753d429a1
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 .
19 %preinstall << END
20 END
22 %postinstall << END
24 # echo Command after installing
25 # searching for the PRODUCTINSTALLLOCATION for the different platforms
26 platform=`uname -s`
27 case $$platform in
28 SunOS)
29   UREPACKAGE=SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure
30   UREDIR=`pkginfo -r $$UREPACKAGE`
31   PRODUCTINSTALLLOCATION="$$BASEDIR"
32   ;;
33 Linux)
34   UREPACKAGE=UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure
35   UREDIR=`rpm -q --queryformat "%{INSTALLPREFIX}" $$UREPACKAGE`
36   PRODUCTINSTALLLOCATION="$$RPM_INSTALL_PREFIX"
37   ;;
39   PRODUCTINSTALLLOCATION="$$BASEDIR" 
40   ;;
41 esac
43 # creating link to ure
44 if [ -d $$UREDIR/libreoffice/ure ]
45 then
46       ln -s $$UREDIR/libreoffice/ure $$PRODUCTINSTALLLOCATION/libreoffice/basisBASISDIRECTORYVERSION/ure-link >/dev/null 2>&1
47 else
48       ln -s ../ure $$PRODUCTINSTALLLOCATION/libreoffice/basisBASISDIRECTORYVERSION/ure-link >/dev/null 2>&1
51 exit 0
52 END
54 %preremove << END
55 END
57 %postremove << END
58 # echo Command after removing
60 LASTUNINSTALL=1 # important for RPM deinstallation
62 # searching for the PRODUCTINSTALLLOCATION for the different platforms
63 platform=`uname -s`
64 case $$platform in
65 SunOS)
66   PRODUCTINSTALLLOCATION="$$BASEDIR"
67   ;;
68 Linux)
69   PRODUCTINSTALLLOCATION="$$RPM_INSTALL_PREFIX"
70   if [ "$$1" = 1 ]      # one package left after deinstallation -> update
71   then
72     LASTUNINSTALL=0
73   fi
74   ;;
76   PRODUCTINSTALLLOCATION="$$BASEDIR" 
77   ;;
78 esac
80 if [ -h $$PRODUCTINSTALLLOCATION/libreoffice/basisBASISDIRECTORYVERSION/ure-link -a $$LASTUNINSTALL -eq 1 ]
81 then
82   rm -f $$PRODUCTINSTALLLOCATION/libreoffice/basisBASISDIRECTORYVERSION/ure-link 2>/dev/null
83   rmdir $$PRODUCTINSTALLLOCATION/libreoffice/basisBASISDIRECTORYVERSION 2>/dev/null
86 exit 0
87 END