The R Project SVN R

Rev

Rev 30841 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 30841 Rev 33914
Line 1... Line 1...
1
#!/usr/bin/make -f
1
#!/usr/bin/make -f
2
# debian/rules file for the Debian GNU/Linux r-base package
2
# debian/rules file for the Debian GNU/Linux r-base package
3
# Copyright 1997-2004 by Douglas Bates <bates@stat.wisc.edu> 
3
# Copyright 1997-2004 by Douglas Bates <bates@stat.wisc.edu> 
4
#                    and Dirk Eddelbuettel <edd@debian.org>
4
#		     and Dirk Eddelbuettel <edd@debian.org>
5
 
5
 
6
# $Id: rules,v 1.56 2004/04/09 13:32:46 bates Exp $
6
# $Id: rules,v 1.56 2004/04/09 13:32:46 bates Exp $
7
 
7
 
8
corepackage	= r-base-core
8
corepackage	= r-base-core
9
latexpackage	= r-base-latex
9
latexpackage	= r-base-latex
Line 28... Line 28...
28
debinf		:= $(debbase)/$(infopackage)
28
debinf		:= $(debbase)/$(infopackage)
29
 
29
 
30
arch		:= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
30
arch		:= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
31
 
31
 
32
# set this to 1 (default) if you want the Gnome GUI package
32
# set this to 1 (default) if you want the Gnome GUI package
-
 
33
# edd 27 Feb 2005  as of R 2.1.0, the Gnome GUI is no longer included
33
gnome		= 1
34
gnome		= 0
34
ifeq ($(gnome),0)
35
ifeq ($(gnome),0)
35
gnomeconfig 	= --without-gnome
36
gnomeconfig	= --without-gnome
36
else
37
else
37
gnomeconfig	= --with-gnome
38
gnomeconfig	= --with-gnome
38
endif
39
endif
39
 
40
 
40
 
41
 
41
#export DH_VERBOSE = 1
42
#export DH_VERBOSE = 1
42
export DH_COMPAT  = 3
43
export DH_COMPAT  = 3
43
 
44
 
44
# edd 15 Aug 2001  default to blas, atlas can override it 
45
# edd 15 Aug 2001  default to blas, atlas can override it 
45
#atlas 		= --with-blas=blas
46
#atlas		= --with-blas=blas
46
# dmb 04 Apr 2003  better to use no specify blas
47
# dmb 04 Apr 2003  better to use no specify blas
47
# atlas 		= --with-blas
48
# atlas			= --with-blas
48
# edd 28 Apr 2003  try configuring with atlas
49
# edd 28 Apr 2003  try configuring with atlas
49
# atlas		= --with-blas=atlas
50
# atlas		= --with-blas=atlas
50
# edd 16 Oct 2003  back to older default
51
# edd 16 Oct 2003  back to older default
51
#atlas 		= --with-blas=blas
52
#atlas		= --with-blas=blas
52
# edd 26 Feb 2004  point to refblas3 
53
# edd 26 Feb 2004  point to refblas3 
53
atlas		= --with-blas=-lblas-3
54
atlas		= --with-blas=-lblas-3
54
 
55
 
55
# edd 08 Mar 2003  use the new lapack feature
56
# edd 08 Mar 2003  use the new lapack feature
56
# edd 27 Apr 2003  Set this to =no as we currently see numerical errors
57
# edd 27 Apr 2003  Set this to =no as we currently see numerical errors
57
#lapack		= --with-lapack=no
58
#lapack		= --with-lapack=no
58
# edd 26 Feb 2004  point to lapack3 
59
# edd 26 Feb 2004  point to lapack3 
59
lapack		= --with-lapack=-llapack-3
60
#lapack		= --with-lapack=-llapack-3
-
 
61
# edd 13 Oct 2004  Set this once again to =no as we still see numerical errors
-
 
62
lapack		= --with-lapack=no
60
 
63
 
61
# edd 02 Sep 2001  default to g77 but let m68k use f2c
64
# edd 02 Sep 2001  default to g77 but let m68k use f2c
62
# edd 06 Mar 2003  enforce 3.2 versions explicitly 
65
# edd 06 Mar 2003  enforce 3.2 versions explicitly 
63
#                  so that on testing we will pick them over 2.95
66
#		   so that on testing we will pick them over 2.95
64
# edd 07 Jun 2003  let's fall back to the default compilers
67
# edd 07 Jun 2003  let's fall back to the default compilers
65
fortrancompiler	= F77=g77
68
fortrancompiler	= F77=g77
66
compiler	= gcc
69
compiler	= gcc
67
cxxcompiler	= g++
70
cxxcompiler	= g++
68
compilerflags	= -O2
71
compilerflags	= -O2
Line 78... Line 81...
78
compilerflags	= -O1
81
compilerflags	= -O1
79
endif
82
endif
80
 
