updated on Fri Jan 13 04:01:25 UTC 2012
[aur-mirror.git] / maya2011 / maya2011.install
blob3b468b3f463db184889f866e49d46186d1dfe763
1 RPM_INSTALL_PREFIX=/usr
3 post_install() {
4 ##
5 ## %post: Add stuff here that needs to get done after the files are installed
6 ##
8 # make sure /usr/tmp is world-writable. 
9 mkdir -p /usr/tmp
10 chmod ugo+w /usr/tmp
12 # make sure /var/flexlm is world-writable. 
13 mkdir -p /var/flexlm
14 chmod ugo+w /var/flexlm
16 # need to add links after install since you can't name links in the file list
17 if test -L /usr/autodesk/maya2011-x64; then
18     rm -f /usr/autodesk/maya2011-x64
21 # create the maya softlink if it doesn't exist
22 cd /usr/autodesk
23 ln -sf maya2011-x64 /usr/autodesk/maya
25 # update various softlinks
26 cd /usr/autodesk/maya2011-x64/bin
27 ln -sf maya2011 maya
28 ln -sf /usr/autodesk/maya2011-x64/bin/maya2011 /usr/bin/maya
29 ln -sf /usr/autodesk/maya2011-x64/bin/Render /usr/bin/Render
30 ln -sf /usr/autodesk/maya2011-x64/bin/fcheck /usr/bin/fcheck
31 ln -sf /usr/autodesk/maya2011-x64/bin/imgcvt /usr/bin/imgcvt
33 # uncomment with 64-bit opa is available.
34 #ln -sf opa /usr/autodesk/maya2011/bin/apcw
36 # links for pcw
38 # create softlinks for desktop
39 ln -sf /usr/autodesk/maya2011-x64/desktop/Autodesk-Maya.desktop /usr/share/applications/Autodesk-Maya2011-x64.desktop
40 ln -sf /usr/autodesk/maya2011-x64/desktop/Autodesk-Maya.directory /usr/share/desktop-directories/Autodesk-Maya2011-x64.directory
41 ln -sf /usr/autodesk/maya2011-x64/desktop/Maya.png /usr/share/icons/hicolor/48x48/apps/Maya2011.png
43 # update the mental ray configuration files in place
44 RPM_ESCAPED_PREFIX=`echo ${RPM_INSTALL_PREFIX} | sed -e '/\//s/\//\\\\\//g'`
46 # linking the ssl libraries
47 if ! [ -a /usr/autodesk/maya2011-x64/lib/libssl.so.6 ]
48 then
49         ln -s /usr/lib/libssl.so /usr/autodesk/maya2011-x64/lib/libssl.so.6  > /dev/null 2>&1
50         ln -s /usr/lib/libcrypto.so /usr/autodesk/maya2011-x64/lib/libcrypto.so.6 > /dev/null 2>&1
52                 
53 #sed -e "/\[PREFIX\]/s//\/usr/" /usr/autodesk/maya2011-x64/mentalray/maya.rayrc > /tmp/maya.rayrc
54 #sed -e "/\[PREFIX\]/s//\/usr/" /usr/autodesk/maya2011-x64/bin/mayaexport_with_mr > /tmp/mayaexport_with_mr
55 #mv /tmp/maya.rayrc /usr/autodesk/maya2011-x64/mentalray/maya.rayrc
56 #mv /tmp/mayarender_with_mr /usr/autodesk/maya2011-x64/bin/mayarender_with_mr
59 #chmod 755 /usr/autodesk/maya2011-x64/bin/mayarender_with_mr > /dev/null 2>&1
61 echo "Use this command, as root, to install your license \
62 \"LD_LIBRARY_PATH=/opt/Autodesk/Adlm/R3/lib64 /usr/autodesk/maya2011-x64/bin/adlmreg -i -S <your license information> /var/opt/Autodesk/Adlm/Maya2011/MayaConfig.pit\""
65 pre_remove() {
67 ## %preun: Add stuff here that needs to get done before the uninstall
69 ## ojl - 01-07-19: added test for $1 eq 0. Only remove the links if 
70 ##                 we are completely uninstalling maya4
72 if test -L /usr/autodesk/maya2011-x64/bin/maya ; then
73         rm -f /usr/autodesk/maya2011-x64/bin/maya
75 if test -L /usr/autodesk/maya ; then
76         rm -f /usr/autodesk/maya
78 if test -L /usr/bin/maya ; then
79         rm -f /usr/bin/maya
81 if test -L /usr/bin/Render ; then
82         rm -f /usr/bin/Render
84 if test -L /usr/bin/fcheck ; then
85         rm -f /usr/bin/fcheck
87 if test -L /usr/bin/imgcvt ; then
88         rm -f /usr/bin/imgcvt
90 if test -f /var/opt/Autodesk/Adlm/Maya2010/install.env ; then
91         rm /var/opt/Autodesk/Adlm/Maya2010/install.env > /dev/null 2>&1
94 # remove symlinks from lib
95 if test -L /usr/autodesk/maya2011-x64/lib/libssl.so.6 ; then
96         rm -f /usr/autodesk/maya2011-x64/lib/libssl.so.6
98 if test -L /usr/autodesk/maya2011-x64/lib/libcrypto.so.6 ; then
99         rm -f /usr/autodesk/maya2011-x64/lib/libcrypto.so.6
104 post_remove() {
106 ## %postun: Add stuff here that needs to get done after an uninstall
109 # try to remove /usr/tmp, this will only succeed if it is empty
110 if test -d /usr/tmp ; then
111         rmdir --ignore-fail-on-non-empty /usr/tmp > /dev/null 2>&1
114 # try to remove /var/flexlm, this will only succeed if it is empty
115 if test -d /var/flexlm ; then
116         rmdir --ignore-fail-on-non-empty /var/flexlm > /dev/null 2>&1
119 # remove desktop softlinks
120 rm /usr/share/applications/Autodesk-Maya2011-x64.desktop
121 rm /usr/share/desktop-directories/Autodesk-Maya2011-x64.directory
122 rm /usr/share/icons/hicolor/48x48/apps/Maya2011.png
124 # try to remove /usr/autodesk/maya2011-x64, this will only succeed if it is empty
125 if test -d /usr/autodesk/maya2011-x64 ; then
126     rmdir --ignore-fail-on-non-empty /usr/autodesk/maya2011-x64 > /dev/null 2>&1
129 # try to remove the maya symlink
130 if test -L /usr/autodesk/maya ; then
131     rm /usr/autodesk/maya > /dev/null 2>&1
134 # try to remove /usr/autodesk, this will only succeed if it is empty
135 if test -d /usr/autodesk ; then
136         rmdir --ignore-fail-on-non-empty /usr/autodesk > /dev/null 2>&1
139 # for adlmflexnetclient and adlmapps
140 if [ -e /opt/Autodesk/Adlm/FLEXnet/bin ]
141 then
142     rmdir --ignore-fail-on-non-empty /opt/Autodesk/Adlm/FLEXnet/bin > /dev/null 2>&1
143     rmdir --ignore-fail-on-non-empty /opt/Autodesk/Adlm/FLEXnet > /dev/null 2>&1
144     rmdir --ignore-fail-on-non-empty /opt/Autodesk/Adlm > /dev/null 2>&1
145     rmdir --ignore-fail-on-non-empty /opt/Autodesk > /dev/null 2>&1
148 if [ -e /opt/Autodesk/Adlm/R3 ]
149 then
150     rmdir --ignore-fail-on-non-empty /opt/Autodesk/Adlm/R3/bin/codecs > /dev/null 2>&1
151     rmdir --ignore-fail-on-non-empty /opt/Autodesk/Adlm/R3/bin/imageformats > /dev/null 2>&1
152     rmdir --ignore-fail-on-non-empty /opt/Autodesk/Adlm/R3/icon > /dev/null 2>&1
153     rmdir --ignore-fail-on-non-empty /opt/Autodesk/Adlm/R3/lib64 > /dev/null 2>&1
154     rmdir --ignore-fail-on-non-empty /opt/Autodesk/Adlm/R3 > /dev/null 2>&1
155     rmdir --ignore-fail-on-non-empty /opt/Autodesk/Adlm > /dev/null 2>&1
156     rmdir --ignore-fail-on-non-empty /opt/Autodesk > /dev/null 2>&1