#!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # # Modified to make a template file for a multi-binary package with separated # build-arch and build-indep targets by Bill Allombert 2001 # # Last changes are made by Antonio Salvucci # Uncomment this to turn on verbose mode. export DH_VERBOSE=1 # These are used for cross-compiling and for saving the configure script # from having to guess our platform (since we know it already) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) DEB_BUILD_GNU_SYSTEM ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_SYSTEM) DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH) ifeq ($(DEB_HOST_ARCH_CPU),powerpc) PLATFORM = linux else PLATFORM = endif ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) BUILDOPT = --build=debug endif ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) INSTALL_PROGRAM = -s endif UNUR = --enable-unuran #ifneq (,$(findstring alpha, $(DEB_BUILD_ARCH))) #UNUR = --disable-unuran #endif XRD = --enable-xrootd #ifneq (,$(findstring sparc, $(DEB_BUILD_ARCH))) #XRD = --disable-xrootd #endif DTMP = debian/tmp PREFIX = /usr SYSCONFDIR = /etc PKGDOCDIR = $(PREFIX)/share/doc/root CINTDIR = $(PREFIX)/lib/root/$(SOVERS) ICONTHEME = $(PREFIX)/share/icons/hicolor/48x48 CONFOPTIONS :=--enable-bonjour \ --enable-cintex \ --enable-clarens \ --enable-editline \ --enable-explicitlink \ --enable-gdml \ --enable-globus \ --enable-gsl-shared \ --enable-gviz \ --enable-fftw3 \ --enable-krb5 \ --enable-ldap \ --enable-qt \ --enable-qtgsi \ --enable-mathcore \ --enable-mathmore \ --enable-minuit2 \ --enable-mysql \ --enable-peac \ --enable-pgsql \ --enable-odbc \ --enable-reflex \ --enable-roofit \ --enable-ruby \ --enable-shadowpw \ --enable-shared \ --enable-soversion \ --enable-table \ --disable-rpath \ --disable-afs \ --disable-srp \ --disable-builtin-afterimage \ --disable-builtin-ftgl \ --disable-builtin-freetype \ --disable-builtin-glew \ --disable-builtin-pcre \ --disable-builtin-zlib \ --disable-alien \ --disable-chirp \ --disable-dcache \ --disable-gfal \ --disable-monalisa \ --disable-oracle \ --disable-pythia6 \ --disable-rfio \ --disable-sapdb \ --fail-on-missing \ --with-globus=/usr \ --with-globus-incdir=/usr/include/globus \ --with-globus-libdir=/usr/lib \ $(UNUR) \ $(XRD) \ $(BUILDOPT) # # Things for the future # # --enable-mathcore libroot # --enable-cintex libroot # --enable-reflex libroot # --with-globus=/opt/globus # --disable-builtin-gsl # --disable-builtin \ VERSION := $(shell cat build/version_number | tr '/' '.') MAJOR := $(shell echo $(VERSION) | tr '.' ' ' | cut -f1 -d' ') MINOR := $(shell echo $(VERSION) | tr '.' ' ' | cut -f2 -d' ') SOVERS := $(MAJOR).$(MINOR) PKGLIST := $(shell ./configure $(PLATFORM) --pkglist $(CONFOPTIONS) | sed -n -e 's/packages: //p') ESSENTIALS := libroot-core-dev \ libroot-core \ root-system-bin \ root-system-common \ ttf-root-installer PLUGINS := libroot-geom \ libroot-graf2d-gpad \ libroot-graf2d-graf \ libroot-graf2d-postscript \ libroot-graf3d-eve \ libroot-graf3d-g3d \ libroot-graf3d-gl \ libroot-gui \ libroot-gui-ged \ libroot-hist \ libroot-hist-spectrum \ libroot-io \ libroot-io-xmlparser \ libroot-math-foam \ libroot-math-genvector \ libroot-math-mathcore \ libroot-math-mathmore \ libroot-math-matrix \ libroot-math-minuit \ libroot-math-mlp \ libroot-math-quadp \ libroot-math-physics \ libroot-math-smatrix \ libroot-math-splot \ libroot-math-unuran \ libroot-misc-minicern \ libroot-misc-memstat \ libroot-misc-table \ libroot-montecarlo-eg \ libroot-montecarlo-vmc \ libroot-net \ libroot-net-auth \ libroot-net-bonjour \ libroot-net-ldap \ libroot-proof \ libroot-proof-proofplayer \ libroot-tmva \ libroot-tree \ libroot-tree-treeplayer \ root-plugin-geom-geombuilder \ root-plugin-geom-geompainter \ root-plugin-graf2d-asimage \ root-plugin-graf2d-qt \ root-plugin-graf2d-x11 \ root-plugin-graf2d-gvi \ root-plugin-graf3d-x3d \ root-plugin-gui-fitpanel \ root-plugin-gui-guibuilder \ root-plugin-gui-qt \ root-plugin-gui-sessionviewer \ root-plugin-hist-hbook \ root-plugin-hist-histpainter \ root-plugin-hist-spectrumpainter \ root-plugin-io-sql \ root-plugin-io-xml \ root-plugin-math-fftw3 \ root-plugin-math-fumili \ root-plugin-math-minuit2 \ root-plugin-net-krb5 \ root-plugin-net-netx \ root-plugin-net-xrootd \ root-plugin-proof-xproof \ root-plugin-sql-odbc \ root-plugin-tree-treeviewer \ root-system-proofd \ root-system-doc \ root-system-rootd \ root-system-xrootd EXTRAS := libroot-proof-clarens \ libroot-bindings-python \ libroot-roofit \ libroot-bindings-ruby \ root-plugin-geom-gdml \ root-plugin-io-castor \ root-plugin-io-chirp \ root-plugin-io-dcache \ root-plugin-montecarlo-pythia8 \ root-plugin-net-globus \ root-plugin-net-bonjour \ root-plugin-net-alien \ root-plugin-net-srp \ root-plugin-proof-peac \ root-plugin-sql-maxdb \ root-plugin-sql-mysql \ root-plugin-sql-oracle \ root-plugin-sql-pgsql PLUGINLIST := $(filter-out $(EXTRAS) $(ESSENTIALS), $(PKGLIST)) EXTRALIST := $(filter-out $(PLUGINS) $(ESSENTIALS), $(PKGLIST)) PLUGINLIST := $(PLUGINLIST:libroot%=libroot%-dev) EXTRALIST := $(EXTRALIST:libroot%=libroot%-dev) PLUGINHEAD := $(filter-out $(lastword $(PLUGINLIST)), $(PLUGINLIST)) PLUGINLIST := $(PLUGINHEAD:%=%,) $(lastword $(PLUGINLIST)) EXTRAHEAD := $(filter-out $(lastword $(EXTRALIST)), $(EXTRALIST)) EXTRALIST := $(EXTRAHEAD:%=%,) $(lastword $(EXTRALIST)) TEMPLATES := $(wildcard debian/*.in) SPKGLIST := $(filter-out root-system-doc root-system-common ttf-root-installer, $(PKGLIST:libroot%=libroot%$(SOVERS))) $(filter libroot%, $(PKGLIST:libroot%=libroot%-dev)) libroot-static IPKGLIST := root-system-doc ttf-root-installer root-system-common root-system DPKGLIST := $(SPKGLIST:%=%,) root-system-doc, root-ttf #root-plugins root-extra-plugins SPKGOPTS := $(SPKGLIST:%=-p%) IPKGOPTS := $(IPKGLIST:%=-p%) PKGOPTS := $(IPKGOPTS) $(SPKGOPTS) HAVERUBY := $(filter libroot-bindings-ruby, $(PKGLIST)) ifeq ($(HAVERUBY), libroot-bindings-ruby) RUBYARCHDIR := $(shell ruby -rrbconfig -e 'puts Config::CONFIG["archdir"]' | sed 's,/,,') else RUBYARCHDIR := endif HAVEPYTHON := $(filter libroot-bindings-python, $(PKGLIST)) ifeq ($(HAVEPYTHON), libroot-bindings-python) PYVERS := $(shell pyversions -vs) PYVER := $(shell python -c 'import sys; print "%d.%d" % (sys.version_info[0], sys.version_info[1])') PYTHONDIR := /usr/lib/python-support/root/python$(PYVER) else PYTHONDIR := endif # This has to be exported to make some magic below work. export DH_OPTIONS show_pkgs: @printf "SPKGLIST:\n $(foreach i, $(SPKGLIST), \t$(i)\n)" @printf "IPKGLIST:\n $(foreach i, $(IPKGLIST), \t$(i)\n)" @printf "PLUGINLIST:\n $(foreach i, $(PLUGINLIST), \t$(i)\n)" @printf "EXTRALIST:\n $(foreach i, $(EXTRALIST), \t$(i)\n)" @printf "HAVERUBY: $(HAVERUBY)\nRUBYARCHDIR: $(RUBYARCHDIR)" @printf "HAVEPYTHON: $(HAVEPYTHON)\nPYTHONDIR: $(PYTHONDIR)" show_libpkgs: @echo "$(SPKGLIST)" @echo "$(patsubst %, -p%, $(filter libroot%$(SOVERS),$(SPKGLIST)))" show_conf: ./configure $(PLATFORM) --pkglist $(CONFOPTIONS) debian/%:debian/%.in debian/rules @echo "Making $@ from $< " @sed -e 's,@prefix@,$(PREFIX),g' \ -e 's,@sysconfdir@,$(SYSCONFDIR),g' \ -e 's,@pkgdocdir@,$(PKGDOCDIR),g' \ -e 's,@rubyarchdir@,$(RUBYARCHDIR),g' \ -e 's,@pythondir@,$(PYTHONDIR),g' \ -e 's,@libvers@,$(SOVERS),g' < $< > $@ debian/control:debian/control.in debian/rules @echo "Making $@ (special)" @cp $< $@.tmp @echo "Packages are $(PKGLIST)" @for p in $(PKGLIST) ; do \ if test -f build/package/common/$$p.control ; then \ echo "Adding package $$p to control file" ; \ cat build/package/common/$$p.control >> $@.tmp ; fi ; done @builddep="$(shell ./build/package/lib/makebuilddepend.sh $(PKGLIST))" && \ sed -e 's,@prefix@,$(PREFIX),g' \ -e 's,@libvers@,$(SOVERS),g' \ -e 's,@sysconfdir@,$(SYSCONFDIR),g' \ -e 's,@pkgdocdir@,$(PKGDOCDIR),g' \ -e "s/@builddepends@/$${builddep}/" \ -e 's/@pyvers@/$(PYVER)/g' \ -e 's/@pkglist@/$(DPKGLIST)/' \ -e 's/@plugins@/$(PLUGINLIST:%,=% (>= $${binary:Version}),) (>= $${binary:Version})/' \ -e 's/@extras@/$(EXTRALIST:%,=% (>= $${binary:Version}),) (>= $${binary:Version})/' < $@.tmp > $@ rm -rf $@.tmp .PRECIOUS: debian/html.C debian/html.C: rm -f $@ @echo "{" >> $@ @echo " /* magic line from Rene */" >> $@ @echo " gEnv->SetValue(\"Root.PluginPath\"," >> $@ @echo " \"$(CURDIR)/etc/plugins\");" >> $@ @echo " gEnv->SetValue(\"Root.TTFontPath\"," >> $@ @echo " \"/usr/share/fonts/truetype/freefont/:$(CURDIR)/fonts\");" >> $@ @echo " gSystem->AddIncludePath(\"$(CURDIR)/include\");" >> $@ @echo " gSystem->AddIncludePath(\"$(CURDIR)/cint/cint/include\");" >> $@ @echo " gSystem->AddIncludePath(\"$(CURDIR)/cint/cint/stl\");" >> $@ @echo " gROOT->GetPluginManager()->" >> $@ @echo " LoadHandlersFromPluginDirs(\"\");" >> $@ @echo " gROOT->GetPluginManager()->" >> $@ @echo " AddHandler(\"TVirtualPS\",\"image\"," >> $@ @echo " \"TImageDump\",\"Postscript\"," >> $@ @echo " \"TImageDump()\");" >> $@ @echo " gROOT->GetPluginManager()->" >> $@ @echo " AddHandler(\"TVirtualStreamerInfo\"," >> $@ @echo " \"*\",\"TStreamerInfo\"," >> $@ @echo " \"RIO\",\"TStreamerInfo()\");" >> $@ @echo " gROOT->GetPluginManager()->" >> $@ @echo " AddHandler(\"TVirtualGraphPainter\", \"*\"," >> $@ @echo " \"TGraphPainter\",\"GraphPainter\",">> $@ @echo " \"TGraphPainter()\");" >> $@ @echo " THtml html;" >> $@ @echo " html.SetProductName(\"ROOT\");" >> $@ @echo " html.SetEtcDir(\"$(CURDIR)/etc/html\");" >> $@ @echo " html.SetHomepage(\"http://root.cern.ch\");" >> $@ @echo " html.LoadAllLibs();" >> $@ @echo " html.SetBatch(kTRUE);" >> $@ @echo " html.MakeAll();" >> $@ @echo "}" >> $@ htmldoc:debian/html.C build-arch-cint-stamp mkdir $(CURDIR)/etc/html.tmp for i in $(CURDIR)/etc/html/* ; do \ sed -e 's,http://root.cern.ch/drupal/sites/default/files/,,' \ -e 's,http://root.cern.ch/drupal/sites/all/themes/newsflash/images/blue/,,' < $$i > $(CURDIR)/etc/html.tmp/`basename $$i` ; \ done LD_LIBRARY_PATH=$(CURDIR)/lib:$(CURDIR)/cint/cint/include:$(CURDIR)/cint/cint/stl:$(CURDIR)/include:$(LD_LIBRARY_PATH) ROOTSYS=$(CURDIR) \ $(CURDIR)/bin/root.exe -l -b -q $^ # rm -f debian/html.C for i in info.png root-banner.png rootdrawing-logo.png ; do \ cp $(CURDIR)/etc/html/$$i $(CURDIR)/htmldoc/$$i ; done rm -rf $(CURDIR)/etc/html.tmp @touch htmldoc-stamp htmldoc-stamp: htmldoc configure-stamp:$(TEMPLATES:%.in=%) config.status config.status: configure dh_testdir # Add here commands to configure the package. ./configure $(PLATFORM) \ --prefix=$(PREFIX) \ --mandir=$(PREFIX)/share/man/man1 \ --docdir=$(PKGDOCDIR) \ --cintincdir=$(CINTDIR) \ --etcdir=$(SYSCONFDIR)/root \ --with-sys-iconpath=$(PREFIX)/share/pixmaps \ --libdir=$(PREFIX)/lib/root/$(SOVERS) \ $(CONFOPTIONS) touch math/unuran/src/headers.d touch configure-stamp # --fontdir=%_datadir/root/fonts/truetype #Architecture build: build-arch build-indep # inserted comment to unable htmldoc #build-arch: build-arch-cint-stamp htmldoc-stamp build-arch: build-arch-cint-stamp build-arch-stamp: configure-stamp # Add here commands to compile the arch part of the package. #$(MAKE) ASTEPETAG= XROOTDETAG= UNURANETAG= $(MAKE) UNURANETAG= $(MAKE) static UNURANETAG= touch build-arch-stamp build-arch-cint-stamp:build-arch-stamp $(MAKE) all-cintdlls touch build-arch-cint-stamp build-indep: build-indep-stamp build-indep-stamp: configure-stamp # Add here commands to compile the indep part of the package. #$(MAKE) doc touch build-indep-stamp clean: $(TEMPLATES:%.in=%) tar -xvzf math/unuran/src/unuran*.tar.gz #if change, correct unurar version rm -rf ./math/unuran/src/unuran-1.8.0-root mv unuran-1.8.0-root ./math/unuran/src/. dh_testdir dh_testroot debconf-updatepo --podir=build/package/debian/po rm -f debian/pyversions debian/pycombat debian/html.C rm -f build-arch-stamp build-indep-stamp build-arch-cint-stamp \ config.status configure-stamp config.log htmldoc-stamp rm -rf minuit2/src/Minuit-1_7_6 rm -rf freetype/src/freetype-2.1.9 #-rm -rf asimage/src/libAfterImage rm -rf debian/*.files debian/*.install rm -f macros/html.C rm -f memstat.root rm -f *.Cexec rm -f cint/MAKEINFO rm -f etc/daemons/proofd.rc.d rm -f etc/daemons/proofd.xinetd rm -f etc/daemons/rootd.rc.d rm -f etc/daemons/rootd.xinetd rm -f etc/daemons/olbd.rc.d rm -f etc/daemons/xrootd.rc.d rm -f qtgsi/src/G__QtGSI.cxx qtgsi/src/G__QtGSI.h rm -f qt/src/moc_*.cxx rm -f G__genreflex_rootcint.h rm -f graf2d/asimage/src/libAfterImage/Makefile rm -f graf2d/asimage/src/libAfterImage/afterbase.h rm -f graf2d/asimage/src/libAfterImage/afterimage-config rm -f graf2d/asimage/src/libAfterImage/afterimage-libs rm -f graf2d/asimage/src/libAfterImage/config.h rm -f graf2d/asimage/src/libAfterImage/config.log rm -f graf2d/asimage/src/libAfterImage/config.status rm -f graf2d/asimage/src/libAfterImage/libAfterImage.a #-rm -f net/xrootd/src/xrootd/GNUmakefile #-rm -f net/xrootd/src/xrootd/src/GNUmake.env #-rm -f net/xrootd/src/xrootd/src/GNUmake.options find . -name ".#*" | xargs rm -rf find . \( -name "G__*.cxx" \ -or -name "G__*.h" \ -or -name "G__*.c" \) \ -and -not -name "G__ci.h" \ -and -not -name G__postprocess.h \ -and -not -name "G__main.c" \ -and -not -name "G__setup.c" \ -and -not -name "G__ci_fproto.h" \ -and -not -name "G__security.h" \ | xargs rm -rf # Add here commands to clean up after the build process. [ ! -f config/Makefile.config ] || $(MAKE) distclean \ UNURANETAG= \ UNURKEEP=yes # OK to ignore errors for these - makecintdll.sh might fail -for i in climits complex deque exception list map2 map multimap2 \ multimap multiset queue set stack stdexcept valarray \ vectorbool vector ; do \ build/unix/makecintdll.sh clean $$i ; done rm -rf bin lib include htmldoc \ system.rootrc \ config/Makefile.config \ README/Changelog \ etc/system.rootrc \ etc/system.rootauthrc \ etc/system.rootdaemonrc \ etc/root.mimes \ build/misc/root-help.el \ debian/*.files \ debian/*.install \ debian/shlibs.local \ graf2d/freetype/src/freetype-2.1.3 \ cint/cint/lib/posix/a.out \ cint/cint/lib/posix/mktypes \ cint/cint/include/*.so* \ cint/cint/include/*.dll \ cint/cint/include/sys/*.so* \ cint/cint/include/sys/*.dll \ cint/cint/stl/*.so* \ cint/cint/stl/*.dll \ core/pcre/src/pcre-6.4 \ math/unuran/src/unuran-*-root/config.status \ math/unuran/src/unuran-*-root/config.log \ net/xrootd/src/xrootd/lib \ net/xrootd/src/xrootd/obj \ net/xrootd/src/xrootd/bin \ htmldoc \ math/unuran/src/unuran-*-root/config.h \ math/unuran/src/unuran-*-root/Makefile \ math/unuran/src/unuran-*-root/libtool \ math/unuran/src/unuran-*-root/stamp-h1 \ math/unuran/src/unuran-*-root/src/Makefile \ math/unuran/src/unuran-*-root/src/distr/Makefile \ math/unuran/src/unuran-*-root/src/utils/Makefile \ math/unuran/src/unuran-*-root/src/distributions/Makefile \ math/unuran/src/unuran-*-root/src/tests/Makefile \ math/unuran/src/unuran-*-root/src/methods/Makefile \ math/unuran/src/unuran-*-root/src/specfunct/Makefile \ math/unuran/src/unuran-*-root/src/urng/Makefile \ math/unuran/src/unuran-*-root/src/uniform/Makefile \ math/unuran/src/unuran-*-root/src/parser/Makefile # touch the headers for xrootd and asimage # touch net/xrootd/src/headers.d # touch graf2d/asimage/src/headers.d rm -f $(filter-out debian/control, $(TEMPLATES:%.in=%)) dh_clean pkglists: rm -rf debian/*.files debian/*.install build/package/lib/makelists.sh debian debian/tmp \ $(VERSION) $(PREFIX) $(SYSCONFDIR) $(PKGDOCDIR) # @for i in debian/libroot* ; do \ # if test -d $$i ; then continue ; fi ; \ # case $$i in \ # *-dev.*|*.in|libroot*$(SOVERS).*) continue ;; \ # *) echo "Renaming $$i to version specific" ; \ # cp $$i `echo $$i | sed 's/libroot\(.*\)\.\(.*\)/libroot\1$(SOVERS).\2/'` ;; esac ; \ # done install: install-indep install-arch install-indep: dh_testdir dh_testroot dh_clean -k -i -X$(DTMP) dh_installdirs -i # Add here commands to install the indep part of the package into # debian/-doc. #INSTALLDOC# # dh_install $(IPKGOPTS) --sourcedir=$(DTMP) dh_install -i --sourcedir=$(DTMP) #inserted comment htmldoc line #cp -a htmldoc/ $(CURDIR)/debian/root-system-doc/usr/share/doc/root/html # Make sym-link so that web-page refers to installed tutorials dir. #ln -s $(CURDIR)/debian/root-system-doc/usr/share/doc/root/tutorials \ # $(CURDIR)/debian/root-system-doc/usr/share/doc/root/html/ # Fix some permissions -find debian/root-system-common/$(PREFIX)/share/root/icons \ -perm 0755 -and -not -type d | xargs chmod a-x # mkdir -p debian/root-system-doc/usr/share/lintian/overrides/ # cp debian/root-system-doc.overrides \ # debian/root-system-doc/usr/share/lintian/overrides/root-system-doc # Install sha256sums for ttf installer cp -a debian/ttf-root-installer.sha256sums \ debian/ttf-root-installer/var/lib/ttf-root-installer/sha256sums # New Ld.so.conf file # cp debian/root-system-common.conf \ # debian/root-system-common/$(SYSCONFDIR)/ld.so.conf.d install-arch: dh_testroot dh_clean -k -s -X$(DTMP) # Need to clean this, because we don't want to use the # symblic links made later on. rm -rf $(DTMP)$(PREFIX)/lib/root dh_installdirs -s # Add here commands to install the arch part of the package into # $(DTMP). #$(MAKE) install DESTDIR=$(CURDIR)/$(DTMP) \ # ASTEPETAG= XROOTDETAG= UNURANETAG= $(MAKE) install DESTDIR=$(CURDIR)/$(DTMP) UNURANETAG= # Install desktop entry and icon mkdir -p $(DTMP)$(PREFIX)/share/applications mkdir -p $(DTMP)$(PREFIX)/share/pixmaps mkdir -p $(DTMP)$(ICONTHEME)/apps mkdir -p $(DTMP)$(ICONTHEME)/mimetypes cp debian/root-system-bin.desktop $(DTMP)$(PREFIX)/share/applications cp build/package/debian/root-system-bin.xpm \ $(DTMP)$(PREFIX)/share/pixmaps/root-system-bin.xpm cp build/package/debian/root-system-bin.png \ $(DTMP)$(ICONTHEME)/apps/root-system-bin.png cp build/package/debian/application-x-root.png \ $(DTMP)$(ICONTHEME)/mimetypes/application-x-root.png #library path patch mkdir -p $(DTMP)/etc/ld.so.conf.d cp debian/root.conf $(DTMP)/etc/ld.so.conf.d # Make root-config output '/usr/lib/root' instead of # '/usr/lib/root/' sed 's,$(PREFIX)/lib/root/$(SOVERS),$(PREFIX)/lib/root,' \ < $(DTMP)$(PREFIX)/bin/root-config > root-config.tmp mv root-config.tmp $(DTMP)$(PREFIX)/bin/root-config # Make default ZIP mode be new library (system library), # remove ROOT plug-in library from load path, since this file # is supposed to be version independent. # and set start-up url of TBrowser embedded HTML renderer to # be local install of documentation sed -e 's,Root\.ZipMode:.*,Root.ZipMode: 1,' \ -e 's,\(.*\.DynamicPath:.*\):$(PREFIX)/lib/root[^:]*\(.*\),\1\2,' \ -e 's,\(Browser.StartUrl: *\).*,\1http://localhost/doc/root/html/index.html,'\ < $(DTMP)$(SYSCONFDIR)/root/system.rootrc > rootrc.tmp mv rootrc.tmp $(DTMP)$(SYSCONFDIR)/root/system.rootrc # Rename proofserv, xrdgsiproxy, xrdpwdadmin, xrdcp, and xrd in # /usr/bin to end in `.bin' and make wrapper script in /usr/bin for i in proofserv xrdgsiproxy xrdpwdadmin xrdcp xrd ; do \ if test -f $(DTMP)$(PREFIX)/bin/$$i && \ test -f build/package/common/$$i.in ; then \ mv $(DTMP)$(PREFIX)/bin/$$i \ $(DTMP)$(PREFIX)/bin/$$i.bin ; \ sed -e 's,@prefix@,$(PREFIX),g' \ -e 's,@libvers@,$(SOVERS),g' \ < build/package/common/$$i.in \ > $(DTMP)$(PREFIX)/bin/$$i ; \ chmod 755 $(DTMP)$(PREFIX)/bin/$$i ; \ else \ echo $i missing in $(DTMP)$(PREFIX)/bin ; fi ; done # Make the empty proof log file mkdir -p $(DTMP)$(PREFIX)/share/root/proof/log touch $(DTMP)$(PREFIX)/share/root/proof/log/proof.log # Let usr/include/root/cfortran.h point to usr/include/cfortran.h rm -rf $(DTMP)$(PREFIX)/include/root/cfortran.h (cd $(DTMP)$(PREFIX)/include/root && ln -s ../cfortran.h cfortran.h) # Remove some unwanted files rm -rf $(DTMP)$(PREFIX)/share/doc/root/INSTALL rm -rf $(DTMP)$(PREFIX)/share/doc/root/LICENSE rm -rf $(DTMP)$(PREFIX)/share/doc/root/COPYING.CINT rm -rf $(DTMP)$(PREFIX)/share/doc/root/cfortran.doc rm -rf $(DTMP)$(PREFIX)/share/root/fonts/LICENSE rm -rf $(DTMP)$(CINTDIR)/cint/lib/posix/a.out rm -rf $(DTMP)$(CINTDIR)/cint/lib/posix/mktypes rm -rf $(DTMP)$(CINTDIR)/cint/lib/dll_stl/setup rm -rf $(DTMP)$(CINTDIR)/cint/lib/G__* rm -rf $(DTMP)$(CINTDIR)/cint/lib/dll_stl/G__* rm -rf $(DTMP)$(CINTDIR)/cint/lib/dll_stl/rootcint_* rm -rf $(DTMP)$(CINTDIR)/cint/lib/posix/exten.o rm -rf $(DTMP)$(CINTDIR)/cint/include/makehpib rm -rf $(DTMP)$(CINTDIR)/cint/lib/WildCard/ARCHIVE rm -rf $(DTMP)$(CINTDIR)/cint/lib/wintcldl83/wildc/wildc.dsw rm -rf $(DTMP)$(CINTDIR)/cint/lib/wintcldl83/wildc/wildc.dsp # Remove MacOSX service descriptions rm -rf $(DTMP)$(SYSCONFDIR)/root/*.plist # Remove Xinetd and Red Hat Init scripts from /etc rm -rf $(DTMP)$(SYSCONFDIR)/root/*.xinetd rm -rf $(DTMP)$(SYSCONFDIR)/root/proofd rm -rf $(DTMP)$(SYSCONFDIR)/root/rootd rm -rf $(DTMP)$(SYSCONFDIR)/root/xrootd rm -rf $(DTMP)$(SYSCONFDIR)/root/olbd # Remove sample configurations for PROOF rm -rf $(DTMP)/$(PREFIX)/share/root/proof/etc/*.sample # Remove the CVS directories if present find $(DTMP) -name "CVS" | xargs rm -fr find $(DTMP) -name ".cvsignore" | xargs rm -fr # Fix some permissions -find $(DTMP)$(CINTDIR)/cint \ -perm 755 -and -not -type d | xargs chmod a-x -chmod a+x $(DTMP)$(CINTDIR)/cint/lib/pthread/setup -chmod a+x $(DTMP)$(CINTDIR)/cint/lib/WildCard/setup -chmod a-x $(DTMP)$(PREFIX)/lib/root/$(SOVERS)/*.py -chmod a-x $(DTMP)$(SYSCONFDIR)/root/html/* # -chmod a+x $(DTMP)$(PREFIX)/lib/root/$(SOVERS)/GDMLROOT.py # Remove she-bang line from a python scripts -for i in $(DTMP)$(PREFIX)/lib/root/$(SOVERS)/*.py ; do \ sed -e 's,#!/usr/bin/env python[0-9.]*,#,' \ -e 's,#!/usr/bin/python[0-9.]*,#,' \ < $$i > $$i.tmp ; \ mv $$i.tmp $$i ; \ done # Make file lists mkdir -p $(DTMP)$(PREFIX)/lib/root ./debian/rules pkglists # --sourcedir=$(DTMP) $(SPKGOPTS) dh_install -s \ --list-missing \ --sourcedir=$(DTMP) \ -X$(PREFIX)/include/root/config.h \ -X$(PREFIX)/include/root/rootcint.pri \ -X$(PREFIX)/include/root/rootcintrule.pri \ -X$(PREFIX)/include/root/rootlibs.pri \ -X$(PREFIX)/include/root/precompile.h \ -X$(PREFIX)/include/root/precompile.h.gch \ -X$(PREFIX)/include/root/TQtWidget.cw \ -X$(PREFIX)/share/root/fonts \ -X$(PREFIX)/share/doc/root \ -X$(PREFIX)/share/man/man1/system.rootdaemonrc.1 \ -X$(PREFIX)/bin/thisroot.sh \ -X$(PREFIX)/bin/thisroot.csh \ -X$(PREFIX)/share/root/icons/ \ -X$(SYSCONFDIR)/root/rootd \ -X$(SYSCONFDIR)/root/daemons/ \ -X$(SYSCONFDIR)/root/proof/ \ -X$(SYSCONFDIR)/root/html \ -X$(SYSCONFDIR)/root/RadioNuclides.txt \ -X$(SYSCONFDIR)/root/gdb-backtrace-script \ -X$(SYSCONFDIR)/root/gdb-backtrace.sh \ -X$(SYSCONFDIR)/root/hostcert.conf \ -X$(SYSCONFDIR)/root/pdg_table.txt \ -X$(SYSCONFDIR)/root/root.mimes \ -X$(SYSCONFDIR)/root/system.rootrc \ -X$(SYSCONFDIR)/root/system.rootauthrc \ -X$(SYSCONFDIR)/root/system.rootdaemonrc \ -X$(PREFIX)/lib/root/$(SOVERS)/libAfterImage.a \ -X$(PREFIX)/lib/root/$(SOVERS)/PyCintex.pyc \ -X$(PREFIX)/lib/root/$(SOVERS)/PyCintex.pyo \ -X$(PREFIX)/lib/root/$(SOVERS)/ROOT.pyc \ -X$(PREFIX)/lib/root/$(SOVERS)/ROOT.pyo \ -X$(PREFIX)/lib/root/$(SOVERS)/cint7 \ -X$(PREFIX)/include/root/Minuit2 # $(foreach i, \ # $(wildcard $(DTMP)/$(PREFIX)/lib/root/lib*.so.$(SOVERS)), \ # -X$(i:$(DTMP)/%=%) ) # Install Lintian overrides files # for i in $(filter libroot%$(SOVERS), $(SPKGLIST)) ; do \ # t=debian/$$i/usr/share/lintian/overrides/ ; \ # rm -rf $$t ; \ # mkdir -p $$t ; \ # echo "$$i: postinst-has-useless-call-to-ldconfig" > $$t/$$i; \ # echo "$$i: postrm-has-useless-call-to-ldconfig" >> $$t/$$i; \ # done for i in debian/*.overrides ; do \ if test ! -f $$i ; then continue; fi; \ b=`basename $$i .overrides` ; \ echo "Installing Lintian override $$i in debian/$$b/usr/share/lintian/overrides/$$b" ; \ mkdir -p debian/$$b/usr/share/lintian/overrides/ ; \ cp $$i debian/$$b/usr/share/lintian/overrides/$$b ; \ done # This is for alternatives registration, if one want's to install # Richard Kreckels cint package next to ROOT # mv debian/root-system-bin/$(PREFIX)/bin/cint \ # debian/root-system-bin/$(PREFIX)/bin/cint.root # mv debian/root-system-bin/$(PREFIX)/bin/makecint \ # debian/root-system-bin/$(PREFIX)/bin/makecint.root # mv debian/root-system-bin/$(PREFIX)/share/man/man1/cint.1 \ # debian/root-system-bin/$(PREFIX)/share/man/man1/cint.root.1 # mv debian/root-system-bin/$(PREFIX)/share/man/man1/makecint.1 \ # debian/root-system-bin/$(PREFIX)/share/man/man1/makecint.root.1 # Must not depend on anything. This is to be called by # binary-arch/binary-indep # in another 'make' thread. binary-common: dh_testdir dh_testroot dh_installchangelogs dh_installdocs dh_installexamples dh_installmenu dh_installdebconf # dh_installlogrotate # dh_installemacsen # dh_installpam dh_installmime dh_installinit # dh_installcron # dh_installinfo dh_installman dh_link dh_strip dh_compress \ -Xusr/share/doc/root/test \ -Xusr/share/doc/root/tutorials \ -Xusr/share/doc/root/html dh_fixperms # dh_perl # Build architecture independent packages using the common target. binary-indep: build-indep install-indep $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common dh_installdeb -i dh_gencontrol -i dh_md5sums -i dh_builddeb -i # Build architecture dependent packages using the common target. binary-arch: build-arch install-arch $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common ifeq ($(HAVEPYTHON), libroot-bindings-python) # We make this here, so that we get the right python version on the # system compiling. echo "$(PYVER)-" > debian/pyversions endif dh_pysupport -plibroot-bindings-python-dev # $(PREFIX)/lib/root/$(SOVERS) $(PREFIX)/lib/root dh_pysupport -plibroot-core-dev \ $(PREFIX)/lib/root/$(SOVERS)/python/genreflex ifeq ($(HAVEPYTHON), libroot-bindings-python) # dh_pysupport will only write this field if the package is # named something like 'python-*', so we make it ourselves. echo "python:Provides=python$(PYVER)-pyroot" >> debian/libroot-bindings-python-dev.substvars endif dh_makeshlibs -V \ $(patsubst %, -p%, $(filter libroot%$(SOVERS),$(SPKGLIST))) dh_makeshlibs -V -n \ $(patsubst %, -p%, $(filter root-plugin%,$(SPKGLIST))) dh_installdeb -s dh_shlibdeps -s $(SPKGLIST:%=-L%) \ -l$(shell echo $(SPKGLIST:%=$(CURDIR)/debian/%$(PREFIX)/lib/root/$(SOVERS)) | tr ' ' ':') -- --warnings=1 dh_gencontrol -s dh_md5sums -s dh_builddeb -s binary: binary-arch binary-indep .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch # # EOF #