83
 
81
# edd 14 Nov 2003  turn blas off on arm
84
# edd 14 Nov 2003  turn blas off on arm
82
ifeq ($(arch),arm-linux)
85
ifeq ($(arch),arm-linux)
83
atlas 		= --without-blas
86
atlas		= --without-blas
84
endif
87
endif
85
 
88
 
86
## edd 09 Nov 2001  ia64 needs gcc-3.0, hppa gets it by default
89
## edd 09 Nov 2001  ia64 needs gcc-3.0, hppa gets it by default
87
#ifeq ($(arch),ia64-linux)
90
#ifeq ($(arch),ia64-linux)
88
#fortrancompiler = F77=g77-3.0
91
#fortrancompiler = F77=g77-3.0
Line 91... Line 94...
91
#compilerflags	= -O2
94
#compilerflags	= -O2
92
#endif
95
#endif
93
 
96
 
94
## lamont@debian.org 06 Dec 2001  hppa needs -ffunction-sections  
97
## lamont@debian.org 06 Dec 2001  hppa needs -ffunction-sections  
95
ifeq ($(arch),hppa-linux)
98
ifeq ($(arch),hppa-linux)
96
compilerflags   = -O2 -ffunction-sections
99
compilerflags	= -O2 -ffunction-sections
97
endif
100
endif
98
 
101
 
99
## edd 20 Jun 2002      no optimisation or debugging on baby systems
102
## edd 20 Jun 2002	no optimisation or debugging on baby systems
100
## edd 02 Jun 2003	use this on arm only 
103
## edd 02 Jun 2003	use this on arm only 
101
##ifneq "$(findstring $(arch), m68k-linux arm-linux)" ""
104
##ifneq "$(findstring $(arch), m68k-linux arm-linux)" ""
102
ifneq "$(findstring $(arch), arm-linux)" ""
105
ifneq "$(findstring $(arch), arm-linux)" ""
103
compilerflags	= -O0 -g0
106
compilerflags	= -O0 -g0
104
endif
107
endif
105
 
108
 
106
get-orig-source: upstream
109
get-orig-source: upstream
107
upstream:
110
upstream:
108
	#links http://cran.us.r-project.org/src/base
111
        #links http://cran.us.r-project.org/src/base
109
	links http://cran.r-project.org/src/base/?M=D
112
	links http://cran.r-project.org/src/base/?M=D
110
 
113
 
111
upstreamdevel:
114
upstreamdevel:
112
	links ftp://ftp.stat.math.ethz.ch/Software/R
115
	links ftp://ftp.stat.math.ethz.ch/Software/R
113
        #links http://cran.us.r-project.org/src/base
116
        #links http://cran.us.r-project.org/src/base
114
        #rsync -vaC rsync.r-project.org::r-devel .
117
        #rsync -vaC rsync.r-project.org::r-devel .
115
 
118
 
-
 
119
upstreamprerelease:
-
 
120
	links http://cran.r-project.org/src/base-prerelease
-
 
121
 
-
 
122
 
116
## edd 24 Oct 2003  build is invoked by the buildd, so we would prefer to
123
## edd 24 Oct 2003  build is invoked by the buildd, so we would prefer to
117
##  		    not imply build-indep; unfortunately R does not build
124
##		    not imply build-indep; unfortunately R does not build
118
##		    properly without it, so we have to stick with it
125
##		    properly without it, so we have to stick with it
119
## edd 15 Jan 2004  trying again on build only build: build-arch build-indep
126
## edd 15 Jan 2004  trying again on build only build: build-arch build-indep
120
##                  the main hook is to then have binary depend on both
127
##		    the main hook is to then have binary depend on both
121
##		    binary-arch and binary-indep, and those on their builds
128
##		    binary-arch and binary-indep, and those on their builds
122
build: build-arch 
129
build: build-arch 
123
 
130
 
124
build-arch: make-arch 
131
build-arch: make-arch 
125
 
132
 
Line 157... Line 164...
157
		    --with-readline			\
164
		    --with-readline			\
158
		    --with-tcltk			\
