Rev 17954 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
#!/usr/bin/make -f# debian/rules file for the Debian GNU/Linux r-base package# Copyright 1997-2001 by Douglas Bates <bates@stat.wisc.edu>, <edd@debian.org># Copyright 2001 by Dirk Eddelbuettel <edd@debian.org># $Id: rules,v 1.36.2.1 2002/01/24 16:05:41 bates Exp $package = r-basepdfpackage = r-doc-pdfhtmlpackage = r-doc-htmlgnomepackage = r-gnomenmathpackage = r-mathlib# for the standalone library, no sonames are assigned in the upstream Makefilessomaj = 1somin = 0sorel = 0libver = $(somaj).$(somin).$(sorel)debbase := $(CURDIR)/debiandebtmp := $(debbase)/tmpdebdoc := $(debbase)/$(package)/usr/share/doc/$(package)debmat := $(debbase)/$(nmathpackage)arch := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)# set this to 1 (default) if you want the Gnome GUI packagegnome = 1ifeq ($(gnome),0)gnomeconfig = --without-gnomeelsegnomeconfig = --with-gnomeendifexport DH_VERBOSE=export DH_COMPAT=3# edd 15 Aug 2001: default to blas, atlas can override itatlas = --with-blas=blas# edd 02 Sep 2001: default to g77 but let m68k use f2cfortran = --with-g77=/usr/bin/g77compiler = gcccxxcompiler = g++# edd 04 Sep 2001 default compiler flags, lowered for m68kcompilerflags = -O2# m68k barks when using g77, and when gcc use -O2ifeq ($(arch),m68k-linux)fortran = --with-f2ccompilerflags = -Oendif## edd 09 Nov 2001 ia64 needs gcc-3.0, hppa gets it by defaultifeq ($(arch),ia64-linux)fortran = --with-g77=/usr/bin/g77-3.0compiler = gcc-3.0cxxcompiler = g++-3.0compilerflags = -O2endif## lamont@debian.org 06 Dec 2001 hppa needs -ffunction-sectionsifeq ($(arch),hppa-linux)compilerflags = -O2 -ffunction-sectionsendif## try gcc-3.0 on i386 -- appears to work#ifeq ($(arch),i386-linux)#fortran = --with-g77=/usr/bin/g77-3.0#compiler = gcc-3.0#cxxcompiler = g++-3.0#compilerflags = -O2#endifget-orig-source: upstreamupstream:links http://cran.us.r-project.orgbuild: configure make-arch build-arch build-stampbuild-stamp:touch build-stampbuild-arch: configure make-arch build-arch-stampbuild-arch-stamp:touch build-arch-stampconfigure: configure-stampconfigure-stamp:dh_testdirR_UNZIPCMD=/usr/bin/miniunzip \R_ZIPCMD=/usr/bin/minizip \CC=${compiler} \CXX=${cxxcompiler} \CPPFLAGS= LIBS= FLIBS=-lg2c-pic \./configure --prefix=/usr \--with-tcltk \--with-tcl-config=/usr/lib/tcl8.3/tclConfig.sh \--with-tk-config=/usr/lib/tk8.3/tkConfig.sh \--mandir=$(debtmp)/usr/share/man \$(fortran) \$(atlas) \$(gnomeconfig) \--enable-R-profiling \--enable-R-shlib \--host $(arch)## hppa and ia64 really need the PIC version of libg2c## for conformity we will use it throughoutperl -p -i -e "s/ -lg2c / -lg2c-pic /" Makeconf## same needed for lower-level library filesfor i in ctest modreg mva ts; do \perl -p -i -e "s/ -lg2c / -lg2c-pic /" \src/library/$$i/src/Makefile; \done## and etc/Makeconfperl -p -i -e "s/ -lg2c / -lg2c-pic /" etc/Makeconftouch configure-stampmake-arch: configure make-arch-stampmake-arch-stamp:make CFLAGS="$(compilerflags)" \CXXFLAGS="$(compilerflags)" \FFLAGS="$(compilerflags)" \CC=${compiler} \CXX=${cxxcompiler}(cd src/nmath/standalone; \make CFLAGS="$(compilerflags) -D_REENTRANT" \CXXFLAGS="$(compilerflags) -D_REENTRANT"\FFLAGS="$(compilerflags) -D_REENTRANT" \CC=${compiler} \CXX=${cxxcompiler} \libRmath_la_LDFLAGS=-Wl,-soname,libRmath.so.$(somaj) )make helpmake infotouch make-arch-stampmake: configure make-arch make-stampmake-stamp:# Already made in general 'make': make htmlmake pdftouch make-stampcheck: configure make-arch check-stampcheck-stamp:ifneq ($(arch),arm-linux)make checkendiftouch check-stampclean:dh_testdirdh_testrootrm -f build-stamp configure-stamp make-stamp make-arch-stamp \install-stamp install-arch-stamp check-stamp build-arch-stamp-make distclean-rm -f `find . -name "*~"`-rm -rf debian/tmp debian/files* core debian/substvars-rm -f doc/html/function.html doc/html/packages.html-rm -f modules/*.sodh_cleaninstall-arch: make-arch check install-arch-stampinstall-arch-stamp:dh_testdirdh_testrootdh_clean -a -kdh_installdirs -Amake prefix=$(debtmp)/usr install# set R_HOME_DIR env.var. in R shell scriptsed -e '/^R_HOME_DIR=.*/s::R_HOME_DIR=/usr/lib/R:' \< bin/R > $(debtmp)/usr/bin/Rsed -e '/^R_HOME_DIR=.*/s::R_HOME_DIR=/usr/lib/R:' \< bin/R > $(debtmp)/usr/lib/R/bin/R# fix permissions (Lintian)chmod a+x $(debtmp)/usr/lib/R/share/sh/echo.sh \$(debtmp)/usr/lib/R/share/sh/help-links.sh# remove unneeded license files, but link them backrm -v $(debtmp)/usr/lib/R/COPYING \$(debtmp)/usr/lib/R/COPYING.LIB(cd $(debtmp)/usr/lib/R/; \ln -s ../../share/common-licenses/GPL COPYING; \ln -s ../../share/common-licenses/LGPL COPYING.LIB)# move the GNOME version to the r-gnome packageifneq ($(gnome),0)dh_movefiles -p$(gnomepackage) usr/lib/R/modules/R_gnome.soendif# move the html manual files in r-doc-html.files into r-doc-html# these get built in make-arch too ...dh_movefiles -p$(htmlpackage)# move files for r-basedh_movefiles -p$(package)# for the standalone library package, move the two libs# as 'make install' ignore these, we have to do it by handdh_installdirs -p$(nmathpackage) usr/include usr/libinstall -m 0644 src/nmath/standalone/libRmath.a \$(debmat)/usr/libinstall -m 0644 src/nmath/standalone/libRmath.so \$(debmat)//usr/lib/libRmath.so.$(libver)(cd $(debmat)/usr/lib; \ln -s libRmath.so.$(libver) libRmath.so.$(somaj))# and create a link for Rmath.h(cd $(debmat)/usr/include; \ln -s ../lib/R/include/Rmath.h .)touch install-arch-stampinstall: make-arch make install-arch install-stampinstall-stamp:dh_testdirdh_testrootdh_clean -a -kdh_installdirs -Amake prefix=$(debtmp)/usr install-pdf# move the pdf manual files listed in r-doc-pdf.files into r-doc-pdfdh_movefiles -p$(pdfpackage)# move the html manual files in r-doc-html.files into r-doc-htmldh_movefiles -p$(htmlpackage)touch install-stamp# Build architecture-independent files here.binary-indep: build installdh_testdir -idh_testroot -idh_link -i# dh_installdebconf -idh_installdocs -i# dh_installexamples -i# dh_installmenu -i# dh_installemacsen -i# dh_installpam -i# dh_installmime -i# dh_installinit -i# dh_installcron -i# dh_installmanpages -i# dh_installinfo -i# dh_undocumented -idh_installchangelogs -idh_compress -idh_fixperms -i# dh_suidregister -idh_installdeb -i# dh_perl -idh_gencontrol -idh_md5sums -idh_builddeb -i# Build architecture-dependent files here.binary-arch: build-arch install-arch checkdh_testdir -adh_testroot -a# dh_installdebconf -adh_link -adh_installdocs -p$(package) AUTHORS BUGS COPYRIGHTS FAQ \NEWS ONEWS README RESOURCES \THANKS Y2K debian/README.Atlasdh_installexamples -adh_installmenu -a# dh_installemacsen -a# dh_installpam -a# dh_installmime -a# dh_installinit -a# dh_installcron -a# dh_installmanpages -a -N$(gnomepackage) -p$(package) getline.3# dh_installman -p$(package) doc/R.1dh_installinfo -a -n doc/manual/R-*.info*(cd $(debdoc)/doc && ln -s ../../../../lib/R/doc/html .)(cd $(debdoc)/doc && ln -s ../../../../lib/R/doc/manual .)(cd $(debdoc) && ln -s ../../../lib/R/library .)# install lintian "silencer"install -p -m 0644 debian/$(package).lintian \$(debbase)/$(package)/usr/share/lintian/overrides/$(package)# dh_undocumented -adh_installchangelogs -a -k NEWSdh_strip -adh_compress -adh_fixperms -a# dh_suidregister -adh_makeshlibs -adh_installdeb -adh_perl -adh_shlibdeps -adh_gencontrol -adh_md5sums -a -X'usr/bin/R' -XLibIndex -Xindex.txt \-Xfunction.html -Xpackages.htmldh_builddeb -abinary: binary-arch binary-indep.PHONY: build clean binary-indep binary-arch binary install