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 .
24 # echo Command after installing
25 # searching for the PRODUCTINSTALLLOCATION for the different platforms
29 UREPACKAGE=SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure
30 UREDIR=`pkginfo -r $$UREPACKAGE`
31 PRODUCTINSTALLLOCATION="$$BASEDIR"
34 UREPACKAGE=UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure
35 UREDIR=`rpm -q --queryformat "%{INSTALLPREFIX}" $$UREPACKAGE`
36 PRODUCTINSTALLLOCATION="$$RPM_INSTALL_PREFIX"
39 PRODUCTINSTALLLOCATION="$$BASEDIR"
43 # creating link to ure
44 if [ -d $$UREDIR/libreoffice/ure ]
46 ln -s $$UREDIR/libreoffice/ure $$PRODUCTINSTALLLOCATION/libreoffice/basisBASISDIRECTORYVERSION/ure-link >/dev/null 2>&1
48 ln -s ../ure $$PRODUCTINSTALLLOCATION/libreoffice/basisBASISDIRECTORYVERSION/ure-link >/dev/null 2>&1
58 # echo Command after removing
60 LASTUNINSTALL=1 # important for RPM deinstallation
62 # searching for the PRODUCTINSTALLLOCATION for the different platforms
66 PRODUCTINSTALLLOCATION="$$BASEDIR"
69 PRODUCTINSTALLLOCATION="$$RPM_INSTALL_PREFIX"
70 if [ "$$1" = 1 ] # one package left after deinstallation -> update
76 PRODUCTINSTALLLOCATION="$$BASEDIR"
80 if [ -h $$PRODUCTINSTALLLOCATION/libreoffice/basisBASISDIRECTORYVERSION/ure-link -a $$LASTUNINSTALL -eq 1 ]
82 rm -f $$PRODUCTINSTALLLOCATION/libreoffice/basisBASISDIRECTORYVERSION/ure-link 2>/dev/null
83 rmdir $$PRODUCTINSTALLLOCATION/libreoffice/basisBASISDIRECTORYVERSION 2>/dev/null