165
		    --with-tcltk			\
159
		    --with-zlib				\
166
		    --with-zlib				\
160
		    --mandir=/usr/share/man		\
167
		    --mandir=/usr/share/man		\
161
		    --infodir=/usr/share/info		\
168
		    --infodir=/usr/share/info		\
162
		    $(atlas) 		\
169
		    $(atlas)		\
163
		    $(lapack)		\
170
		    $(lapack)		\
164
		    $(gnomeconfig)			\
171
		    $(gnomeconfig)			\
165
		    --enable-R-profiling		\
172
		    --enable-R-profiling		\
166
		    --enable-R-shlib			\
173
		    --enable-R-shlib			\
167
		    --without-recommended-packages	\
174
		    --without-recommended-packages	\
Line 173... Line 180...
173
make-arch-stamp: 
180
make-arch-stamp: 
174
	@echo "*** make-arch ***"
181
	@echo "*** make-arch ***"
175
	$(MAKE)		CFLAGS="$(compilerflags)"		\
182
	$(MAKE)		CFLAGS="$(compilerflags)"		\
176
			CXXFLAGS="$(compilerflags)"		\
183
			CXXFLAGS="$(compilerflags)"		\
177
			FFLAGS="$(compilerflags)"		\
184
			FFLAGS="$(compilerflags)"		\
178
			CC=${compiler} 				\
185
			CC=${compiler}				\
179
			CXX=${cxxcompiler}			\
186
			CXX=${cxxcompiler}			\
180
			${fortrancompiler}			\
187
			${fortrancompiler}			\
181
			R
188
			R
182
 
189
 
183
        # the top-level 'make stamp-recommended' target implies 'make docs'
190
        # the top-level 'make stamp-recommended' target implies 'make docs'
184
        # which (for the buildds) implies a lot of time wasted generating 
191
        # which (for the buildds) implies a lot of time wasted generating 
185
        # output we already take from the initial i386 build
192
        # output we already take from the initial i386 build
186
#	$(MAKE)		CFLAGS="$(compilerflags)"		\
193
#	$(MAKE)		CFLAGS="$(compilerflags)"		\
187
#			CXXFLAGS="$(compilerflags)"		\
194
#			CXXFLAGS="$(compilerflags)"		\
188
#			FFLAGS="$(compilerflags)"		\
195
#			FFLAGS="$(compilerflags)"		\
189
#			CC=${compiler} 				\
196
#			CC=${compiler}				\
190
#			CXX=${cxxcompiler}			\
197
#			CXX=${cxxcompiler}			\
191
#			${fortrancompiler}			\
198
#			${fortrancompiler}			\
192
#			stamp-recommended
199
#			stamp-recommended
193
 
200
 
194
        # make standalone math lib
201
        # make standalone math lib
195
	(cd src/nmath/standalone; 				\
202
	(cd src/nmath/standalone;				\
196
		$(MAKE)	CFLAGS="$(compilerflags) -D_REENTRANT"	\
203
		$(MAKE)	CFLAGS="$(compilerflags) -D_REENTRANT"	\
197
			CXXFLAGS="$(compilerflags) -D_REENTRANT"\
204
			CXXFLAGS="$(compilerflags) -D_REENTRANT"\
198
			FFLAGS="$(compilerflags) -D_REENTRANT"	\
205
			FFLAGS="$(compilerflags) -D_REENTRANT"	\
199
			CC=${compiler} 				\
206
			CC=${compiler}				\
200
			CXX=${cxxcompiler} 			\
207
			CXX=${cxxcompiler}			\
201
			${fortrancompiler}			\
208
			${fortrancompiler}			\
202
			libRmath_la_LDFLAGS=-Wl,-soname,libRmath.so.$(somaj) \
209
			libRmath_la_LDFLAGS=-Wl,-soname,libRmath.so.$(somaj) \
203
			)
210
			)
204
 
211
 
205
        # edd 25 Jan 2004  make install needs html docs
212
        # edd 25 Jan 2004  make install needs html docs
Line 214... Line 221...
214
 
221
 
215
make-indep: configure make-indep-stamp
222
make-indep: configure make-indep-stamp
216
make-indep-stamp:
223
make-indep-stamp:
217
	@echo "*** make-indep ***"
224
	@echo "*** make-indep ***"
218
        ## edd 12 Jan 2004 uncommenting 'make docs' to split binary all/any
225
        ## edd 12 Jan 2004 uncommenting 'make docs' to split binary all/any
