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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
|
diff -ur -x make-sparky sparky.orig/bin/sparky sparky/bin/sparky
--- sparky.orig/bin/sparky 2004-03-05 11:32:10.000000000 -0800
+++ sparky/bin/sparky 2005-12-17 17:36:51.000000000 -0800
@@ -4,22 +4,10 @@
#
# -----------------------------------------------------------------------------
-# Figure out Sparky installation directory from $0.
-#
-set sparky_exe = $0
-while (-l $sparky_exe)
- set ls_sparky_exe = `ls -l "$sparky_exe"`
- set sparky_exe = `echo "$ls_sparky_exe" | sed 's/.* -> //'`
-end
-set sparky_bin = `dirname "$sparky_exe"`
-set sparky_bin = `cd "$sparky_bin"; pwd`
-set sparky_inst = `dirname "$sparky_bin"`
-
-# -----------------------------------------------------------------------------
# Sparky uses the SPARKY_INSTALL environment variable to find its
# application resource file and print prolog file.
#
-setenv SPARKY_INSTALL $sparky_inst
+setenv SPARKY_INSTALL @GENTOO_PORTAGE_EPREFIX@/usr/lib/sparky
# -----------------------------------------------------------------------------
# If Python is available start Sparky as a Python extension.
diff -ur -x make-sparky sparky.orig/c++/Makefile sparky/c++/Makefile
--- sparky.orig/c++/Makefile 2004-02-03 15:56:24.000000000 -0800
+++ sparky/c++/Makefile 2005-12-18 10:49:08.000000000 -0800
@@ -22,6 +22,7 @@
PYTHON_PREFIX = /usr/local
PYTHON_LIB = $(PYTHON_PREFIX)/lib/python$(PYTHON_VERSION)
PYTHON_INC = $(PYTHON_PREFIX)/include/python$(PYTHON_VERSION)
+PYDIR = $(SPARKY_INSTALL)/lib/python$(PYTHON_VERSION)/site-packages
TCLTK_VERSION = 8.4
TCLTK_VER_WIN32 = 84
TK_PREFIX = /usr/local
@@ -113,21 +114,20 @@
nopython: $(EXECUTABLES)
-install-python: $(SPY_PYMOD) $(TKINTER_PYMOD) $(SPARKY_INSTALL)/python \
- $(SPARKY_INSTALL)/python/sparky $(SPARKY_INSTALL)/python/lib-tk
- $(INSTALL) $(SPY_PYMOD) $(SPARKY_INSTALL)/python/sparky
- chmod 755 $(SPARKY_INSTALL)/python/sparky/$(SPY_PYMOD)
- $(INSTALL) $(TKINTER_PYMOD) $(SPARKY_INSTALL)/python/lib-tk
- chmod 755 $(SPARKY_INSTALL)/python/lib-tk/$(TKINTER_PYMOD)
+install-python: $(SPY_PYMOD) $(TKINTER_PYMOD) $(PYDIR) \
+ $(PYDIR)/sparky $(PYDIR)/lib-tk
+ $(INSTALL) $(SPY_PYMOD) $(PYDIR)/sparky
+ chmod 755 $(PYDIR)/sparky/$(SPY_PYMOD)
+ $(INSTALL) $(TKINTER_PYMOD) $(PYDIR)/lib-tk
+ chmod 755 $(PYDIR)/lib-tk/$(TKINTER_PYMOD)
install-nopython: $(EXECUTABLES) $(SPARKY_INSTALL)/bin
$(INSTALL) $(EXECUTABLES) $(SPARKY_INSTALL)/bin
cd $(SPARKY_INSTALL)/bin ; \
chmod 755 $(EXECUTABLES)
-$(SPARKY_INSTALL)/bin $(SPARKY_INSTALL)/python \
-$(SPARKY_INSTALL)/python/sparky $(SPARKY_INSTALL)/python/lib-tk:
- mkdir $@
+$(SPARKY_INSTALL)/bin $(PYDIR) $(PYDIR)/sparky $(PYDIR)/lib-tk:
+ mkdir -p $@
chmod 755 $@
sparky-no-python$(EXE_SUFFIX): main.o $(SPARKY_OBJS)
diff -ur -x make-sparky sparky.orig/c++/paths.h sparky/c++/paths.h
--- sparky.orig/c++/paths.h 2002-01-17 19:15:06.000000000 -0800
+++ sparky/c++/paths.h 2005-12-17 20:57:15.000000000 -0800
@@ -19,7 +19,7 @@
// Installation subdirectories and files
//
#define SPARKY_MANUAL "manual"
-#define SPARKY_LIB "lib"
+#define SPARKY_LIB ""
#define SPARKY_PRINT "print-prolog.ps" // under lib directory
#define SPARKY_RESOURCE "Sparky" // under lib directory
#define SPARKY_SAMPLE_DATA "example"
diff -ur -x make-sparky sparky.orig/c++/system-unix.cc sparky/c++/system-unix.cc
--- sparky.orig/c++/system-unix.cc 2004-02-26 10:57:54.000000000 -0800
+++ sparky/c++/system-unix.cc 2005-12-17 20:56:58.000000000 -0800
@@ -95,7 +95,7 @@
//
Stringy default_sparky_install_path()
{
- return file_path(file_path(file_path("", "usr"), "local"), "sparky");
+ return file_path(file_path(file_path("", "usr"), "lib"), "sparky");
}
// ----------------------------------------------------------------------------
diff -ur -x make-sparky sparky.orig/lib/Makefile sparky/lib/Makefile
--- sparky.orig/lib/Makefile 2004-02-18 10:53:29.000000000 -0800
+++ sparky/lib/Makefile 2005-12-17 16:03:21.000000000 -0800
@@ -18,9 +18,9 @@
TCL_SHLIB = lib$(TCL_VERSION)$(TCLTK_SHLIB_SUFFIX)
TK_SHLIB = lib$(TK_VERSION)$(TCLTK_SHLIB_SUFFIX)
-install: $(SPARKY_INSTALL)/lib install-tcl-tk
- $(INSTALL) Sparky print-prolog.ps $(SPARKY_INSTALL)/lib
- cd $(SPARKY_INSTALL)/lib ; \
+install: $(SPARKY_INSTALL)/lib
+ $(INSTALL) Sparky print-prolog.ps $(SPARKY_INSTALL)/lib/sparky
+ cd $(SPARKY_INSTALL)/lib/sparky ; \
chmod 644 Sparky print-prolog.ps
install-tcl-tk: $(SPARKY_INSTALL)/lib
diff -ur -x make-sparky sparky.orig/Makefile sparky/Makefile
--- sparky.orig/Makefile 2004-02-18 10:40:04.000000000 -0800
+++ sparky/Makefile 2005-12-17 19:40:48.000000000 -0800
@@ -40,18 +40,22 @@
PYTHON_VERSION = 2.3
PYTHON_DIR =
+PYDIR = $(SPARKY_INSTALL)/lib/python$(PYTHON_VERSION)/site-packages
PYMOD_SUFFIX = .so
SPY_PYMOD = spy$(PYMOD_SUFFIX)
TKINTER_PYMOD = _tkinter$(PYMOD_SUFFIX)
+PYDIR = $(SPARKY_INSTALL)/lib/sparky/python
+DOCDIR = $(SPARKY_INSTALL)/share/doc/sparky
+
all nopython $(SPY_PYMOD) $(TKINTER_PYMOD) $(EXECUTABLES) debug-sparky clean: force
cd $(SPARKY_OBJ) && $(MAKE) -f $(SPARKY_SRC)/Makefile -e $@
Makefile.dep TAGS: force
cd $(SPARKY_SRC) && $(MAKE) -f Makefile -e $@
-install: install-nopython $(SPARKY_INSTALL) install-python
+install: install-nopython $(SPARKY_INSTALL)
cd $(SPARKY_OBJ) && \
$(MAKE) -f $(SPARKY_SRC)/Makefile -e install-python
cd $(SPARKY)/python && $(MAKE) -f Makefile -e install
@@ -67,7 +71,8 @@
chmod 755 sparky$(SCRIPT_SUFFIX)
install-example: $(SPARKY_INSTALL)
- cd $(SPARKY) ; $(INSTALLDIR) example $(SPARKY_INSTALL)
+ mkdir -p $(DOCDIR)/example
+ cd $(SPARKY) ; $(INSTALLDIR) example $(DOCDIR)
install-lib: $(SPARKY_INSTALL)
cd $(SPARKY)/lib && $(MAKE) -f Makefile -e install
@@ -76,21 +81,14 @@
cd $(SPARKY)/manual && $(MAKE) -f Makefile -e install
install-misc: $(SPARKY_INSTALL)
- cd $(SPARKY) ; $(INSTALL) LICENSE README $(SPARKY_INSTALL)
- cd $(SPARKY_INSTALL) ; chmod 644 LICENSE README
-
-install-python: $(SPARKY_INSTALL) $(SPARKY_INSTALL)/python$(PYTHON_VERSION)
-ifdef PYTHON_DIR
- $(INSTALLDIR) $(PYTHON_DIR)/* $(SPARKY_INSTALL)/python$(PYTHON_VERSION)
-else
- echo "Not packaging Python with Sparky."
-endif
+ cd $(SPARKY) ; $(INSTALL) LICENSE README $(DOCDIR)
+ cd $(DOCDIR) ; chmod 644 LICENSE README
install-mac:
cd $(SPARKY)/mac && $(MAKE) -f Makefile -e install
-$(SPARKY_INSTALL) $(SPARKY_INSTALL)/bin $(SPARKY_INSTALL)/python$(PYTHON_VERSION):
- mkdir $@
+$(SPARKY_INSTALL) $(SPARKY_INSTALL)/bin $(PYDIR):
+ mkdir -p $@
chmod 755 $@
force:
diff -ur -x make-sparky sparky.orig/manual/Makefile sparky/manual/Makefile
--- sparky.orig/manual/Makefile 2004-03-08 15:40:06.000000000 -0800
+++ sparky/manual/Makefile 2005-12-17 19:37:45.000000000 -0800
@@ -13,6 +13,8 @@
SPARKY_INSTALL = /usr/local/sparky
MANUAL_WWW = /usr/local/html/cgl/sparky/manual
+DOCDIR = $(SPARKY_INSTALL)/share/doc/sparky
+MANUAL_LOC = $(DOCDIR)/manual
MANUAL_SECTIONS = overview.html intro.html views.html peaks.html \
extensions.html autoassign.html misc.html \
@@ -45,17 +47,17 @@
all: $(MANUAL_FILES)
-install: $(MANUAL_FILES) $(SPARKY_INSTALL)/manual \
- $(SPARKY_INSTALL)/manual/images
- $(INSTALL) $(MANUAL_FILES) $(SPARKY_INSTALL)/manual
- cd $(SPARKY_INSTALL)/manual ; \
+install: $(MANUAL_FILES) $(MANUAL_LOC) \
+ $(MANUAL_LOC)/images
+ $(INSTALL) $(MANUAL_FILES) $(MANUAL_LOC)
+ cd $(MANUAL_LOC) ; \
chmod 644 $(MANUAL_FILES)
cd images ; \
- $(INSTALL) $(IMAGE_FILES) $(SPARKY_INSTALL)/manual/images
- cd $(SPARKY_INSTALL)/manual/images ; \
+ $(INSTALL) $(IMAGE_FILES) $(MANUAL_LOC)/images
+ cd $(MANUAL_LOC)/images ; \
chmod 644 $(IMAGE_FILES)
-$(SPARKY_INSTALL)/manual $(SPARKY_INSTALL)/manual/images:
+$(MANUAL_LOC) $(MANUAL_LOC)/images:
mkdir $@
chmod 755 $@
Only in sparky/manual: manual-postscript.gz
diff -ur -x make-sparky sparky.orig/python/Makefile sparky/python/Makefile
--- sparky.orig/python/Makefile 2004-02-18 10:51:06.000000000 -0800
+++ sparky/python/Makefile 2005-12-17 19:43:06.000000000 -0800
@@ -9,6 +9,8 @@
PYTHON_VERSION = 2.3
PYTHON = $(PYTHON_PREFIX)/bin/python$(PYTHON_VERSION)
PYTHON_LIB = $(PYTHON_PREFIX)/lib/python$(PYTHON_VERSION)
+PYDIR = $(SPARKY_INSTALL)/lib/python$(PYTHON_VERSION)/site-packages
+DOCDIR = $(SPARKY_INSTALL)/share/doc/sparky
PYTHON_CODE = __init__.py align.py assigngraph.py atomnames.py \
atoms.py autoassign.py axes.py \
@@ -27,18 +29,13 @@
sputil.py start_in_chimera.py strips.py subprocess.py \
tkutil.py volumeerror.py xeasy.py xplor.py
-install: $(SPARKY_INSTALL)/python $(SPARKY_INSTALL)/python/sparky \
- $(SPARKY_INSTALL)/python/lib-tk
- $(INSTALL) README $(SPARKY_INSTALL)/python
- $(INSTALL) $(PYTHON_CODE) $(SPARKY_INSTALL)/python/sparky
- $(INSTALL) lib-tk/*.py $(SPARKY_INSTALL)/python/lib-tk
- chmod 644 $(SPARKY_INSTALL)/python/README
- cd $(SPARKY_INSTALL)/python/sparky ; chmod 644 $(PYTHON_CODE)
- chmod 644 $(SPARKY_INSTALL)/python/lib-tk/*.py
- $(PYTHON) $(PYTHON_LIB)/compileall.py $(SPARKY_INSTALL)/python/sparky
- $(PYTHON) $(PYTHON_LIB)/compileall.py $(SPARKY_INSTALL)/python/lib-tk
+install: $(PYDIR) $(PYDIR)/sparky $(DOCDIR)/python
+ $(INSTALL) README $(DOCDIR)/python
+ $(INSTALL) $(PYTHON_CODE) $(PYDIR)/sparky
+ chmod 644 $(DOCDIR)/python/README
+ cd $(PYDIR)/sparky ; chmod 644 $(PYTHON_CODE)
-$(SPARKY_INSTALL)/python $(SPARKY_INSTALL)/python/sparky \
- $(SPARKY_INSTALL)/python/lib-tk:
+$(PYDIR) $(PYDIR)/sparky \
+ $(PYDIR)/lib-tk $(DOCDIR)/python:
mkdir $@
chmod 755 $@
diff -ur -x make-sparky sparky.orig/python/spingraph.py sparky/python/spingraph.py
--- sparky.orig/python/spingraph.py 2001-12-17 10:51:10.000000000 -0800
+++ sparky/python/spingraph.py 2005-12-17 22:09:17.000000000 -0800
@@ -831,7 +831,7 @@
'by creating a file specifying atom positions, colors,\n' +
'sizes, and text label positions. Sparky provides a\n' +
'default layout file\n' +
- '\n\t/usr/local/sparky/python/spinlayout.py\n\n' +
+ '\n\t/usr/lib/python*/site-packages/sparky/python/spinlayout.py\n\n' +
'You override this file by making your own copy\n' +
'\n\t~/Sparky/Python/spinlayout.py\n\n' +
'You can create the desired template on the screen\n'
|