merge the formfield patch from ooo-build
[ooovba.git] / setup_native / source / packinfo / shellscripts_brand.txt
blob62039f504c32883ca8a7295887292b3918a89150
1 %preinstall << END
2 END
4 %postinstall << END
6 # echo Command after installing
7 # searching for the PRODUCTINSTALLLOCATION for the different platforms
8 platform=`uname -s`
9 case $$platform in
10 SunOS)
11   BASISPACKAGE=openofficeorg-core01
12   BASISDIR=`pkginfo -r $$BASISPACKAGE`
13   PRODUCTINSTALLLOCATION="$$BASEDIR"
14   ;;
15 Linux)
16   BASISPACKAGE=openoffice.org-core01
17   BASISDIR=`rpm -q --queryformat "%{INSTALLPREFIX}" $$BASISPACKAGE`
18   PRODUCTINSTALLLOCATION="$$RPM_INSTALL_PREFIX"
19   ;;
21   PRODUCTINSTALLLOCATION="$$BASEDIR" 
22   ;;
23 esac
25 # creating link to basis layer
26 if [ -d $$BASISDIR/openoffice.org/basisBASISDIRECTORYVERSION ]
27 then
28       ln -s $$BASISDIR/openoffice.org/basisBASISDIRECTORYVERSION $$PRODUCTINSTALLLOCATION/PRODUCTDIRECTORYNAME/basis-link >/dev/null 2>&1
29 else
30       ln -s ../openoffice.org/basisBASISDIRECTORYVERSION $$PRODUCTINSTALLLOCATION/PRODUCTDIRECTORYNAME/basis-link >/dev/null 2>&1
33 exit 0
34 END
36 %preremove << END
37 END
39 %postremove << END
40 # echo Command after removing
42 LASTUNINSTALL=1 # important for RPM deinstallation
44 # searching for the PRODUCTINSTALLLOCATION for the different platforms
45 platform=`uname -s`
46 case $$platform in
47 SunOS)
48   PRODUCTINSTALLLOCATION="$$BASEDIR"
49   ;;
50 Linux)
51   PRODUCTINSTALLLOCATION="$$RPM_INSTALL_PREFIX"
52   if [ "$$1" = 1 ]      # one package left after deinstallation -> update
53   then
54     LASTUNINSTALL=0
55   fi
56   ;;
58   PRODUCTINSTALLLOCATION="$$BASEDIR" 
59   ;;
60 esac
62 if [ -h $$PRODUCTINSTALLLOCATION/PRODUCTDIRECTORYNAME/basis-link -a $$LASTUNINSTALL -eq 1 ]
63 then
64   rm -f $$PRODUCTINSTALLLOCATION/PRODUCTDIRECTORYNAME/basis-link 2>/dev/null
65   rmdir $$PRODUCTINSTALLLOCATION/PRODUCTDIRECTORYNAME 2>/dev/null
68 exit 0
69 END