219
        ##        now that recommended packages aren't made
226
        ##	  now that recommended packages aren't made
220
        ## edd 25 Jan 2004 make docs and make html are made in make-arch
227
        ## edd 25 Jan 2004 make docs and make html are made in make-arch
221
        ## edd 05 Feb 2004 finally, this works in pre-1.9.0 with Kurt's
228
        ## edd 05 Feb 2004 finally, this works in pre-1.9.0 with Kurt's
222
        ##                 R_CMD_BUILD_HELP_OPTS
229
        ##		   R_CMD_BUILD_HELP_OPTS
223
	$(MAKE) docs
230
	$(MAKE) docs
224
	$(MAKE) html
231
	$(MAKE) html
225
	$(MAKE) help
232
	$(MAKE) help
226
	$(MAKE) info
233
	$(MAKE) info
227
	$(MAKE) pdf
234
	$(MAKE) pdf
Line 231... Line 238...
231
make-stamp: make-arch make-indep 
238
make-stamp: make-arch make-indep 
232
 
239
 
233
check: make-arch check-stamp
240
check: make-arch check-stamp
234
check-stamp: 
241
check-stamp: 
235
	@echo "*** check ***"
242
	@echo "*** check ***"
236
#ifneq	($(arch),arm-linux)
243
ifneq	($(arch),arm-linux)
237
#	-make check
244
	-make check
238
#endif
245
endif
239
	touch check-stamp
246
	touch check-stamp
240
 
247
 
241
clean:
248
clean:
242
	@echo "*** clean ***"
249
	@echo "*** clean ***"
243
	dh_testdir
250
	dh_testdir
244
	dh_testroot
251
	dh_testroot
245
	rm -f 	configure-stamp \
252
	rm -f	configure-stamp \
246
		build-stamp build-indep-stamp build-arch-stamp \
253
		build-stamp build-indep-stamp build-arch-stamp \
247
		make-stamp make-arch-stamp make-indep-stamp \
254
		make-stamp make-arch-stamp make-indep-stamp \
248
		install-indep-stamp install-arch-stamp \
255
		install-indep-stamp install-arch-stamp \
249
		check-stamp 
256
		check-stamp 
250
	-$(MAKE) distclean
257
	-$(MAKE) distclean
Line 265... Line 272...
265
	dh_testdir
272
	dh_testdir
266
	dh_testroot
273
	dh_testroot
267
	dh_clean -a -k
274
	dh_clean -a -k
268
	dh_installdirs -A
275
	dh_installdirs -A
269
 
276
 
270
	$(MAKE) prefix=$(debtmp)/usr   	 		\
277
	$(MAKE) prefix=$(debtmp)/usr			\
271
		mandir=$(debtmp)/usr/share/man		install
278
		mandir=$(debtmp)/usr/share/man		install
272
 
279
 
273
        # link $R_HOME/bin/R to real one, and set R_HOME_DIR env.var. 
280
        # link $R_HOME/bin/R to real one, and set R_HOME_DIR env.var. 
274
	(cd $(debtmp)/usr/lib/R/bin/; 					\
281
	(cd $(debtmp)/usr/lib/R/bin/;					\
275
		ln -svf ../../../bin/R R;				\
282
		ln -svf ../../../bin/R R;				\
276
		cd ../../../bin;					\
283
		cd ../../../bin;					\
277
		perl -p -i -e						\
284
		perl -p -i -e						\
278
		    's|^R_HOME_DIR=.*|R_HOME_DIR=/usr/lib/R|' R)
285
		    's|^R_HOME_DIR=.*|R_HOME_DIR=/usr/lib/R|' R)
279
 
286
 
Line 283... Line 290...
283
#		perl -p -i -e \
290
#		perl -p -i -e \
284
#			"s|R_BROWSER-'.*'|R_BROWSER-'/usr/bin/mozilla'|" \
291
#			"s|R_BROWSER-'.*'|R_BROWSER-'/usr/bin/mozilla'|" \
285
#			Renviron)
292
#			Renviron)
286
 
293
 
287
        # fix permissions (Lintian)
294
        # fix permissions (Lintian)
288
	chmod a+x 	$(debtmp)/usr/lib/R/share/sh/echo.sh 		\
295
	chmod a+x	$(debtmp)/usr/lib/R/share/sh/echo.sh		\
289
			$(debtmp)/usr/lib/R/share/sh/help-links.sh	\
296
			$(debtmp)/usr/lib/R/share/sh/help-links.sh	\
