summaryrefslogtreecommitdiff
blob: 4b1edef7ef8bf120fe4f0e414f90de77453bec7b (plain)
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
67
68
diff --git a/source/getrc.c b/source/getrc.c
index a39b436..c130096 100644
--- a/getrc.c
+++ b/getrc.c
@@ -87,7 +87,7 @@ extern XtAppContext app;
 
 static char viewmolpath[MAXLENLINE];
 
-#define DEFAULTPATH "/usr/local/lib/viewmol"
+#define DEFAULTPATH "@GENTOO_PORTAGE_EPREFIX@/usr/GENTOOLIBDIR/viewmol"
 
 int getrc(void)
 {
diff --git a/source/install b/source/install
index 580865b..f136af3 100755
--- a/install
+++ b/install
@@ -54,24 +54,27 @@ fi
 cp $dirorig/viewmol $ROOT/bin
 chmod 711 $ROOT/bin/viewmol
 
-# install other files needed in $ROOT/lib/viewmol
-if [ ! -d $ROOT/lib/viewmol/$dir ]
+# install other files needed in $ROOT/GENTOOLIBDIR/viewmol
+if [ ! -d $ROOT/GENTOOLIBDIR/viewmol/$dir ]
 then
-  mkdir -p $ROOT/lib/viewmol/$dir
-  chmod 755 $ROOT/lib/viewmol/$dir
+  mkdir -p $ROOT/GENTOOLIBDIR/viewmol/$dir
+  chmod 755 $ROOT/GENTOOLIBDIR/viewmol/$dir
 fi
 cd $dirorig
-cp tm bio readgamess readgauss readmopac readpdb $ROOT/lib/viewmol/$dir
-chmod 711 $ROOT/lib/viewmol/$dir/*
+cp tm bio readgamess readgauss readmopac readpdb $ROOT/GENTOOLIBDIR/viewmol/$dir
+chmod 711 $ROOT/GENTOOLIBDIR/viewmol/$dir/*
 cd ../..
-cp readdmol readdmol.awk readgulp readpqs writecar writegauss.py writemol writetm $ROOT/lib/viewmol
-chmod 755 $ROOT/lib/viewmol/*
-cp -r doc examples locale scripts tests $ROOT/lib/viewmol
-find $ROOT/lib/viewmol -type f -exec chmod a+r {} \;
-find $ROOT/lib/viewmol -type d -exec chmod a+rx {} \;
-sed 's/\/source//g' viewmolrc > $ROOT/lib/viewmol/viewmolrc
-chmod -R 644 $ROOT/lib/viewmol/viewmolrc
-if [ -d /usr/X11R6/lib/X11/app-defaults ]
+cp readdmol readdmol.awk readgulp readpqs writecar writegauss.py writemol writetm $ROOT/GENTOOLIBDIR/viewmol
+chmod 755 $ROOT/GENTOOLIBDIR/viewmol/*
+mkdir -p $ROOT/usr/share/viewmol $ROOT/usr/share/doc/GENTOODOCDIR/ $ROOT/GENTOOLIBDIR/viewmol/
+cp -r examples scripts tests $ROOT/usr/share/viewmol
+cp -r locale $ROOT/GENTOOLIBDIR/viewmol/
+cp -r doc/* examples scripts tests $ROOT/usr/share/doc/GENTOODOCDIR/
+find $ROOT/GENTOOLIBDIR/viewmol -type f -exec chmod a+r {} \;
+find $ROOT/GENTOOLIBDIR/viewmol -type d -exec chmod a+rx {} \;
+sed 's/\/source//g' viewmolrc > $ROOT/GENTOOLIBDIR/viewmol/viewmolrc
+chmod -R 644 $ROOT/GENTOOLIBDIR/viewmol/viewmolrc
+if [ -d $ROOT/X11R6/GENTOOLIBDIR/X11/app-defaults ]
 then
   locale=`echo $LANG | cut -c1-2`
   if [ "$locale" = "en" ]
@@ -82,6 +85,6 @@ then
     # The C locale is defined by default for rpm builds, overwrite it
     locale="en_US"
   fi
-  cp locale/${locale}/Viewmol /usr/X11R6/lib/X11/app-defaults
-  chmod a+r /usr/X11R6/lib/X11/app-defaults/Viewmol
+  cp locale/${locale}/Viewmol ${ROOT}/X11R6/GENTOOLIBDIR/X11/app-defaults
+  chmod a+r ${ROOT}/X11R6/GENTOOLIBDIR/X11/app-defaults/Viewmol
 fi