290
			$(debtmp)/usr/lib/R/share/sh/help-print.sh
297
			$(debtmp)/usr/lib/R/share/sh/help-print.sh
291
 
298
 
292
        # remove unneeded license files, but link them back
299
        # remove unneeded license files, but link them back
293
	rm -v 	$(debtmp)/usr/lib/R/COPYING 		\
300
	rm -v	$(debtmp)/usr/lib/R/COPYING		\
294
		$(debtmp)/usr/lib/R/COPYING.LIB 
301
		$(debtmp)/usr/lib/R/COPYING.LIB 
295
	(cd $(debtmp)/usr/lib/R/; \
302
	(cd $(debtmp)/usr/lib/R/; \
296
		ln -s ../../share/common-licenses/GPL COPYING; \
303
		ln -s ../../share/common-licenses/GPL COPYING; \
297
		ln -s ../../share/common-licenses/LGPL COPYING.LIB)
304
		ln -s ../../share/common-licenses/LGPL COPYING.LIB)
298
 
305
 
Line 300... Line 307...
300
ifneq "$(findstring $(arch), m68k-linux arm-linux)" ""
307
ifneq "$(findstring $(arch), m68k-linux arm-linux)" ""
301
	perl -p -i -e 's/-g -O2/-g0 -O0/g' $(debtmp)/usr/lib/R/etc/Makeconf
308
	perl -p -i -e 's/-g -O2/-g0 -O0/g' $(debtmp)/usr/lib/R/etc/Makeconf
302
endif
309
endif
303
 
310
 
304
        # edd 10 Jan 2003 fix Perl interpreter path
311
        # edd 10 Jan 2003 fix Perl interpreter path
305
	(cd $(debtmp)/usr/lib/R/bin; 					\
312
	(cd $(debtmp)/usr/lib/R/bin;					\
306
	    for file in Rdconv Rdindex Rprof Sd2Rd build check; do 	\
313
	    for file in Rdconv Rprof Sd2Rd build check; do	\
307
		perl -p -i -e "s|/usr/local/bin/perl|/usr/bin/perl|" 	\
314
		perl -p -i -e "s|/usr/local/bin/perl|/usr/bin/perl|"	\
308
		   $${file};						\
315
		   $${file};						\
309
	done)
316
	done)
310
 
317
 
311
        # that being done, now install in different sub-packages
318
        # that being done, now install in different sub-packages
312
 
319
 
313
        # move the GNOME version to the r-gnome package
320
        # move the GNOME version to the r-gnome package
314
ifneq ($(gnome),0)
321
#ifeq ($(gnome),1)
315
	dh_movefiles	-p$(gnomepackage) 	usr/lib/R/modules/R_gnome.so
322
#	dh_movefiles	-p$(gnomepackage)	usr/lib/R/modules/R_gnome.so
316
endif
323
#endif
317
 
324
 
318
        # move files for r-recommended
325
        # move files for r-recommended
319
        # doing this before html/latex moves ensure they keep their tex/latex
326
        # doing this before html/latex moves ensure they keep their tex/latex
320
#	dh_movefiles	-p$(recdpackage)
327
#	dh_movefiles	-p$(recdpackage)
321
 
328
 
Line 325... Line 332...
325
        # move files for r-base-html
332
        # move files for r-base-html
326
	dh_movefiles	-pr-base-html
333
	dh_movefiles	-pr-base-html
327
        # move files for r-base-latex
334
        # move files for r-base-latex
328
	dh_movefiles	-pr-base-latex
335
	dh_movefiles	-pr-base-latex
329
 
336
 
330
	make    	prefix=$(debtmp)/usr   	 		install-pdf
337
	make		prefix=$(debtmp)/usr			install-pdf
331
 
338
 
332
        # the indep package r-doc-info is made now 
339
        # the indep package r-doc-info is made now 
333
	make    	prefix=$(debtmp)/usr  \
340
	make		prefix=$(debtmp)/usr  \
334
			infodir=$(debtmp)/usr/share/info	install-info
341
			infodir=$(debtmp)/usr/share/info	install-info
335
 
342
 
336
        # move the pdf manual files listed in r-doc-pdf.files into r-doc-pdf 
343
        # move the pdf manual files listed in r-doc-pdf.files into r-doc-pdf 
337
	dh_movefiles	-p$(pdfpackage)		
344
	dh_movefiles	-p$(pdfpackage)		
338
        # move the html manual files in r-doc-html.files into r-doc-html 
345
        # move the html manual files in r-doc-html.files into r-doc-html 
339
	dh_movefiles	-p$(htmlpackage)		
346
	dh_movefiles	-p$(htmlpackage)		
340
	touch install-indep-stamp
347
	touch install-indep-stamp
341
        # move files for r-doc-info
348
        # move files for r-doc-info
342
	dh_movefiles	-p$(infopackage)
349
	dh_movefiles	-p$(infopackage)
343
        # deal with stupid automake / install-info issue (cf #235713)
350
        # deal with stupid automake / install-info issue (cf #235713)
344
	rm -vf	$(debinf)/usr/share/info/dir 		\
351
	rm -vf	$(debinf)/usr/share/info/dir		\
345
		$(debinf)/usr/share/info/dir.old 	
352
		$(debinf)/usr/share/info/dir.old	
346
 
353
 
347
        # move all the rest into r-base-core
354
        # move all the rest into r-base-core
348
	dh_movefiles	-p$(corepackage)
355
	dh_movefiles	-p$(corepackage)
349
 
356
 
350
        # for the standalone library package, move the two libs
357
        # for the standalone library package, move the two libs
351
        # as 'make install' ignores these, we have to do it by hand
358
        # as 'make install' ignores these, we have to do it by hand
-
 
359
#ifeq ($(gnome),1)
-
 
360
#	dh_installdirs -p$(gnomepackage) usr/share/lintian/overrides
-
 
361
#endif
352
	dh_installdirs -p$(nmathpackage) usr/include usr/lib \
362
	dh_installdirs -p$(nmathpackage) usr/include usr/lib \
353
					usr/share/lintian/overrides
363
					usr/share/lintian/overrides 
354
	install -m 0644 src/nmath/standalone/libRmath.a     \
364
	install -m 0644 src/nmath/standalone/libRmath.a		\
355
			$(debmat)/usr/lib
365
			$(debmat)/usr/lib
356
	install -m 0644 src/nmath/standalone/libRmath.so    \
366
	install -m 0644 src/nmath/standalone/libRmath.so	\
357
			$(debmat)/usr/lib/libRmath.so.$(libver)
367
			$(debmat)/usr/lib/libRmath.so.$(libver)
358
	(cd $(debmat)/usr/lib; \
368
	(cd $(debmat)/usr/lib; \
359
			ln -s libRmath.so.$(libver) libRmath.so.$(somaj); \
369
			ln -s libRmath.so.$(libver) libRmath.so.$(somaj); \
360
			ln -s libRmath.so.$(somaj)  libRmath.so)
370
			ln -s libRmath.so.$(somaj)  libRmath.so)
361
        # and create a link for Rmath.h 
371
        # and create a link for Rmath.h 
362
	(cd $(debmat)/usr/include; \
372
        #(cd $(debmat)/usr/include; \
363
			ln -s ../lib/R/include/Rmath.h .)
373
        #		ln -s ../lib/R/include/Rmath.h .)
364
 
-
 
-
 
374
        # rather copy directly into the more independent package r-mathlib
-
 
375
	install -m 0644 src/include/Rmath.h			\
-
 
376
			$(debmat)/usr/include
365
        # now deal with $R_HOME/etc <--> /etc/R
377
        # now deal with $R_HOME/etc <--> /etc/R
366
        # edd 03 Apr 2003  patch Renviron for new R_LIBS standard
378
        # edd 03 Apr 2003  patch Renviron for new R_LIBS standard
367
        # edd 24 Apr 2004  patch Renviron for R_PAPERSIZE (bug #245525)
379
        # edd 24 Apr 2004  patch Renviron for R_PAPERSIZE (bug #245525)
368
        # edd 16 Jun 2004        nope, doesn't work
380
        # edd 16 Jun 2004	 nope, doesn't work
-
 
381
	# edd 09 Apr 2005  also move the new file repositories to /etc/R
369
	(cd $(debetc); \
382
	(cd $(debetc); \
370
		cat $(debbase)/Renviron-R_LIBS.patch | patch --verbose;	\
383
		cat $(debbase)/Renviron-R_LIBS.patch | patch --verbose;	\
371
		mv Makeconf Renviron	../../../../etc/R/; 		\
384
		mv Makeconf Renviron repositories \
-
 
385
					../../../../etc/R/;		\
372
		ln -s  /etc/R/Makeconf  .; 				\
386
		ln -s  /etc/R/Makeconf	.;				\
373
		ln -s  /etc/R/Renviron  .  				)
387
		ln -s  /etc/R/Renviron	.;				\
-
 
388
		ln -s  /etc/R/repositories .				)
374
        ##	cat $(debbase)/Renviron-R_PAPERSIZE.patch | patch --verbose; 
389
	##	cat $(debbase)/Renviron-R_PAPERSIZE.patch | patch --verbose; 
375
 
390
 
376
	touch install-arch-stamp
391
	touch install-arch-stamp
377
 
392
 
378
#install-indep: make-arch make-indep install-arch install-indep-stamp
393
#install-indep: make-arch make-indep install-arch install-indep-stamp
379
install-indep: make-indep install-indep-stamp
394
install-indep: make-indep install-indep-stamp
Line 382... Line 397...
382
	dh_testdir
397
	dh_testdir
383
	dh_testroot
398
	dh_testroot
384
	dh_clean -a -k
399
	dh_clean -a -k
385
	dh_installdirs -A
400
	dh_installdirs -A
386
 
401
 
387
#	make    	prefix=$(debtmp)/usr   	 		install-pdf
402
#	make		prefix=$(debtmp)/usr			install-pdf
388
#
403
#
389
#        # the indep package r-doc-info is made now 
404
#	 # the indep package r-doc-info is made now 
390
#	make    	prefix=$(debtmp)/usr  \
405
#	make		prefix=$(debtmp)/usr  \
391
#			infodir=$(debtmp)/usr/share/info	install-info
406
#			infodir=$(debtmp)/usr/share/info	install-info
392
#
407
#
393
#        # move the pdf manual files listed in r-doc-pdf.files into r-doc-pdf 
408
#	 # move the pdf manual files listed in r-doc-pdf.files into r-doc-pdf 
394
#	dh_movefiles	-p$(pdfpackage)		
409
#	dh_movefiles	-p$(pdfpackage)		
395
#        # move the html manual files in r-doc-html.files into r-doc-html 
410
#	 # move the html manual files in r-doc-html.files into r-doc-html 
396
#	dh_movefiles	-p$(htmlpackage)		
411
#	dh_movefiles	-p$(htmlpackage)		
397
#	touch install-indep-stamp
412
#	touch install-indep-stamp
398
#        # move files for r-doc-info
413
#	 # move files for r-doc-info
399
#	dh_movefiles	-p$(infopackage)
414
#	dh_movefiles	-p$(infopackage)
400
 
415
 
401
        # but clean up dir and old.dir	
416
        # but clean up dir and old.dir	
402
	rm -vf 		$(debbase)/$(infopackage)/usr/share/info/dir \
417
	rm -vf		$(debbase)/$(infopackage)/usr/share/info/dir \
403
			$(debbase)/$(infopackage)/usr/share/info/dir.old
418
			$(debbase)/$(infopackage)/usr/share/info/dir.old
404
 
419
 
-
 
420
	dh_installdirs $(gnomepackage)
-
 
421
	dh_installchangelogs -p$(gnomepackage) 
-
 
422
 
-
 
423
	touch install-indep-stamp
-
 
424
 
-
 
425
 
405
# Build architecture-independent files here.
426
# Build architecture-independent files here.
406
# edd 5 Feb 2004 binary-indep: build-indep install-indep
427
# edd 5 Feb 2004 binary-indep: build-indep install-indep
407
binary-indep: build-indep install-indep
428
binary-indep: build-indep install-indep
408
	@echo "*** binary-indep ***"
429
	@echo "*** binary-indep ***"
409
	dh_testdir -i
430
	dh_testdir -i
410
	dh_testroot -i
431
	dh_testroot -i
411
	dh_link -i
432
	dh_link -i -N$(gnomepackage)
412
        #dh_installdebconf -i
433
        #dh_installdebconf -i
413
	dh_installdocs -i
434
	dh_installdocs -i
414
        #dh_installexamples -i
435
        #dh_installexamples -i
415
        #dh_installmenu -i
436
        #dh_installmenu -i
416
        #dh_installemacsen -i
437
        #dh_installemacsen -i
Line 438... Line 459...
438
binary-arch: build-arch check install-arch 
459
binary-arch: build-arch check install-arch 
439
	@echo "*** binary-arch ***"
460
	@echo "*** binary-arch ***"
440
	dh_testdir -a
461
	dh_testdir -a
441
	dh_testroot -a
462
	dh_testroot -a
442
        #dh_installdebconf -a
463
        #dh_installdebconf -a
443
	dh_link -a
464
	#dh_link -a
-
 
465
#ifeq ($(gnome),1)
-
 
466
#	dh_link -p$(gnomepackage)
-
 
467
#endif
444
	dh_installdocs -p$(corepackage) AUTHORS BUGS  NEWS ONEWS README \
468
	dh_installdocs -p$(corepackage) AUTHORS NEWS ONEWS README \
445
					RESOURCES THANKS Y2K \
469
					RESOURCES THANKS Y2K \
446
					debian/README.Atlas \
470
					debian/README.Atlas \
447
					debian/README.mathlib
471
					debian/README.mathlib
-
 
472
	dh_installdocs -p$(nmathpackage) AUTHORS NEWS ONEWS README \
-
 
473
					RESOURCES THANKS Y2K \
-
 
474
					debian/README.mathlib
448
	dh_installexamples -a
475
        #dh_installexamples -a
-
 
476
        #dh_installexamples -p$(corepackage)	src/nmath/standalone/test.c
449
	dh_installexamples -p$(corepackage)	src/nmath/standalone/test.c
477
	dh_installexamples -p$(nmathpackage)	src/nmath/standalone/test.c
450
	dh_installmenu -a
478
	dh_installmenu -a
451
        #dh_installemacsen -a
479
        #dh_installemacsen -a
452
        #dh_installpam -a
480
        #dh_installpam -a
453
        #dh_installmime -a
481
        #dh_installmime -a
454
        #dh_installinit -a
482
        #dh_installinit -a
455
        #dh_installcron -a
483
        #dh_installcron -a
456
        #dh_installmanpages -a	-N$(gnomepackage) -p$(corepackage) getline.3
484
        #dh_installmanpages -a	-N$(gnomepackage) -p$(corepackage) getline.3
457
        #dh_installman 		-p$(corepackage) doc/R.1
485
        #dh_installman		-p$(corepackage) doc/R.1
458
        ## dh_installinfo -a	-n doc/manual/R-*.info*
486
        ## dh_installinfo -a	-n doc/manual/R-*.info*
459
        ## edd 04 Apr 2004 manual is dangling unless r-doc-pdf is installed ...
487
        ## edd 04 Apr 2004 manual is dangling unless r-doc-pdf is installed ...
460
        ##(cd $(debdoc)/doc && ln -s ../../../../lib/R/doc/html .)
488
        ##(cd $(debdoc)/doc && ln -s ../../../../lib/R/doc/html .)
461
        ##(cd $(debdoc)/doc && ln -s ../../../../lib/R/doc/manual .)
489
        ##(cd $(debdoc)/doc && ln -s ../../../../lib/R/doc/manual .)
462
        # ... so install doc as a link, as we already did with library
490
        # ... so install doc as a link, as we already did with library
Line 467... Line 495...
467
	   $(debbase)/$(corepackage)/usr/share/lintian/overrides/$(corepackage)
495
	   $(debbase)/$(corepackage)/usr/share/lintian/overrides/$(corepackage)
468
#	install -p -m 0644  debian/$(recdpackage).lintian \
496
#	install -p -m 0644  debian/$(recdpackage).lintian \
469
#	   $(debbase)/$(recdpackage)/usr/share/lintian/overrides/$(recdpackage)
497
#	   $(debbase)/$(recdpackage)/usr/share/lintian/overrides/$(recdpackage)
470
	install -p -m 0644  debian/$(nmathpackage).lintian \
498
	install -p -m 0644  debian/$(nmathpackage).lintian \
471
	   $(debbase)/$(nmathpackage)/usr/share/lintian/overrides/$(nmathpackage)
499
	   $(debbase)/$(nmathpackage)/usr/share/lintian/overrides/$(nmathpackage)
-
 
500
#ifeq ($(gnome),1)
-
 
501
#	install -p -m 0644  debian/$(gnomepackage).lintian \
-
 
502
#	   $(debbase)/$(gnomepackage)/usr/share/lintian/overrides/$(gnomepackage)
-
 
503
#endif
472
        #dh_undocumented -a
504
        #dh_undocumented -a
473
	dh_installchangelogs -a	-k NEWS 
505
	dh_installchangelogs -a	-k NEWS 
474
	dh_strip -a
506
	dh_strip -a
475
	dh_compress -a
507
	dh_compress -a
476
	dh_fixperms -a
508
	dh_fixperms -a