From fd98ed5ee8f5228b3da505741e1ddc2dec80aac7 Mon Sep 17 00:00:00 2001
From: Fons Rademakers <Fons.Rademakers@cern.ch>
Date: Mon, 1 Dec 2008 18:57:34 +0000
Subject: [PATCH] from Christian Holm: new and updated debian and rpm package
 infrastructure files. Reflects now re-organized source tree.

git-svn-id: http://root.cern.ch/svn/root/trunk@26564 27541ba8-7e3a-0410-8455-c3a389f83636
---
 .../libroot-bindings-python-dev.install.in    |   3 +
 ...ontrol => libroot-bindings-python.control} |  17 +-
 ....control => libroot-bindings-ruby.control} |  13 +-
 ...install.in => libroot-core-dev.install.in} |   4 +
 .../{libroot.control => libroot-core.control} |  29 +-
 ...oot.install.in => libroot-core.install.in} |   0
 build/package/common/libroot-geom.control     |  20 +
 .../common/libroot-graf2d-gpad.control        |  18 +
 .../common/libroot-graf2d-graf.control        |  18 +
 .../common/libroot-graf2d-postscript.control  |  17 +
 .../package/common/libroot-graf3d-eve.control |  20 +
 .../package/common/libroot-graf3d-g3d.control |  25 ++
 .../package/common/libroot-graf3d-gl.control  |  24 ++
 build/package/common/libroot-gui-ged.control  |  17 +
 build/package/common/libroot-gui.control      |  20 +
 .../common/libroot-hist-spectrum.control      |  18 +
 build/package/common/libroot-hist.control     |  19 +
 build/package/common/libroot-html.control     |  20 +
 .../common/libroot-io-xmlparser.control       |  18 +
 build/package/common/libroot-io.control       |  18 +
 build/package/common/libroot-ldap.control     |   5 +-
 .../package/common/libroot-math-foam.control  |  27 ++
 .../common/libroot-math-genvector.control     |  18 +
 .../common/libroot-math-mathcore.control      |  16 +
 ....control => libroot-math-mathmore.control} |  15 +-
 .../common/libroot-math-matrix.control        |  18 +
 ...it.control => libroot-math-minuit.control} |  15 +-
 ...t-mlp.control => libroot-math-mlp.control} |  15 +-
 .../common/libroot-math-physics.control       |  18 +
 ...adp.control => libroot-math-quadp.control} |  13 +-
 .../common/libroot-math-smatrix.control       |  18 +
 .../package/common/libroot-math-splot.control |  68 +++
 ...an.control => libroot-math-unuran.control} |  17 +-
 .../common/libroot-misc-minicern.control      |  18 +
 .../package/common/libroot-misc-table.control |  18 +
 .../common/libroot-montecarlo-eg.control      |  18 +
 .../common/libroot-montecarlo-g4root.control  |  18 +
 .../libroot-montecarlo-vmc-dev.install.in     |   1 +
 .../common/libroot-montecarlo-vmc.control     |  19 +
 build/package/common/libroot-net-auth.control |  19 +
 build/package/common/libroot-net-ldap.control |  20 +
 build/package/common/libroot-net.control      |  18 +
 ....control => libroot-proof-clarens.control} |  17 +-
 build/package/common/libroot-proof.control    |  20 +
 .../package/common/libroot-python.install.in  |   1 -
 build/package/common/libroot-roofit.control   |  11 +-
 .../package/common/libroot-static.install.in  |   5 +
 build/package/common/libroot-tmva.control     |  12 +-
 .../common/libroot-tree-treeplayer.control    |  15 +
 build/package/common/libroot-tree.control     |  19 +
 .../common/root-plugin-geom-gdml.control      |   9 +
 ...ll.in => root-plugin-geom-gdml.install.in} |   3 -
 .../root-plugin-geom-geombuilder.control      |   9 +
 .../root-plugin-geom-geompainter.control      |   9 +
 build/package/common/root-plugin-gl.control   |  13 -
 .../common/root-plugin-graf2d-asimage.control |   9 +
 ....control => root-plugin-graf2d-qt.control} |   5 +-
 .../common/root-plugin-graf2d-x11.control     |  10 +
 .../common/root-plugin-graf3d-x3d.control     |  11 +
 .../common/root-plugin-gui-fitpanel.control   |   9 +
 .../common/root-plugin-gui-guibuilder.control |   9 +
 .../package/common/root-plugin-gui-qt.control |   7 +
 .../root-plugin-gui-sessionviewer.control     |   9 +
 ...control => root-plugin-hist-hbook.control} |   6 +-
 ...l.in => root-plugin-hist-hbook.install.in} |   2 -
 .../root-plugin-hist-histpainter.control      |   8 +
 .../root-plugin-hist-spectrumpainter.control  |   8 +
 ....control => root-plugin-io-castor.control} |   8 +-
 ...p.control => root-plugin-io-chirp.control} |   6 +-
 ....control => root-plugin-io-dcache.control} |   6 +-
 .../common/root-plugin-io-gfal.control        |   7 +
 ...sql.control => root-plugin-io-sql.control} |   8 +-
 ...xml.control => root-plugin-io-xml.control} |   4 +-
 ...control => root-plugin-math-fftw3.control} |   8 +-
 ...ontrol => root-plugin-math-fumili.control} |   5 +-
 ...ntrol => root-plugin-math-minuit2.control} |   5 +-
 ...=> root-plugin-montecarlo-pythia5.control} |   5 +-
 ...=> root-plugin-montecarlo-pythia6.control} |   4 +-
 .../root-plugin-montecarlo-pythia8.control    |   9 +
 ....control => root-plugin-net-alien.control} |   6 +-
 .../common/root-plugin-net-glite.control      |   8 +
 ...control => root-plugin-net-globus.control} |   6 +-
 ...5.control => root-plugin-net-krb5.control} |   5 +-
 .../common/root-plugin-net-monalisa.control   |   7 +
 ...x.control => root-plugin-net-netx.control} |   7 +-
 ...rp.control => root-plugin-net-srp.control} |   6 +-
 .../common/root-plugin-net-xrootd.install.in  |   3 +
 ...control => root-plugin-proof-peac.control} |   8 +-
 .../root-plugin-proof-proofplayer.control     |   9 +
 ...ntrol => root-plugin-proof-xproof.control} |   9 +-
 ....control => root-plugin-sql-maxdb.control} |   8 +-
 ....control => root-plugin-sql-mysql.control} |   7 +-
 ...c.control => root-plugin-sql-odbc.control} |   6 +-
 ...control => root-plugin-sql-oracle.control} |   5 +-
 ....control => root-plugin-sql-pgsql.control} |   5 +-
 .../root-plugin-tree-treeplayer.control       |   8 +
 .../root-plugin-tree-treeviewer.control       |   9 +
 .../package/common/root-plugin-venus.control  |  11 -
 build/package/common/root-system-bin.control  |   7 +-
 .../package/common/root-system-bin.install.in |   2 +
 .../package/common/root-system-common.control |   3 +-
 .../common/root-system-common.install.in      |  11 +-
 build/package/common/root-system-doc.control  |   5 +-
 .../package/common/root-system-proofd.control |   5 +-
 .../package/common/root-system-rootd.control  |   3 +-
 .../package/common/root-system-xrootd.control |  15 +-
 .../common/root-system-xrootd.install.in      |  11 +-
 .../package/common/ttf-root-installer.control |   5 +-
 build/package/debian/README.Debian            |   2 +-
 build/package/debian/changelog                |  52 +++
 build/package/debian/control.in               |  10 +-
 .../libroot-bindings-python-dev.links.in      |   2 +
 .../debian/libroot-bindings-ruby-dev.links.in |   1 +
 .../debian/root-plugin-geom-gdml.links.in     |   2 +
 .../debian/root-plugin-net-xrootd.overrides   |   3 +
 .../package/debian/root-system-bin.desktop.in |   1 -
 .../package/debian/root-system-common.dirs.in |   2 -
 build/package/debian/root-system-doc.doc-base |  19 +
 .../package/debian/root-system-rootd.preinst  |   8 +-
 .../package/debian/root-system-xrootd.default |  17 +
 .../package/debian/root-system-xrootd.init.in |  37 +-
 build/package/debian/root-system.overrides    |   3 +
 build/package/debian/rules                    | 393 ++++++++++-------
 .../debian/ttf-root-installer.overrides       |   1 +
 build/package/lib/makebuilddepend.sh          | 406 ++++++++++++------
 build/package/lib/makedebdir.sh               | 240 +++++++----
 build/package/lib/makelist                    |  47 +-
 build/package/lib/makelists.sh                | 179 +++++---
 build/package/lib/makerpmspec.sh              | 153 +++++--
 build/package/rpm/libroot-core.post           |   7 +
 build/package/rpm/spec.in                     |  23 +-
 131 files changed, 2110 insertions(+), 759 deletions(-)
 create mode 100644 build/package/common/libroot-bindings-python-dev.install.in
 rename build/package/common/{libroot-python.control => libroot-bindings-python.control} (51%)
 rename build/package/common/{libroot-ruby.control => libroot-bindings-ruby.control} (63%)
 rename build/package/common/{libroot-dev.install.in => libroot-core-dev.install.in} (80%)
 rename build/package/common/{libroot.control => libroot-core.control} (54%)
 rename build/package/common/{libroot.install.in => libroot-core.install.in} (100%)
 create mode 100644 build/package/common/libroot-geom.control
 create mode 100644 build/package/common/libroot-graf2d-gpad.control
 create mode 100644 build/package/common/libroot-graf2d-graf.control
 create mode 100644 build/package/common/libroot-graf2d-postscript.control
 create mode 100644 build/package/common/libroot-graf3d-eve.control
 create mode 100644 build/package/common/libroot-graf3d-g3d.control
 create mode 100644 build/package/common/libroot-graf3d-gl.control
 create mode 100644 build/package/common/libroot-gui-ged.control
 create mode 100644 build/package/common/libroot-gui.control
 create mode 100644 build/package/common/libroot-hist-spectrum.control
 create mode 100644 build/package/common/libroot-hist.control
 create mode 100644 build/package/common/libroot-html.control
 create mode 100644 build/package/common/libroot-io-xmlparser.control
 create mode 100644 build/package/common/libroot-io.control
 create mode 100644 build/package/common/libroot-math-foam.control
 create mode 100644 build/package/common/libroot-math-genvector.control
 create mode 100644 build/package/common/libroot-math-mathcore.control
 rename build/package/common/{libroot-mathmore.control => libroot-math-mathmore.control} (58%)
 create mode 100644 build/package/common/libroot-math-matrix.control
 rename build/package/common/{libroot-minuit.control => libroot-math-minuit.control} (59%)
 rename build/package/common/{libroot-mlp.control => libroot-math-mlp.control} (64%)
 create mode 100644 build/package/common/libroot-math-physics.control
 rename build/package/common/{libroot-quadp.control => libroot-math-quadp.control} (74%)
 create mode 100644 build/package/common/libroot-math-smatrix.control
 create mode 100644 build/package/common/libroot-math-splot.control
 rename build/package/common/{libroot-unuran.control => libroot-math-unuran.control} (82%)
 create mode 100644 build/package/common/libroot-misc-minicern.control
 create mode 100644 build/package/common/libroot-misc-table.control
 create mode 100644 build/package/common/libroot-montecarlo-eg.control
 create mode 100644 build/package/common/libroot-montecarlo-g4root.control
 create mode 100644 build/package/common/libroot-montecarlo-vmc-dev.install.in
 create mode 100644 build/package/common/libroot-montecarlo-vmc.control
 create mode 100644 build/package/common/libroot-net-auth.control
 create mode 100644 build/package/common/libroot-net-ldap.control
 create mode 100644 build/package/common/libroot-net.control
 rename build/package/common/{libroot-clarens.control => libroot-proof-clarens.control} (68%)
 create mode 100644 build/package/common/libroot-proof.control
 delete mode 100644 build/package/common/libroot-python.install.in
 create mode 100644 build/package/common/libroot-static.install.in
 create mode 100644 build/package/common/libroot-tree-treeplayer.control
 create mode 100644 build/package/common/libroot-tree.control
 create mode 100644 build/package/common/root-plugin-geom-gdml.control
 rename build/package/common/{libroot-python-dev.install.in => root-plugin-geom-gdml.install.in} (50%)
 create mode 100644 build/package/common/root-plugin-geom-geombuilder.control
 create mode 100644 build/package/common/root-plugin-geom-geompainter.control
 delete mode 100644 build/package/common/root-plugin-gl.control
 create mode 100644 build/package/common/root-plugin-graf2d-asimage.control
 rename build/package/common/{root-plugin-qt.control => root-plugin-graf2d-qt.control} (76%)
 create mode 100644 build/package/common/root-plugin-graf2d-x11.control
 create mode 100644 build/package/common/root-plugin-graf3d-x3d.control
 create mode 100644 build/package/common/root-plugin-gui-fitpanel.control
 create mode 100644 build/package/common/root-plugin-gui-guibuilder.control
 create mode 100644 build/package/common/root-plugin-gui-qt.control
 create mode 100644 build/package/common/root-plugin-gui-sessionviewer.control
 rename build/package/common/{root-plugin-hbook.control => root-plugin-hist-hbook.control} (66%)
 rename build/package/common/{root-plugin-hbook.install.in => root-plugin-hist-hbook.install.in} (64%)
 create mode 100644 build/package/common/root-plugin-hist-histpainter.control
 create mode 100644 build/package/common/root-plugin-hist-spectrumpainter.control
 rename build/package/common/{root-plugin-castor.control => root-plugin-io-castor.control} (56%)
 rename build/package/common/{root-plugin-chirp.control => root-plugin-io-chirp.control} (84%)
 rename build/package/common/{root-plugin-dcache.control => root-plugin-io-dcache.control} (75%)
 create mode 100644 build/package/common/root-plugin-io-gfal.control
 rename build/package/common/{root-plugin-sql.control => root-plugin-io-sql.control} (66%)
 rename build/package/common/{root-plugin-xml.control => root-plugin-io-xml.control} (76%)
 rename build/package/common/{root-plugin-fftw3.control => root-plugin-math-fftw3.control} (57%)
 rename build/package/common/{root-plugin-fumili.control => root-plugin-math-fumili.control} (76%)
 rename build/package/common/{root-plugin-minuit2.control => root-plugin-math-minuit2.control} (76%)
 rename build/package/common/{root-plugin-pythia5.control => root-plugin-montecarlo-pythia5.control} (84%)
 rename build/package/common/{root-plugin-pythia6.control => root-plugin-montecarlo-pythia6.control} (84%)
 create mode 100644 build/package/common/root-plugin-montecarlo-pythia8.control
 rename build/package/common/{root-plugin-alien.control => root-plugin-net-alien.control} (60%)
 create mode 100644 build/package/common/root-plugin-net-glite.control
 rename build/package/common/{root-plugin-globus.control => root-plugin-net-globus.control} (64%)
 rename build/package/common/{root-plugin-krb5.control => root-plugin-net-krb5.control} (80%)
 create mode 100644 build/package/common/root-plugin-net-monalisa.control
 rename build/package/common/{root-plugin-netx.control => root-plugin-net-netx.control} (62%)
 rename build/package/common/{root-plugin-srp.control => root-plugin-net-srp.control} (69%)
 create mode 100644 build/package/common/root-plugin-net-xrootd.install.in
 rename build/package/common/{root-plugin-peac.control => root-plugin-proof-peac.control} (67%)
 create mode 100644 build/package/common/root-plugin-proof-proofplayer.control
 rename build/package/common/{root-plugin-xproof.control => root-plugin-proof-xproof.control} (61%)
 rename build/package/common/{root-plugin-maxdb.control => root-plugin-sql-maxdb.control} (65%)
 rename build/package/common/{root-plugin-mysql.control => root-plugin-sql-mysql.control} (67%)
 rename build/package/common/{root-plugin-odbc.control => root-plugin-sql-odbc.control} (69%)
 rename build/package/common/{root-plugin-oracle.control => root-plugin-sql-oracle.control} (84%)
 rename build/package/common/{root-plugin-pgsql.control => root-plugin-sql-pgsql.control} (84%)
 create mode 100644 build/package/common/root-plugin-tree-treeplayer.control
 create mode 100644 build/package/common/root-plugin-tree-treeviewer.control
 delete mode 100644 build/package/common/root-plugin-venus.control
 create mode 100644 build/package/debian/libroot-bindings-python-dev.links.in
 create mode 100644 build/package/debian/libroot-bindings-ruby-dev.links.in
 create mode 100644 build/package/debian/root-plugin-geom-gdml.links.in
 create mode 100644 build/package/debian/root-plugin-net-xrootd.overrides
 create mode 100644 build/package/debian/root-system-doc.doc-base
 create mode 100644 build/package/debian/root-system.overrides
 create mode 100644 build/package/debian/ttf-root-installer.overrides
 create mode 100644 build/package/rpm/libroot-core.post

diff --git a/build/package/common/libroot-bindings-python-dev.install.in b/build/package/common/libroot-bindings-python-dev.install.in
new file mode 100644
index 00000000000..425632c66fe
--- /dev/null
+++ b/build/package/common/libroot-bindings-python-dev.install.in
@@ -0,0 +1,3 @@
+@prefix@/lib/root/@version@/ROOT.py
+@prefix@/lib/root/@version@/PyCintex.py
+
diff --git a/build/package/common/libroot-python.control b/build/package/common/libroot-bindings-python.control
similarity index 51%
rename from build/package/common/libroot-python.control
rename to build/package/common/libroot-bindings-python.control
index 4ceb617b332..722ed87f495 100644
--- a/build/package/common/libroot-python.control
+++ b/build/package/common/libroot-bindings-python.control
@@ -1,23 +1,20 @@
-Package: libroot-python@libvers@
+Package: libroot-bindings-python@libvers@
 Architecture: any
 Section: libs
 Depends: ${shlibs:Depends}, ${python:Depends}
-Provides: libroot-python, root-plugin-python
 Replaces: root-plugin-python  (<< 5.09.01-1)
 Description: Python extension for ROOT - runtime libraries 
- This package contains the python plug-in for ROOT.  This package
+ This package contains the Python plug-in for ROOT.  This package
  provide a Python interface to ROOT, and a ROOT interface to Python.
- .
- ROOT web-site: http://root.cern.ch
 
-Package: libroot-python-dev
+Package: libroot-bindings-python-dev
 Architecture: any
 Section: libdevel
-Depends: libroot-python@libvers@ (= ${binary:Version}), libroot-dev, python-dev (>= 2.1), ${python:Depends}
+Depends: libroot-bindings-python@libvers@ (= ${binary:Version}), libroot-core-dev, python-dev (>= 2.1), ${python:Depends}
 Provides: ${python:Provides}
+Replaces: libroot-python-dev
+Conflicts: libroot-python-dev (<< 5.19.01-1)
 Description: Python extension for ROOT - development files 
- This package contains the python plug-in for ROOT.  This package
+ This package contains the Python plug-in for ROOT.  This package
  provide a Python interface to ROOT, and a ROOT interface to Python.
- .
- ROOT web-site: http://root.cern.ch
 
diff --git a/build/package/common/libroot-ruby.control b/build/package/common/libroot-bindings-ruby.control
similarity index 63%
rename from build/package/common/libroot-ruby.control
rename to build/package/common/libroot-bindings-ruby.control
index 484af80485a..a9acccfdf21 100644
--- a/build/package/common/libroot-ruby.control
+++ b/build/package/common/libroot-bindings-ruby.control
@@ -1,22 +1,19 @@
-Package: libroot-ruby@libvers@
+Package: libroot-bindings-ruby@libvers@
 Architecture: any
 Section: libs
 Depends: ${shlibs:Depends}
-Provides: libroot-ruby, root-plugin-ruby
 Replaces: root-plugin-ruby  (<< 5.09.01-1)
 Description: Ruby extension for ROOT - run-time library
  This package contains the Ruby extension for ROOT.  The interface
  goes both ways - that is, you can call ROOT functions from Ruby, and
  invoke the Ruby interpreter from ROOT. 
- .
- ROOT web-site: http://root.cern.ch
 
-Package: libroot-ruby-dev
+Package: libroot-bindings-ruby-dev
 Architecture: any
 Section: libdevel
-Depends: libroot-ruby@libvers@ (= ${binary:Version}), libroot-dev, ruby1.8-dev | ruby-dev (>= 1.8)
+Depends: libroot-bindings-ruby@libvers@ (= ${binary:Version}), libroot-core-dev, ruby1.8-dev | ruby-dev (>= 1.8)
+Conflicts: libroot-ruby (<< 5.19.01-1)
+Replaces: libroot-ruby
 Description: Ruby extension for ROOT - development headers
  This package contains the Ruby extension for ROOT.
- .
- ROOT web-site: http://root.cern.ch
 
diff --git a/build/package/common/libroot-dev.install.in b/build/package/common/libroot-core-dev.install.in
similarity index 80%
rename from build/package/common/libroot-dev.install.in
rename to build/package/common/libroot-core-dev.install.in
index 5943274f51c..c795f03e894 100644
--- a/build/package/common/libroot-dev.install.in
+++ b/build/package/common/libroot-core-dev.install.in
@@ -5,11 +5,15 @@
 @prefix@/include/root/RConfigure.h
 @prefix@/lib/root/@version@/python
 # @prefix@/lib/root/@version@/PyCintex.py*
+@prefix@/bin/genreflex
+@prefix@/bin/genreflex-rootcint
 @prefix@/bin/rootcint
 @prefix@/bin/root-config
 @prefix@/bin/memprobe
 @prefix@/bin/rmkdepend
 @prefix@/bin/rlibmap
+@prefix@/share/man/man1/genreflex.1*
+@prefix@/share/man/man1/genreflex-rootcint.1*
 @prefix@/share/man/man1/rootcint.1*
 @prefix@/share/man/man1/root-config.1*
 @prefix@/share/man/man1/memprobe.1*
diff --git a/build/package/common/libroot.control b/build/package/common/libroot-core.control
similarity index 54%
rename from build/package/common/libroot.control
rename to build/package/common/libroot-core.control
index b5a2aa0262d..3db963c787b 100644
--- a/build/package/common/libroot.control
+++ b/build/package/common/libroot-core.control
@@ -1,9 +1,9 @@
-Package: libroot@libvers@
+Package: libroot-core@libvers@
 Section: libs
 Architecture: any
 Depends: root-system-common, ${shlibs:Depends}
-Recommends: root-system-bin, libroot-dev 
-Provides: libroot
+Recommends: root-system-bin, libroot-core-dev 
+Provides: libroot-core
 Description: Numerical data analysis framework - shared runtime libraries
  This package contains the shared libraries used by the ROOT
  system. The libraries contain numerous C++ class definitions for
@@ -13,21 +13,28 @@ Description: Numerical data analysis framework - shared runtime libraries
     * Histograming
     * Persistent objects
     * GUI API
- and many many others. Refer also to the package description of
+ and many others. Refer also to the package description of
  root-bin.
- .
- ROOT web-site: http://root.cern.ch
 
-Package: libroot-dev
+Package: libroot-core-dev
 Section: libdevel
 Architecture: any
-Depends: ${shlibs:Depends}, zlib1g-dev, libssl-dev, comerr-dev, libkrb5-dev, libx11-dev, libfreetype6-dev, libpcre3-dev, libxpm-dev, g++ | c++-compiler, ${python:Depends}, cfortran
+Depends: ${shlibs:Depends}, zlib1g-dev, libssl-dev, comerr-dev, libkrb5-dev, libx11-dev, libfreetype6-dev, libpcre3-dev, libxpm-dev, g++ | c++-compiler, ${python:Depends}, cfortran, libroot-io-dev, libroot-net-dev
 Suggests: root-system-bin, gccxml
-Replaces: libroot-mathmore-dev (<= 5.17.04)
+Recommends: libroot-geom-dev, libroot-gui-dev, libroot-hist-dev, libroot-proof-dev, libroot-tree-dev
+Provides: libroot-dev
+Replaces: libroot-dev (<< 5.19.01-1)
+Conflicts: libroot-dev (<< 5.19.01-1)
 Description: Header files for ROOT
  This package contains header files (Class declarations) for the ROOT
  class libraries. Please refer the package documentation for libroot
  and root-bin.
- .
- ROOT web-site: http://root.cern.ch
+
+Package: libroot-static
+Section: libdevel
+Architecture: any
+Depends: ${shlibs:Depends}
+Recommends: libroot-core-dev
+Description: Static archive of ROOT libraries 
+ This package contains static archive of the ROOT classes. 
 
diff --git a/build/package/common/libroot.install.in b/build/package/common/libroot-core.install.in
similarity index 100%
rename from build/package/common/libroot.install.in
rename to build/package/common/libroot-core.install.in
diff --git a/build/package/common/libroot-geom.control b/build/package/common/libroot-geom.control
new file mode 100644
index 00000000000..e10ae657c4a
--- /dev/null
+++ b/build/package/common/libroot-geom.control
@@ -0,0 +1,20 @@
+Package: libroot-geom@libvers@
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}
+Recommends: libroot-graf3d-gl@libvers@ (>= ${binary:Version}), root-plugin-geom-gdml, root-plugin-geom-geombuilder, root-plugin-geom-geompainter
+Homepage: http://root.cern.ch
+Description: Geometry library  for ROOT - run-time library
+ This package contains a library for defining geometries in ROOT.
+
+Package: libroot-geom-dev
+Architecture: any
+Section: libdevel
+Depends: libroot-geom@libvers@ (= ${binary:Version}), libroot-math-mathcore-dev
+Recommends: libroot-graf3d-gl-dev
+Replaces: libroot-dev
+Conflicts: libroot-dev (<= 5.19.01-1)
+Homepage: http://root.cern.ch
+Description: Geometry library  for ROOT - development files
+ This package contains a library for defining geometries in ROOT.
+
diff --git a/build/package/common/libroot-graf2d-gpad.control b/build/package/common/libroot-graf2d-gpad.control
new file mode 100644
index 00000000000..5c85fe8f972
--- /dev/null
+++ b/build/package/common/libroot-graf2d-gpad.control
@@ -0,0 +1,18 @@
+Package: libroot-graf2d-gpad@libvers@
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}
+Homepage: http://root.cern.ch
+Description: Canvas and pad library for ROOT - run-time library
+ This package contains a library for canvas and pad manipulations.
+
+Package: libroot-graf2d-gpad-dev
+Architecture: any
+Section: libdevel
+Depends: libroot-graf2d-gpad@libvers@ (= ${binary:Version}), libroot-graf2d-graf-dev
+Replaces: libroot-dev
+Conflicts: libroot-dev (<= 5.19.01-1)
+Homepage: http://root.cern.ch
+Description: Canvas and pad library for ROOT - development files
+ This package contains a library for canvas and pad manipulations.
+
diff --git a/build/package/common/libroot-graf2d-graf.control b/build/package/common/libroot-graf2d-graf.control
new file mode 100644
index 00000000000..6c95d16bcc7
--- /dev/null
+++ b/build/package/common/libroot-graf2d-graf.control
@@ -0,0 +1,18 @@
+Package: libroot-graf2d-graf@libvers@
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}
+Homepage: http://root.cern.ch
+Description: Graph library for ROOT
+ This package contains the Graf library for ROOT. 
+
+Package: libroot-graf2d-graf-dev
+Architecture: any
+Section: libdevel
+Depends: libroot-graf2d-graf@libvers@ (= ${binary:Version}), libroot-hist-dev
+Replaces: libroot-dev
+Conflicts: libroot-dev (<< 5.19.01-1)
+Homepage: http://root.cern.ch
+Description: Graph library for ROOT
+ This package contains the Graf library for ROOT. 
+
diff --git a/build/package/common/libroot-graf2d-postscript.control b/build/package/common/libroot-graf2d-postscript.control
new file mode 100644
index 00000000000..10b3fb8c540
--- /dev/null
+++ b/build/package/common/libroot-graf2d-postscript.control
@@ -0,0 +1,17 @@
+Package: libroot-graf2d-postscript@libvers@
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: Postscript/PDF renderer library for ROOT
+ This package contains a library for ROOT, which allows rendering 
+ postscript and PDF output. 
+
+Package: libroot-graf2d-postscript-dev
+Architecture: any
+Section: libdevel
+Replaces: libroot-dev
+Conflicts: libroot-dev (<< 5.19.01-1)
+Depends: libroot-graf2d-postscript@libvers@ (= ${binary:Version}), libroot-graf2d-graf-dev, ${shlibs:Depends}
+Description: Postscript/PDF renderer library for ROOT
+ This package contains a library for ROOT, which allows rendering 
+ postscript and PDF output. 
+
diff --git a/build/package/common/libroot-graf3d-eve.control b/build/package/common/libroot-graf3d-eve.control
new file mode 100644
index 00000000000..75407d8bd29
--- /dev/null
+++ b/build/package/common/libroot-graf3d-eve.control
@@ -0,0 +1,20 @@
+Package: libroot-graf3d-eve@libvers@
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}
+Conflicts: root-plugin-gl (<= 5.19.01-1)
+Replaces: root-plugin-gl (<= 5.19.01-1)
+Homepage: http://root.cern.ch
+Description: Event display library for ROOT
+ This package contains a library for defining event displays in ROOT.
+
+Package: libroot-graf3d-eve-dev
+Architecture: any
+Section: libdevel
+Depends: libroot-graf3d-eve@libvers@ (= ${binary:Version}), libroot-geom-dev, libroot-gui-ged-dev, libroot-montecarlo-eg-dev, libroot-tree-treeplayer-dev
+Replaces: root-plugin-gl
+Conflicts: root-plugin-gl (<= 5.19.01-1)
+Homepage: http://root.cern.ch
+Description: Event display library for ROOT
+ This package contains a library for defining event displays in ROOT.
+
diff --git a/build/package/common/libroot-graf3d-g3d.control b/build/package/common/libroot-graf3d-g3d.control
new file mode 100644
index 00000000000..fee49bcbb17
--- /dev/null
+++ b/build/package/common/libroot-graf3d-g3d.control
@@ -0,0 +1,25 @@
+Package: libroot-graf3d-g3d@libvers@
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}
+Recommends: libroot-graf3d-gl@libvers@ (>= ${binary:Version})
+Suggests: libroot-geom@libvers@
+Homepage: http://root.cern.ch
+Description: Basic 3D shapes for ROOT
+ This library contains the basic 3D shapes and classes for ROOT.  For
+ a more full-blown geometry library, see libroot-geom-dev.
+
+Package: libroot-graf3d-g3d-dev
+Architecture: any
+Section: libdevel
+Depends: libroot-graf3d-g3d@libvers@ (= ${binary:Version}), libroot-graf2d-gpad-dev
+Recommends: libroot-graf3d-gl-dev
+Replaces: libroot-dev
+Conflicts: libroot-dev (<= 5.19.01-1)
+Suggests: libroot-geom-dev
+Homepage: http://root.cern.ch
+Description: Basic 3D shapes for ROOT
+ This library contains the basic 3D shapes and classes for ROOT.  For
+ a more full-blown geometry library, see libroot-geom-dev.
+  
+
diff --git a/build/package/common/libroot-graf3d-gl.control b/build/package/common/libroot-graf3d-gl.control
new file mode 100644
index 00000000000..fa5971346fa
--- /dev/null
+++ b/build/package/common/libroot-graf3d-gl.control
@@ -0,0 +1,24 @@
+Package: libroot-graf3d-gl@libvers@
+Architecture: any
+Section: libs
+Depends: ${shlibs:Depends}
+Conflicts: root-plugin-graf3d-gl
+Replaces: root-plugin-graf3d-gl
+Provides: root-plugin-graf3d-gl
+Description: GL plugin for ROOT - runtime library
+ This package contains the GL plug-in for ROOT.  This plugin provides
+ 3D rendering of volumes and shapes defined in ROOT, as well as 3D 
+ rendering of histograms, and similar.  Included is also a high quality 
+ 3D viewer for ROOT defined geometries.
+
+Package: libroot-graf3d-gl-dev
+Architecture: any
+Section: libdevel
+Depends: libroot-graf3d-gl@libvers@ (= ${binary:Version})
+Conflicts: root-plugin-graf3d-gl (<< 5.19.00-1)
+Replaces: root-plugin-graf3d-gl
+Description: GL plugin for ROOT - development files
+ This package contains the GL plug-in for ROOT.  This plugin provides
+ 3D rendering of volumes and shapes defined in ROOT.  Included is also
+ a high quality 3D viewer for ROOT defined geometries.
+
diff --git a/build/package/common/libroot-gui-ged.control b/build/package/common/libroot-gui-ged.control
new file mode 100644
index 00000000000..7fc21881df5
--- /dev/null
+++ b/build/package/common/libroot-gui-ged.control
@@ -0,0 +1,17 @@
+Package: libroot-gui-ged@libvers@
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: GUI element for editing various ROOT objecs
+ This package contains a library to show a pop-up window for editing 
+ various ROOT objects.
+
+Package: libroot-gui-ged-dev
+Architecture: any
+Section: libdevel
+Conflicts: libroot-dev (<< 5.19.01-1)
+Replaces: libroot-dev
+Depends: libroot-gui-ged@libvers@ (= ${binary:Version}), libroot-gui-dev, libroot-tree-treeplayer-dev
+Description: GUI element for editing various ROOT objecs
+ This package contains a library to show a pop-up window for editing 
+ various ROOT objects.
+
diff --git a/build/package/common/libroot-gui.control b/build/package/common/libroot-gui.control
new file mode 100644
index 00000000000..2edfe660661
--- /dev/null
+++ b/build/package/common/libroot-gui.control
@@ -0,0 +1,20 @@
+Package: libroot-gui@libvers@
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}
+Conflicts: libroot (<< 5.19.01-1)
+Recommends: root-plugin-gui-guibuilder
+Homepage: http://root.cern.ch
+Description: GUI library for ROOT - run-time library
+ This package contains a library for defining graphical user interfaces.
+
+Package: libroot-gui-dev
+Architecture: any
+Section: libdevel
+Depends: libroot-gui@libvers@ (= ${binary:Version}), libroot-graf2d-gpad-dev
+Replaces: libroot-dev
+Conflicts: libroot-dev (<< 5.19.01-1)
+Homepage: http://root.cern.ch
+Description: GUI library for ROOT - development files
+ This package contains a library for defining graphical user interfaces.
+
diff --git a/build/package/common/libroot-hist-spectrum.control b/build/package/common/libroot-hist-spectrum.control
new file mode 100644
index 00000000000..931f211b42c
--- /dev/null
+++ b/build/package/common/libroot-hist-spectrum.control
@@ -0,0 +1,18 @@
+Package: libroot-hist-spectrum@libvers@
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}
+Homepage: http://root.cern.ch
+Description: Spectra analysis library for ROOT
+ This package contains the Spectrum library for ROOT. 
+
+Package: libroot-hist-spectrum-dev
+Architecture: any
+Section: libdevel
+Depends: libroot-hist-spectrum@libvers@ (= ${binary:Version}), libroot-hist-dev
+Replaces: libroot-dev
+Conflicts: libroot-dev (<< 5.19.01-1)
+Homepage: http://root.cern.ch
+Description: Spectra analysis library for ROOT
+ This package contains the Spectrum library for ROOT. 
+
diff --git a/build/package/common/libroot-hist.control b/build/package/common/libroot-hist.control
new file mode 100644
index 00000000000..55e4cc95141
--- /dev/null
+++ b/build/package/common/libroot-hist.control
@@ -0,0 +1,19 @@
+Package: libroot-hist@libvers@
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}
+Recommends: root-plugin-hist-histpainter
+Homepage: http://root.cern.ch
+Description: Histogram library for ROOT - run-time library
+ This package contains a library for histogrammin
+
+Package: libroot-hist-dev
+Architecture: any
+Section: libdevel
+Depends: libroot-hist@libvers@ (= ${binary:Version}), libroot-core-dev, libroot-math-matrix-dev
+Replaces: libroot-dev
+Conflicts: libroot-dev (<< 5.19.01-1)
+Homepage: http://root.cern.ch
+Description: Histogram library for ROOT - development files
+ This package contains a library for histogrammin
+
diff --git a/build/package/common/libroot-html.control b/build/package/common/libroot-html.control
new file mode 100644
index 00000000000..a683928f497
--- /dev/null
+++ b/build/package/common/libroot-html.control
@@ -0,0 +1,20 @@
+Package: libroot-html@libvers@
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}
+Homepage: http://root.cern.ch
+Description: Html documentation generator for ROOT - runtime library
+ This package contains classes to automatically extract documentation 
+ from marked up sources. 
+
+Package: libroot-html-dev
+Architecture: any
+Section: libdevel
+Depends: libroot-html@libvers@ (= ${binary:Version}), libroot-core-dev
+Replaces: libroot-dev
+Conflicts: libroot-dev (<< 5.19.01-1)
+Homepage: http://root.cern.ch
+Description: Html documentation generator for ROOT - development files
+ This package contains classes to automatically extract documentation 
+ from marked up sources. 
+
diff --git a/build/package/common/libroot-io-xmlparser.control b/build/package/common/libroot-io-xmlparser.control
new file mode 100644
index 00000000000..6da9351fc54
--- /dev/null
+++ b/build/package/common/libroot-io-xmlparser.control
@@ -0,0 +1,18 @@
+Package: libroot-io-xmlparser@libvers@
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}
+Homepage: http://root.cern.ch
+Description: Input/output of ROOT objects - runtime library
+ This package provides I/O routines for ROOT objects. 
+
+Package: libroot-io-xmlparser-dev
+Architecture: any
+Section: libdevel
+Depends: libroot-io-xmlparser@libvers@ (= ${binary:Version}), libroot-core-dev
+Replaces: libroot-dev, root-plugin-xml
+Conflicts: libroot-dev (<< 5.19.01-1), root-plugin-xml (<< 5.19.01-1)
+Homepage: http://root.cern.ch
+Description: Input/output of ROOT objects - development files
+ This package provides I/O routines for ROOT objects. 
+
diff --git a/build/package/common/libroot-io.control b/build/package/common/libroot-io.control
new file mode 100644
index 00000000000..0343fc76541
--- /dev/null
+++ b/build/package/common/libroot-io.control
@@ -0,0 +1,18 @@
+Package: libroot-io@libvers@
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}
+Homepage: http://root.cern.ch
+Description: Input/output of ROOT objects - runtime library
+ This package provides I/O routines for ROOT objects. 
+
+Package: libroot-io-dev
+Architecture: any
+Section: libdevel
+Depends: libroot-io@libvers@ (= ${binary:Version}), libroot-core-dev
+Replaces: libroot-dev, root-plugin-proof
+Conflicts: libroot-dev (<< 5.19.01-1), root-plugin-proof (<< 5.19.01-1)
+Homepage: http://root.cern.ch
+Description: Input/output of ROOT objects - development files
+ This package provides I/O routines for ROOT objects. 
+
diff --git a/build/package/common/libroot-ldap.control b/build/package/common/libroot-ldap.control
index 7c9115fe736..d852ca6c672 100644
--- a/build/package/common/libroot-ldap.control
+++ b/build/package/common/libroot-ldap.control
@@ -7,8 +7,6 @@ Replaces: root-plugin-ldap (<< 5.09.01-1)
 Description: Ldap extension for ROOT - run-time libraries
  This package contains the Ldap plug-in for ROOT.  This gives you
  access to Ldap directories via ROOT.
- .
- ROOT web-site: http://root.cern.ch
 
 Package: libroot-ldap-dev
 Architecture: any
@@ -17,6 +15,5 @@ Depends: libroot-ldap@libvers@ (= ${binary:Version}), libroot-dev, libldap2-dev
 Description: Ldap extension for ROOT
  This package contains the Ldap plug-in for ROOT.  This gives you
  access to Ldap directories via ROOT.
- .
- ROOT web-site: http://root.cern.ch
+
 
diff --git a/build/package/common/libroot-math-foam.control b/build/package/common/libroot-math-foam.control
new file mode 100644
index 00000000000..ae6e7027bdd
--- /dev/null
+++ b/build/package/common/libroot-math-foam.control
@@ -0,0 +1,27 @@
+Package: libroot-math-foam@libvers@
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}
+Homepage: http://root.cern.ch
+Description: A Compact Version of the Cellular Event Generator
+ The general-purpose self-adapting Monte Carlo (MC) event
+ generator/simulator mFOAM (standing for mini-FOAM) is a new compact
+ version of the FOAM program, with a slightly limited functionality
+ with respect to its parent version. On the other hand, mFOAM is
+ easier to use for the average user. 
+
+Package: libroot-math-foam-dev
+Architecture: any
+Section: libdevel
+Depends: libroot-math-foam@libvers@ (= ${binary:Version}), libroot-hist-dev
+Replaces: libroot-dev
+Conflicts: libroot-dev (<= 5.19.01-1)
+Homepage: http://root.cern.ch
+Description: A Compact Version of the Cellular Event Generator
+ The general-purpose self-adapting Monte Carlo (MC) event
+ generator/simulator mFOAM (standing for mini-FOAM) is a new compact
+ version of the FOAM program, with a slightly limited functionality
+ with respect to its parent version. On the other hand, mFOAM is
+ easier to use for the average user. 
+  
+
diff --git a/build/package/common/libroot-math-genvector.control b/build/package/common/libroot-math-genvector.control
new file mode 100644
index 00000000000..3df5dfbb223
--- /dev/null
+++ b/build/package/common/libroot-math-genvector.control
@@ -0,0 +1,18 @@
+Package: libroot-math-genvector@libvers@
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: Generalized vector library for ROOT
+ This package contains the Genvector library for ROOT.  This provides 
+ a generalized vector library.
+
+Package: libroot-math-genvector-dev
+Architecture: any
+Section: libdevel
+Depends: libroot-math-genvector@libvers@ (= ${binary:Version}), libroot-core-dev
+Replaces: libroot-dev
+Conflicts: libroot-dev (<= 5.19.01-1)
+Description: Generalized vector library for ROOT
+ This package contains the Genvector library for ROOT.  This provides 
+ a generalized vector library.
+
diff --git a/build/package/common/libroot-math-mathcore.control b/build/package/common/libroot-math-mathcore.control
new file mode 100644
index 00000000000..64fd3569f72
--- /dev/null
+++ b/build/package/common/libroot-math-mathcore.control
@@ -0,0 +1,16 @@
+Package: libroot-math-mathcore@libvers@
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: Core mathemathics library for ROOT
+ This package contains the MathCore library for ROOT. 
+
+Package: libroot-math-mathcore-dev
+Architecture: any
+Section: libdevel
+Depends: libroot-math-mathcore@libvers@ (= ${binary:Version}), libroot-core-dev
+Replaces: libroot-dev
+Conflicts: libroot-dev (<< 5.19.01-1)
+Description: Core mathemathics library for ROOT
+ This package contains the MathCore library for ROOT. 
+
diff --git a/build/package/common/libroot-mathmore.control b/build/package/common/libroot-math-mathmore.control
similarity index 58%
rename from build/package/common/libroot-mathmore.control
rename to build/package/common/libroot-math-mathmore.control
index ce7a147fdc0..10c64fbb637 100644
--- a/build/package/common/libroot-mathmore.control
+++ b/build/package/common/libroot-math-mathmore.control
@@ -1,21 +1,20 @@
-Package: libroot-mathmore@libvers@
+Package: libroot-math-mathmore@libvers@
 Section: libs
 Architecture: any
 Depends: ${shlibs:Depends}
-Provides: root-plugin-mathmore, libroot-mathmore
+Homepage: http://root.cern.ch
 Description: GSL interface library for ROOT
  This package contains the MathMore library for ROOT.  This provides 
  a partial GNU Scientific Library interface for ROOT.
- .
- ROOT web-site: http://root.cern.ch
 
-Package: libroot-mathmore-dev
+Package: libroot-math-mathmore-dev
 Architecture: any
 Section: libdevel
-Depends: libroot-mathmore@libvers@ (= ${binary:Version}), libroot-dev, libgsl0-dev
+Depends: libroot-math-mathmore@libvers@ (= ${binary:Version}), libroot-core-dev, libgsl0-dev
+Conflicts: libroot-mathmore-dev (<< 5.19.01-1)
+Replaces: libroot-mathmore-dev
+Homepage: http://root.cern.ch
 Description: Mathmore plugin for ROOT
  This package contains the MathMore library for ROOT.  This provides 
  a partial GNU Scientific Library interface for ROOT.
- .
- ROOT web-site: http://root.cern.ch
 
diff --git a/build/package/common/libroot-math-matrix.control b/build/package/common/libroot-math-matrix.control
new file mode 100644
index 00000000000..3ac098967a1
--- /dev/null
+++ b/build/package/common/libroot-math-matrix.control
@@ -0,0 +1,18 @@
+Package: libroot-math-matrix@libvers@
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}
+Homepage: http://root.cern.ch
+Description: Matrix library for ROOT
+ This package contains the Matrix library for ROOT. 
+
+Package: libroot-math-matrix-dev
+Architecture: any
+Section: libdevel
+Depends: libroot-math-matrix@libvers@ (= ${binary:Version}), libroot-core-dev, libroot-math-mathcore-dev
+Replaces: libroot-dev
+Conflicts: libroot-dev (<< 5.19.01-1)
+Homepage: http://root.cern.ch
+Description: Matrix library for ROOT
+ This package contains the Matrix library for ROOT. 
+
diff --git a/build/package/common/libroot-minuit.control b/build/package/common/libroot-math-minuit.control
similarity index 59%
rename from build/package/common/libroot-minuit.control
rename to build/package/common/libroot-math-minuit.control
index 41db3f99955..6d281b17a74 100644
--- a/build/package/common/libroot-minuit.control
+++ b/build/package/common/libroot-math-minuit.control
@@ -1,24 +1,21 @@
-Package: libroot-minuit@libvers@
+Package: libroot-math-minuit@libvers@
 Section: libs
 Architecture: any
 Depends: ${shlibs:Depends}
-Provides: root-plugin-minuit, libroot-minuit
 Replaces: root-plugin-minuit (<< 5.09.01-7)
+Provides: libroot-math-minuit
 Description: Minuit plugin for ROOT
  This package contains the MINUIT plug-in for ROOT.  This provides a
  fitting algorithm for ROOT.
- .
- ROOT web-site: http://root.cern.ch
 
-Package: libroot-minuit-dev
+Package: libroot-math-minuit-dev
 Architecture: any
 Section: libdevel
-Depends: libroot-minuit@libvers@ (= ${binary:Version}), libroot-dev
+Depends: libroot-math-minuit@libvers@ (= ${binary:Version}), libroot-graf2d-graf-dev
 Provides: root-fitter
-Replaces: root-plugin-minuit (<< 5.09.01-7)
+Replaces: root-plugin-minuit (<< 5.09.01-7), libroot-minuit-dev
+Conflicts: libroot-minuit-dev (<< 5.19.01-1)
 Description: Minuit plugin for ROOT
  This package contains the MINUIT plug-in for ROOT.  This provides a
  fitting algorithm for ROOT.
- .
- ROOT web-site: http://root.cern.ch
 
diff --git a/build/package/common/libroot-mlp.control b/build/package/common/libroot-math-mlp.control
similarity index 64%
rename from build/package/common/libroot-mlp.control
rename to build/package/common/libroot-math-mlp.control
index 6f78fee486b..9d59509d12a 100644
--- a/build/package/common/libroot-mlp.control
+++ b/build/package/common/libroot-math-mlp.control
@@ -1,22 +1,21 @@
-Package: libroot-mlp@libvers@
+Package: libroot-math-mlp@libvers@
 Architecture: any
 Section: libs
 Depends: ${shlibs:Depends}
-Provides: libroot-mlp, root-plugin-mlp
 Replaces: root-plugin-mlp (<< 5.09.01-1)
+Homepage: http://root.cern.ch
 Description: Multi layer perceptron extension for ROOT - run-time libraries
  This package contains the mlp plug-in for ROOT.  This plugin provides
  a Multi Layer Perceptron Neural Network package for ROOT.
- .
- ROOT web-site: http://root.cern.ch
 
-Package: libroot-mlp-dev
+Package: libroot-math-mlp-dev
 Architecture: any
 Section: libdevel
-Depends: libroot-mlp@libvers@ (= ${binary:Version}), libroot-dev
+Depends: libroot-math-mlp@libvers@ (= ${binary:Version}), libroot-graf2d-gpad-dev, libroot-tree-treeplayer-dev
+Conflicts: libroot-mlp-dev
+Replaces: libroot-mlp-dev (<< 5.19.01-1)
+Homepage: http://root.cern.ch
 Description: Multi layer perceptron extension for ROOT - development files
  This package contains the mlp plug-in for ROOT.  This plugin provides
  a Multi Layer Perceptron Neural Network package for ROOT.
- .
- ROOT web-site: http://root.cern.ch
 
diff --git a/build/package/common/libroot-math-physics.control b/build/package/common/libroot-math-physics.control
new file mode 100644
index 00000000000..81b9d25bde9
--- /dev/null
+++ b/build/package/common/libroot-math-physics.control
@@ -0,0 +1,18 @@
+Package: libroot-math-physics@libvers@
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}
+Homepage: http://root.cern.ch
+Description: Physics library for ROOT
+ This package contains the Physics library for ROOT. 
+
+Package: libroot-math-physics-dev
+Architecture: any
+Section: libdevel
+Depends: libroot-math-physics@libvers@ (= ${binary:Version}), libroot-math-matrix-dev
+Replaces: libroot-dev
+Conflicts: libroot-dev (<< 5.19.01-1)
+Homepage: http://root.cern.ch
+Description: Physics library for ROOT
+ This package contains the Physics library for ROOT. 
+
diff --git a/build/package/common/libroot-quadp.control b/build/package/common/libroot-math-quadp.control
similarity index 74%
rename from build/package/common/libroot-quadp.control
rename to build/package/common/libroot-math-quadp.control
index 124e6002684..ee13dd76fc6 100644
--- a/build/package/common/libroot-quadp.control
+++ b/build/package/common/libroot-math-quadp.control
@@ -1,26 +1,23 @@
-Package: libroot-quadp@libvers@
+Package: libroot-math-quadp@libvers@
 Architecture: any
 Section: libs
 Depends: ${shlibs:Depends}
-Provides: libroot-quadp, root-plugin-quadp
 Replaces: root-plugin-quadp  (<< 5.09.01-1)
 Description: QuadP extension for ROOT - run-time libraries
  This package contains the QuadP plug-in for ROOT.  This provides the
  user a framework in which to do Quadratic Programming.  The quadratic
  programming problem involves minimization of a quadratic function
  subject to linear constraints.
- .
- ROOT web-site: http://root.cern.ch
 
-Package: libroot-quadp-dev
+Package: libroot-math-quadp-dev
 Architecture: any
 Section: libdevel
-Depends: libroot-quadp@libvers@ (= ${binary:Version}), libroot-dev
+Depends: libroot-math-quadp@libvers@ (= ${binary:Version}), libroot-math-matrix-dev
+Replaces: libroot-quadp
+Conflicts: libroot-quadp (<< 5.19.01-1)
 Description: QuadP extension for ROOT - development files
  This package contains the QuadP plug-in for ROOT.  This provides the
  user a framework in which to do Quadratic Programming.  The quadratic
  programming problem involves minimization of a quadratic function
  subject to linear constraints.
- .
- ROOT web-site: http://root.cern.ch
 
diff --git a/build/package/common/libroot-math-smatrix.control b/build/package/common/libroot-math-smatrix.control
new file mode 100644
index 00000000000..f6d0e3ef46b
--- /dev/null
+++ b/build/package/common/libroot-math-smatrix.control
@@ -0,0 +1,18 @@
+Package: libroot-math-smatrix@libvers@
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}
+Homepage: http://root.cern.ch
+Description: Sparse matrix library for ROOT
+ This package contains the Smatrix library for ROOT. 
+
+Package: libroot-math-smatrix-dev
+Architecture: any
+Section: libdevel
+Depends: libroot-math-smatrix@libvers@ (= ${binary:Version}), libroot-core-dev
+Replaces: libroot-dev
+Conflicts: libroot-dev (<< 5.19.01-1)
+Homepage: http://root.cern.ch
+Description: Sparse matrix library for ROOT
+ This package contains the Smatrix library for ROOT. 
+
diff --git a/build/package/common/libroot-math-splot.control b/build/package/common/libroot-math-splot.control
new file mode 100644
index 00000000000..ffa1704d5d9
--- /dev/null
+++ b/build/package/common/libroot-math-splot.control
@@ -0,0 +1,68 @@
+Package: libroot-math-splot@libvers@
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}
+Homepage: http://root.cern.ch
+Description: Splot library for ROOT
+ A common method used in High Energy Physics to perform measurements
+ is the maximum Likelihood method, exploiting discriminating variables
+ to disentangle signal from background. The crucial point for such an
+ analysis to be reliable is to use an exhaustive list of sources of
+ events combined with an accurate description of all the Probability
+ Density Functions (PDF).  
+ .
+ To assess the validity of the fit, a convincing quality check is to
+ explore further the data sample by examining the distributions of
+ control variables. A control variable can be obtained for instance by
+ removing one of the discriminating variables before performing again
+ the maximum Likelihood fit: this removed variable is a control
+ variable. The expected distribution of this control variable, for
+ signal, is to be compared to the one extracted, for signal, from the
+ data sample. In order to be able to do so, one must be able to unfold
+ from the distribution of the whole data sample.
+ .
+ The SPlot method allows to reconstruct the distributions for the
+ control variable, independently for each of the various sources of
+ events, without making use of any a priori knowledge on this
+ variable. The aim is thus to use the knowledge available for the
+ discriminating variables to infer the behaviour of the individual
+ sources of events with respect to the control variable.
+ .
+ SPlot is optimal if the control variable is uncorrelated with the
+ discriminating variables.
+
+Package: libroot-math-splot-dev
+Architecture: any
+Section: libdevel
+Depends: libroot-math-splot@libvers@ (= ${binary:Version}), libroot-graf2d-graf-dev, libroot-graf3d-g3d-dev, libroot-tree-treeplayer-dev
+Replaces: libroot-dev
+Conflicts: libroot-dev (<< 5.19.01-1)
+Homepage: http://root.cern.ch
+Description: Splot library for ROOT
+ A common method used in High Energy Physics to perform measurements
+ is the maximum Likelihood method, exploiting discriminating variables
+ to disentangle signal from background. The crucial point for such an
+ analysis to be reliable is to use an exhaustive list of sources of
+ events combined with an accurate description of all the Probability
+ Density Functions (PDF).  
+ .
+ To assess the validity of the fit, a convincing quality check is to
+ explore further the data sample by examining the distributions of
+ control variables. A control variable can be obtained for instance by
+ removing one of the discriminating variables before performing again
+ the maximum Likelihood fit: this removed variable is a control
+ variable. The expected distribution of this control variable, for
+ signal, is to be compared to the one extracted, for signal, from the
+ data sample. In order to be able to do so, one must be able to unfold
+ from the distribution of the whole data sample.
+ .
+ The SPlot method allows to reconstruct the distributions for the
+ control variable, independently for each of the various sources of
+ events, without making use of any a priori knowledge on this
+ variable. The aim is thus to use the knowledge available for the
+ discriminating variables to infer the behaviour of the individual
+ sources of events with respect to the control variable.
+ .
+ SPlot is optimal if the control variable is uncorrelated with the
+ discriminating variables.
+
diff --git a/build/package/common/libroot-unuran.control b/build/package/common/libroot-math-unuran.control
similarity index 82%
rename from build/package/common/libroot-unuran.control
rename to build/package/common/libroot-math-unuran.control
index 3ef198a1295..8d90c7f86cf 100644
--- a/build/package/common/libroot-unuran.control
+++ b/build/package/common/libroot-math-unuran.control
@@ -1,8 +1,8 @@
-Package: libroot-unuran@libvers@
+Package: libroot-math-unuran@libvers@
 Architecture: any
 Section: libs
 Depends: ${shlibs:Depends}
-Provides: libroot-unuran, root-plugin-unuran
+Homepage: http://statistik.wu-wien.ac.at/unuran/
 Description: Random number generator library
  It contains universal (also called automatic or black-box) algorithms
  that can generate random numbers from large classes of continuous or
@@ -19,14 +19,14 @@ Description: Random number generator library
  variates from the desired distribution.  
  .
  This package contains the runtime library.
- .
- ROOT web-site: http://root.cern.ch
- UNURAN web-site: http://statistik.wu-wien.ac.at/unuran/
 
-Package: libroot-unuran-dev
+Package: libroot-math-unuran-dev
 Architecture: any
 Section: libdevel
-Depends: libroot-unuran@libvers@ (= ${binary:Version}), libroot-dev
+Depends: libroot-math-unuran@libvers@ (= ${binary:Version}), libroot-hist-dev
+Replaces: libroot-unuran-dev
+Conflicts: libroot-unuran-dev (<< 5.19.01-1)
+Homepage: http://statistik.wu-wien.ac.at/unuran/
 Description: Random number generator library - development files
  It contains universal (also called automatic or black-box) algorithms
  that can generate random numbers from large classes of continuous or
@@ -43,7 +43,4 @@ Description: Random number generator library - development files
  variates from the desired distribution.  
  .
  This package contains the development files
- .
- ROOT web-site: http://root.cern.ch
- UNURAN web-site: http://statistik.wu-wien.ac.at/unuran/
 
diff --git a/build/package/common/libroot-misc-minicern.control b/build/package/common/libroot-misc-minicern.control
new file mode 100644
index 00000000000..9672ab223ad
--- /dev/null
+++ b/build/package/common/libroot-misc-minicern.control
@@ -0,0 +1,18 @@
+Package: libroot-misc-minicern@libvers@
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}
+Homepage: http://root.cern.ch
+Description: Small version of CERNLIB for use with ROOT
+ This package contains the mini CERNLIB library for ROOT. 
+
+Package: libroot-misc-minicern-dev
+Architecture: any
+Section: libdevel
+Depends: libroot-misc-minicern@libvers@ (= ${binary:Version}), libroot-core-dev
+Replaces: libroot-dev
+Conflicts: libroot-dev (<< 5.19.01-1)
+Homepage: http://root.cern.ch
+Description: Small version of CERNLIB for use with ROOT
+ This package contains the mini CERNLIB library for ROOT. 
+
diff --git a/build/package/common/libroot-misc-table.control b/build/package/common/libroot-misc-table.control
new file mode 100644
index 00000000000..02a73a097f0
--- /dev/null
+++ b/build/package/common/libroot-misc-table.control
@@ -0,0 +1,18 @@
+Package: libroot-misc-table@libvers@
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}
+Homepage: http://root.cern.ch
+Description: Table library for ROOT
+ This package contains the Table library for ROOT. 
+
+Package: libroot-misc-table-dev
+Architecture: any
+Section: libdevel
+Depends: libroot-misc-table@libvers@ (= ${binary:Version}), libroot-graf3d-g3d-dev, libroot-graf2d-gpad-dev, libroot-tree-dev
+Replaces: libroot-dev
+Conflicts: libroot-dev (<< 5.19.01-1)
+Homepage: http://root.cern.ch
+Description: Table library for ROOT
+ This package contains the Table library for ROOT. 
+
diff --git a/build/package/common/libroot-montecarlo-eg.control b/build/package/common/libroot-montecarlo-eg.control
new file mode 100644
index 00000000000..629e2a2b9cc
--- /dev/null
+++ b/build/package/common/libroot-montecarlo-eg.control
@@ -0,0 +1,18 @@
+Package: libroot-montecarlo-eg@libvers@
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}
+Homepage: http://root.cern.ch
+Description: Event generator library for ROOT
+ This package contains the Eg library for ROOT. 
+
+Package: libroot-montecarlo-eg-dev
+Architecture: any
+Section: libdevel
+Depends: libroot-montecarlo-eg@libvers@ (= ${binary:Version}), libroot-graf2d-gpad-dev, libroot-graf3d-g3d-dev
+Replaces: libroot-dev
+Conflicts: libroot-dev (<< 5.19.01-1)
+Homepage: http://root.cern.ch
+Description: Event generator library for ROOT
+ This package contains the Eg library for ROOT. 
+
diff --git a/build/package/common/libroot-montecarlo-g4root.control b/build/package/common/libroot-montecarlo-g4root.control
new file mode 100644
index 00000000000..02e785438c0
--- /dev/null
+++ b/build/package/common/libroot-montecarlo-g4root.control
@@ -0,0 +1,18 @@
+Package: libroot-montecarlo-g4root@libvers@
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}
+Homepage: http://root.cern.ch
+Description: Geant4 interface library for ROOT
+ This package contains the G4root library for ROOT. 
+
+Package: libroot-montecarlo-g4root-dev
+Architecture: any
+Section: libdevel
+Depends: libroot-montecarlo-g4root@libvers@ (= ${binary:Version}), libroot-core-dev
+Replaces: libroot-dev
+Conflicts: libroot-dev (<< 5.19.01-1)
+Homepage: http://root.cern.ch
+Description: Geant4 interface library for ROOT
+ This package contains the G4root library for ROOT. 
+
diff --git a/build/package/common/libroot-montecarlo-vmc-dev.install.in b/build/package/common/libroot-montecarlo-vmc-dev.install.in
new file mode 100644
index 00000000000..e8c0fe021a4
--- /dev/null
+++ b/build/package/common/libroot-montecarlo-vmc-dev.install.in
@@ -0,0 +1 @@
+@sysconfdir@/root/vmc
diff --git a/build/package/common/libroot-montecarlo-vmc.control b/build/package/common/libroot-montecarlo-vmc.control
new file mode 100644
index 00000000000..c48c448d315
--- /dev/null
+++ b/build/package/common/libroot-montecarlo-vmc.control
@@ -0,0 +1,19 @@
+Package: libroot-montecarlo-vmc@libvers@
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}
+Recommends: root-vmc
+Homepage: http://root.cern.ch
+Description: Virtual Monte-Carlo (simulation) library for ROOT
+ This package contains the Vmc library for ROOT. 
+
+Package: libroot-montecarlo-vmc-dev
+Architecture: any
+Section: libdevel
+Depends: libroot-montecarlo-vmc@libvers@ (= ${binary:Version}), libroot-geom-dev, libroot-montecarlo-eg-dev
+Replaces: libroot-dev
+Conflicts: libroot-dev (<< 5.19.01-1)
+Homepage: http://root.cern.ch
+Description: Virtual Monte-Carlo (simulation) library for ROOT
+ This package contains the Vmc library for ROOT. 
+
diff --git a/build/package/common/libroot-net-auth.control b/build/package/common/libroot-net-auth.control
new file mode 100644
index 00000000000..9133d31253a
--- /dev/null
+++ b/build/package/common/libroot-net-auth.control
@@ -0,0 +1,19 @@
+Package: libroot-net-auth@libvers@
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}
+Provides: root-authentication
+Homepage: http://root.cern.ch
+Description: Authentication extension for ROOT
+ This package contains the basic authentication algorithms used by ROOT.
+
+Package: libroot-net-auth-dev
+Architecture: any
+Section: libdevel
+Depends: libroot-net-auth@libvers@ (= ${binary:Version}), libroot-core-dev
+Replaces: libroot-dev
+Conflicts: libroot-dev (<= 5.19.01-1)
+Homepage: http://root.cern.ch
+Description: Authentication extension for ROOT
+ This package contains the basic authentication algorithms used by ROOT.
+
diff --git a/build/package/common/libroot-net-ldap.control b/build/package/common/libroot-net-ldap.control
new file mode 100644
index 00000000000..965d9e9ce6e
--- /dev/null
+++ b/build/package/common/libroot-net-ldap.control
@@ -0,0 +1,20 @@
+Package: libroot-net-ldap@libvers@
+Architecture: any
+Section: libs
+Depends: ${shlibs:Depends}
+Replaces: root-plugin-ldap (<< 5.09.01-1)
+Description: Ldap extension for ROOT - run-time libraries
+ This package contains the Ldap plug-in for ROOT.  This gives you
+ access to Ldap directories via ROOT.
+
+Package: libroot-net-ldap-dev
+Architecture: any
+Section: libdevel
+Depends: libroot-net-ldap@libvers@ (= ${binary:Version}), libroot-core-dev, libldap2-dev | libldap-dev
+Conflicts: libroot-ldap-dev (<< 5.19.01-1)
+Replaces: libroot-ldap-dev (<< 5.19.01-1)
+Description: Ldap extension for ROOT
+ This package contains the Ldap plug-in for ROOT.  This gives you
+ access to Ldap directories via ROOT.
+
+
diff --git a/build/package/common/libroot-net.control b/build/package/common/libroot-net.control
new file mode 100644
index 00000000000..2d0a0fa8ec6
--- /dev/null
+++ b/build/package/common/libroot-net.control
@@ -0,0 +1,18 @@
+Package: libroot-net@libvers@
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}
+Homepage: http://root.cern.ch
+Description: Net library for ROOT
+ This package contains the Net library for ROOT. 
+
+Package: libroot-net-dev
+Architecture: any
+Section: libdevel
+Depends: libroot-net@libvers@ (= ${binary:Version}), libroot-math-mathcore-dev
+Replaces: libroot-dev
+Conflicts: libroot-dev (<< 5.19.01-1)
+Homepage: http://root.cern.ch
+Description: Net library for ROOT
+ This package contains the Net library for ROOT. 
+
diff --git a/build/package/common/libroot-clarens.control b/build/package/common/libroot-proof-clarens.control
similarity index 68%
rename from build/package/common/libroot-clarens.control
rename to build/package/common/libroot-proof-clarens.control
index 696a9b78655..3f4c75f227a 100644
--- a/build/package/common/libroot-clarens.control
+++ b/build/package/common/libroot-proof-clarens.control
@@ -1,9 +1,9 @@
-Package: libroot-clarens@libvers@
+Package: libroot-proof-clarens@libvers@
 Architecture: any
 Section: libs
 Depends: ${shlibs:Depends}
-Provides: libroot-clarens, root-plugin-clarens
 Replaces: root-plugin-clarens (<< 5.09.01-1)
+Homepage: http://clarens.sourceforge.net
 Description: Clarens extension for ROOT - run-time libraries
  This package contains the Clarens plug-in for ROOT, for use in a GRID
  enabled analysis environment.
@@ -11,14 +11,14 @@ Description: Clarens extension for ROOT - run-time libraries
  The Clarens Grid-Enabled Web Services Framework is an open source,
  secure, high-performance  "portal" for ubiquitous access to data and
  computational resources provided by computing grids.
- .
- ROOT web-site: http://root.cern.ch
- Clarens web-site: http://clarens.sourceforge.net
 
-Package: libroot-clarens-dev
+Package: libroot-proof-clarens-dev
 Architecture: any
 Section: libdevel
-Depends: libroot-clarens@libvers@ (= ${binary:Version}), libroot-dev, libxmlrpc-c3-dev | libxmlrpc-c-dev
+Depends: libroot-proof-clarens@libvers@ (= ${binary:Version}), libroot-core-dev, libxmlrpc-c3-dev | libxmlrpc-c-dev
+Conflicts: libroot-clarens-dev (<< 5.19.01-1)
+Replaces: libroot-clarens-dev
+Homepage: http://clarens.sourceforge.net
 Description: Clarens extension for ROOT - development files
  This package contains the Clarens plug-in for ROOT, for use in a GRID
  enabled analysis environment.
@@ -26,7 +26,4 @@ Description: Clarens extension for ROOT - development files
  The Clarens Grid-Enabled Web Services Framework is an open source,
  secure, high-performance  "portal" for ubiquitous access to data and
  computational resources provided by computing grids.
- .
- ROOT web-site: http://root.cern.ch
- Clarens web-site: http://clarens.sourceforge.net
 
diff --git a/build/package/common/libroot-proof.control b/build/package/common/libroot-proof.control
new file mode 100644
index 00000000000..528379bd239
--- /dev/null
+++ b/build/package/common/libroot-proof.control
@@ -0,0 +1,20 @@
+Package: libroot-proof@libvers@
+Architecture: any
+Depends: ${shlibs:Depends}
+Suggests: root-plugin-net-netx, root-plugin-proof-xproof
+Homepage: http://root.cern.ch
+Description: PROOF library for ROOT
+ This package contains the PROOF library for ROOT.  This provides a
+ client to use in a PROOF environment.
+
+Package: libroot-proof-dev
+Architecture: any
+Section: libdevel
+Depends: libroot-proof@libvers@ (= ${binary:Version}), libroot-math-mathcore-dev, libroot-tree-dev
+Replaces: root-plugin-proof
+Conflicts: root-plugin-proof (<< 5.19.01-1)
+Homepage: http://root.cern.ch
+Description: PROOF library for ROOT
+ This package contains the PROOF library for ROOT.  This provides a
+ client to use in a PROOF environment.
+
diff --git a/build/package/common/libroot-python.install.in b/build/package/common/libroot-python.install.in
deleted file mode 100644
index 8b137891791..00000000000
--- a/build/package/common/libroot-python.install.in
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/build/package/common/libroot-roofit.control b/build/package/common/libroot-roofit.control
index 9d6fc244b20..00b6cd2ca6f 100644
--- a/build/package/common/libroot-roofit.control
+++ b/build/package/common/libroot-roofit.control
@@ -2,7 +2,7 @@ Package: libroot-roofit@libvers@
 Architecture: any
 Section: libs
 Depends: ${shlibs:Depends}, root-fitter
-Provides: libroot-roofit, root-plugin-roofit
+Homepage: http://roofit.sourceforge.net/
 Replaces: root-plugin-roofit  (<< 5.09.01-1)
 Description: ROOT extension for modeling expected distribtions - libraries
  The RooFit packages provide a toolkit for modeling the expected
@@ -16,14 +16,12 @@ Description: ROOT extension for modeling expected distribtions - libraries
  primarily targeted to the high-energy physicists using the ROOT
  analysis environment, but the general nature of the package make it
  suitable for adoption in different disciplines as well.
- .
- RooFit web-site: http://roofit.sourceforge.net/
- ROOT web-site: http://root.cern.ch
 
 Package: libroot-roofit-dev
 Architecture: any
 Section: libdevel
-Depends: libroot-roofit@libvers@ (= ${binary:Version}), libroot-dev, libroot-minuit-dev
+Homepage: http://roofit.sourceforge.net/
+Depends: libroot-roofit@libvers@ (= ${binary:Version}), libroot-graf2d-graf-dev, libroot-tree-dev
 Description: ROOT extension for modeling expected distribtions - development
  The RooFit packages provide a toolkit for modeling the expected
  distribution of events in a physics analysis. Models can be used to
@@ -36,7 +34,4 @@ Description: ROOT extension for modeling expected distribtions - development
  primarily targeted to the high-energy physicists using the ROOT
  analysis environment, but the general nature of the package make it
  suitable for adoption in different disciplines as well.
- .
- RooFit web-site: http://roofit.sourceforge.net/
- ROOT web-site: http://root.cern.ch
 
diff --git a/build/package/common/libroot-static.install.in b/build/package/common/libroot-static.install.in
new file mode 100644
index 00000000000..7f57c811977
--- /dev/null
+++ b/build/package/common/libroot-static.install.in
@@ -0,0 +1,5 @@
+@prefix@/lib/root/@version@/libRoot.a
+@prefix@/bin/roota
+@prefix@/bin/proofserva
+@prefix@/share/man/man1/roota.1*
+@prefix@/share/man/man1/proofserva.1*
diff --git a/build/package/common/libroot-tmva.control b/build/package/common/libroot-tmva.control
index 2b85be95039..adf43bcd252 100644
--- a/build/package/common/libroot-tmva.control
+++ b/build/package/common/libroot-tmva.control
@@ -2,7 +2,7 @@ Package: libroot-tmva@libvers@
 Architecture: any
 Section: libs
 Depends: ${shlibs:Depends}
-Provides: libroot-tmva, root-plugin-tmva
+Homepage: http://tmva.sourceforge.net
 Description: Toolkit for multivariate data analysis
  The Toolkit for Multivariate Analysis (TMVA) provides a
  ROOT-integrated environment for the parallel processing and
@@ -22,14 +22,13 @@ Description: Toolkit for multivariate data analysis
  evaluation). In addition all these methods can be tested in parallel,
  and hence their performance on a particular data set may easily be
  compared.
- .
- ROOT web-site: http://root.cern.ch
- TMVA web-site: http://tmva.sourceforge.net
+
 
 Package: libroot-tmva-dev
 Architecture: any
 Section: libdevel
-Depends: libroot-tmva@libvers@ (= ${binary:Version}), libroot-dev
+Depends: libroot-tmva@libvers@ (= ${binary:Version}), libroot-math-mlp-dev
+Homepage: http://tmva.sourceforge.net
 Description: Toolkit for multivariate data analysis - development files
  The Toolkit for Multivariate Analysis (TMVA) provides a
  ROOT-integrated environment for the parallel processing and
@@ -49,7 +48,4 @@ Description: Toolkit for multivariate data analysis - development files
  evaluation). In addition all these methods can be tested in parallel,
  and hence their performance on a particular data set may easily be
  compared.
- .
- ROOT web-site: http://root.cern.ch
- TMVA web-site: http://tmva.sourceforge.net
 
diff --git a/build/package/common/libroot-tree-treeplayer.control b/build/package/common/libroot-tree-treeplayer.control
new file mode 100644
index 00000000000..6d75b28f43f
--- /dev/null
+++ b/build/package/common/libroot-tree-treeplayer.control
@@ -0,0 +1,15 @@
+Package: libroot-tree-treeplayer@libvers@
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: Library to loop over a ROOT tree 
+ Plug-in to loop over a ROOT tree.
+
+Package: libroot-tree-treeplayer-dev
+Architecture: any
+Section: libdevel
+Conflicts: libroot-dev (<< 5.19.01-1)
+Replaces: libroot-dev
+Depends: libroot-tree-treeplayer@libvers@ (= ${binary:Version}), libroot-tree-dev, libroot-graf2d-gpad-dev, libroot-graf3d-g3d-dev
+Description: Library to loop over a ROOT tree 
+ Plug-in to loop over a ROOT tree.
+
diff --git a/build/package/common/libroot-tree.control b/build/package/common/libroot-tree.control
new file mode 100644
index 00000000000..2193e88e253
--- /dev/null
+++ b/build/package/common/libroot-tree.control
@@ -0,0 +1,19 @@
+Package: libroot-tree@libvers@
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}
+Recommends: libroot-tree-treeplayer@libvers@ | root-plugin-tree-treeviewer
+Homepage: http://root.cern.ch
+Description: Tree library for ROOT
+ This package contains the Tree library for ROOT. 
+
+Package: libroot-tree-dev
+Architecture: any
+Section: libdevel
+Depends: libroot-tree@libvers@ (= ${binary:Version}), libroot-core-dev
+Replaces: libroot-dev
+Conflicts: libroot-dev (<< 5.19.01-1)
+Homepage: http://root.cern.ch
+Description: Tree library for ROOT
+ This package contains the Tree library for ROOT. 
+
diff --git a/build/package/common/root-plugin-geom-gdml.control b/build/package/common/root-plugin-geom-gdml.control
new file mode 100644
index 00000000000..964db34887c
--- /dev/null
+++ b/build/package/common/root-plugin-geom-gdml.control
@@ -0,0 +1,9 @@
+Package: root-plugin-geom-gdml
+Architecture: any
+Conflicts: libroot-dev (<< 5.19.01-1)
+Replaces: libroot-dev
+Depends: ${shlibs:Depends}, ${python:Depends}, libroot-geom-dev
+Homepage: http://root.cern.ch
+Description: GDML import/export module for ROOT geometries
+ This package contains an import/export module for the ROOT geometry.
+
diff --git a/build/package/common/libroot-python-dev.install.in b/build/package/common/root-plugin-geom-gdml.install.in
similarity index 50%
rename from build/package/common/libroot-python-dev.install.in
rename to build/package/common/root-plugin-geom-gdml.install.in
index fe946604665..f4b544f4947 100644
--- a/build/package/common/libroot-python-dev.install.in
+++ b/build/package/common/root-plugin-geom-gdml.install.in
@@ -1,5 +1,2 @@
-@prefix@/lib/root/@version@/ROOT.py
 @prefix@/lib/root/@version@/ROOTwriter.py
 @prefix@/lib/root/@version@/writer.py
-@prefix@/lib/root/@version@/PyCintex.py
-
diff --git a/build/package/common/root-plugin-geom-geombuilder.control b/build/package/common/root-plugin-geom-geombuilder.control
new file mode 100644
index 00000000000..4cb40b0a6f7
--- /dev/null
+++ b/build/package/common/root-plugin-geom-geombuilder.control
@@ -0,0 +1,9 @@
+Package: root-plugin-geom-geombuilder
+Architecture: any
+Conflicts: libroot-dev (<< 5.19.01-1)
+Replaces: libroot-dev
+Depends: ${shlibs:Depends}
+Homepage: http://root.cern.ch
+Description: Geometry builder plugin for ROOT
+ This package contains a geometry builder plugin for ROOT.
+
diff --git a/build/package/common/root-plugin-geom-geompainter.control b/build/package/common/root-plugin-geom-geompainter.control
new file mode 100644
index 00000000000..7b600128b48
--- /dev/null
+++ b/build/package/common/root-plugin-geom-geompainter.control
@@ -0,0 +1,9 @@
+Package: root-plugin-geom-geompainter
+Architecture: any
+Conflicts: libroot-dev (<< 5.19.01-1)
+Replaces: libroot-dev
+Depends: ${shlibs:Depends}
+Homepage: http://root.cern.ch
+Description: Geometry painter plugin for ROOT
+ This package contains a geometry painter plugin for ROOT.
+
diff --git a/build/package/common/root-plugin-gl.control b/build/package/common/root-plugin-gl.control
deleted file mode 100644
index 2e697522606..00000000000
--- a/build/package/common/root-plugin-gl.control
+++ /dev/null
@@ -1,13 +0,0 @@
-Package: root-plugin-gl
-Architecture: any
-Depends: ${shlibs:Depends}
-Provides: root-glviewer, root-plugin-eve
-Description: GL plugin for ROOT
- This package contains the GL plug-in for ROOT.  This plugin provides
- 3D rendering of volumes and shapes defined in ROOT.  Included is also
- a high quality 3D viewer for ROOT defined geometries.
- .
- This package also contain EVE - the GL based event display framework.
- .
- ROOT web-site: http://root.cern.ch
-
diff --git a/build/package/common/root-plugin-graf2d-asimage.control b/build/package/common/root-plugin-graf2d-asimage.control
new file mode 100644
index 00000000000..e703c4e2847
--- /dev/null
+++ b/build/package/common/root-plugin-graf2d-asimage.control
@@ -0,0 +1,9 @@
+Package: root-plugin-graf2d-asimage
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: AfterImage plugin for ROOT
+ This package contains the AfterImage plug-in for ROOT, which allows
+ you to store output graphics in many formats, including JPEG, PNG,
+ SVG, etc.
+
+
diff --git a/build/package/common/root-plugin-qt.control b/build/package/common/root-plugin-graf2d-qt.control
similarity index 76%
rename from build/package/common/root-plugin-qt.control
rename to build/package/common/root-plugin-graf2d-qt.control
index 77c90e22ce1..bfd94ea151b 100644
--- a/build/package/common/root-plugin-qt.control
+++ b/build/package/common/root-plugin-graf2d-qt.control
@@ -1,9 +1,8 @@
-Package: root-plugin-qt
+Package: root-plugin-graf2d-qt
 Architecture: any
 Depends: ${shlibs:Depends}
 Description: Qt plugin for ROOT
  This package contains the Qt plug-in for ROOT.  This plugin
  provides an abstraction over a display.  Windows are created via Qt.
- .
- ROOT web-site: http://root.cern.ch
+
 
diff --git a/build/package/common/root-plugin-graf2d-x11.control b/build/package/common/root-plugin-graf2d-x11.control
new file mode 100644
index 00000000000..25d4533139e
--- /dev/null
+++ b/build/package/common/root-plugin-graf2d-x11.control
@@ -0,0 +1,10 @@
+Package: root-plugin-graf2d-x11
+Architecture: any
+Replaces: libroot-dev
+Conflicts: libroot-dev (<< 5.19.01-1)
+Provides: root-system-display
+Depends: ${shlibs:Depends}
+Description: X window system plugin for ROOT
+ This package contains the X11 plug-in for ROOT, which allows using an 
+ X display for showing graphics. 
+
diff --git a/build/package/common/root-plugin-graf3d-x3d.control b/build/package/common/root-plugin-graf3d-x3d.control
new file mode 100644
index 00000000000..39e161f887f
--- /dev/null
+++ b/build/package/common/root-plugin-graf3d-x3d.control
@@ -0,0 +1,11 @@
+Package: root-plugin-graf3d-x3d
+Architecture: any
+Conflicts: libroot-dev (<< 5.19.01-1)
+Replaces: libroot-dev
+Depends: ${shlibs:Depends}
+Recommends: root-plugin-graf3d-gl
+Description: X 3D plugin for ROOT
+ This package contains the X 3D plug-in for ROOT.  This plugin provides
+ 3D rendering of volumes and shapes defined in ROOT.  Included is also
+ a low quality 3D viewer for ROOT defined geometries.
+
diff --git a/build/package/common/root-plugin-gui-fitpanel.control b/build/package/common/root-plugin-gui-fitpanel.control
new file mode 100644
index 00000000000..8d668fc25e4
--- /dev/null
+++ b/build/package/common/root-plugin-gui-fitpanel.control
@@ -0,0 +1,9 @@
+Package: root-plugin-gui-fitpanel
+Architecture: any
+Conflicts: libroot-dev (<< 5.19.01-1)
+Replaces: libroot-dev
+Depends: ${shlibs:Depends}
+Description: GUI element for fits plugin for ROOT
+ This package contains a plug-in to show a pop-up dialog when fitting
+ various kinds of data.
+
diff --git a/build/package/common/root-plugin-gui-guibuilder.control b/build/package/common/root-plugin-gui-guibuilder.control
new file mode 100644
index 00000000000..b4921274fa5
--- /dev/null
+++ b/build/package/common/root-plugin-gui-guibuilder.control
@@ -0,0 +1,9 @@
+Package: root-plugin-gui-guibuilder
+Architecture: any
+Conflicts: libroot-dev (<< 5.19.01-1)
+Replaces: libroot-dev
+Depends: ${shlibs:Depends}
+Description: GUI editor plug-in for ROOT
+ This package contains a plug-in for editing graphical user interfaces
+ in ROOT.
+
diff --git a/build/package/common/root-plugin-gui-qt.control b/build/package/common/root-plugin-gui-qt.control
new file mode 100644
index 00000000000..28c9a1e7f47
--- /dev/null
+++ b/build/package/common/root-plugin-gui-qt.control
@@ -0,0 +1,7 @@
+Package: root-plugin-gui-qt
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: Qt plugin for ROOT
+ This package contains the Qt plug-in for ROOT.  This plugin
+ provides an abstraction over a display.  Windows are created via Qt.
+
diff --git a/build/package/common/root-plugin-gui-sessionviewer.control b/build/package/common/root-plugin-gui-sessionviewer.control
new file mode 100644
index 00000000000..e716028902c
--- /dev/null
+++ b/build/package/common/root-plugin-gui-sessionviewer.control
@@ -0,0 +1,9 @@
+Package: root-plugin-gui-sessionviewer
+Architecture: any
+Conflicts: libroot-dev (<< 5.19.01-1)
+Replaces: libroot-dev
+Depends: ${shlibs:Depends}
+Description: GUI to browse an interactive PROOF session
+ This package contains a plug-in browsing an interactive PROOF session
+ in ROOT.
+
diff --git a/build/package/common/root-plugin-hbook.control b/build/package/common/root-plugin-hist-hbook.control
similarity index 66%
rename from build/package/common/root-plugin-hbook.control
rename to build/package/common/root-plugin-hist-hbook.control
index 91b27e32979..e2b851c8899 100644
--- a/build/package/common/root-plugin-hbook.control
+++ b/build/package/common/root-plugin-hist-hbook.control
@@ -1,9 +1,9 @@
-Package: root-plugin-hbook
+Package: root-plugin-hist-hbook
 Architecture: any
 Depends: ${shlibs:Depends}
+Conflicts: root-plugin-hbook
+Replaces: root-plugin-hbook (<< 5.19.01-1)
 Description: Hbook plugin for ROOT
  This package contains the Hbook plug-in for ROOT, allowing you to
  access legacy Hbook files (NTuples and Histograms from PAW).
- .
- ROOT web-site: http://root.cern.ch
 
diff --git a/build/package/common/root-plugin-hbook.install.in b/build/package/common/root-plugin-hist-hbook.install.in
similarity index 64%
rename from build/package/common/root-plugin-hbook.install.in
rename to build/package/common/root-plugin-hist-hbook.install.in
index abea758d937..ca3bf87319e 100644
--- a/build/package/common/root-plugin-hbook.install.in
+++ b/build/package/common/root-plugin-hist-hbook.install.in
@@ -1,6 +1,4 @@
 @prefix@/bin/h2root
 @prefix@/bin/g2root
-@prefix@/bin/g2rootold
 @prefix@/share/man/man1/h2root.1*
 @prefix@/share/man/man1/g2root.1*
-@prefix@/share/man/man1/g2rootold.1*
diff --git a/build/package/common/root-plugin-hist-histpainter.control b/build/package/common/root-plugin-hist-histpainter.control
new file mode 100644
index 00000000000..93ac273512b
--- /dev/null
+++ b/build/package/common/root-plugin-hist-histpainter.control
@@ -0,0 +1,8 @@
+Package: root-plugin-hist-histpainter
+Architecture: any
+Replaces: libroot-dev
+Conflicts: libroot-dev (<< 5.19.01-1)
+Depends: ${shlibs:Depends}
+Description: Histogram painter plugin for ROOT
+ This package a painter of histograms for ROOT.
+
diff --git a/build/package/common/root-plugin-hist-spectrumpainter.control b/build/package/common/root-plugin-hist-spectrumpainter.control
new file mode 100644
index 00000000000..9c1b75cd19f
--- /dev/null
+++ b/build/package/common/root-plugin-hist-spectrumpainter.control
@@ -0,0 +1,8 @@
+Package: root-plugin-hist-spectrumpainter
+Architecture: any
+Depends: ${shlibs:Depends}
+Replaces: libroot-dev
+Conflicts: libroot-dev (<< 5.19.01-1)
+Description: Spectrum painter plugin for ROOT
+ This package a painter of spectra for ROOT.
+
diff --git a/build/package/common/root-plugin-castor.control b/build/package/common/root-plugin-io-castor.control
similarity index 56%
rename from build/package/common/root-plugin-castor.control
rename to build/package/common/root-plugin-io-castor.control
index b52ce9a8105..c2a457a1f97 100644
--- a/build/package/common/root-plugin-castor.control
+++ b/build/package/common/root-plugin-io-castor.control
@@ -1,11 +1,9 @@
-Package: root-plugin-castor
+Package: root-plugin-io-castor
 Architecture: any
-Depends: libshift-dev, ${shlibs:Depends}
+Depends: ${shlibs:Depends}
+Homepage: http://savannah.cern.ch/projects/castor/
 Description: CASTOR plugin for ROOT
  This package contains the rfio plug-in for ROOT.  Using this package,
  it's possible to access file managed by the SHIFT tape archive
  system, as used at CERN.
- .
- ROOT web-site: http://root.cern.ch
- CASTOR web-site: http://savannah.cern.ch/projects/castor/
 
diff --git a/build/package/common/root-plugin-chirp.control b/build/package/common/root-plugin-io-chirp.control
similarity index 84%
rename from build/package/common/root-plugin-chirp.control
rename to build/package/common/root-plugin-io-chirp.control
index fdf95c5e0e8..ab125390479 100644
--- a/build/package/common/root-plugin-chirp.control
+++ b/build/package/common/root-plugin-io-chirp.control
@@ -1,6 +1,7 @@
-Package: root-plugin-chirp
+Package: root-plugin-io-chirp
 Architecture: any
 Depends: ${shlibs:Depends}
+Homepage: http://www.cs.wisc.edu/condor/chirp/
 Description: Chirp plugin for ROOT
  This package contains the Chirp plug-in for ROOT, which allows you to
  access files via the Chirp protocol.
@@ -12,7 +13,4 @@ Description: Chirp plugin for ROOT
  Chirp provides a variety of authentication methods, allowing remote
  users to identify themselves with strong Globus or Kerberos
  credentials. The Chirp protocol is used in a variety of systems.
- .
- ROOT web-site: http://root.cern.ch
- Chirp web-site: http://www.cs.wisc.edu/condor/chirp/
 
diff --git a/build/package/common/root-plugin-dcache.control b/build/package/common/root-plugin-io-dcache.control
similarity index 75%
rename from build/package/common/root-plugin-dcache.control
rename to build/package/common/root-plugin-io-dcache.control
index b7e9ba382e3..0130b1e10be 100644
--- a/build/package/common/root-plugin-dcache.control
+++ b/build/package/common/root-plugin-io-dcache.control
@@ -1,12 +1,10 @@
-Package: root-plugin-dcache
+Package: root-plugin-io-dcache
 Architecture: any
 Depends: ${shlibs:Depends}, libdcap1
+Homepage: http://www.dcache.org
 Description: dCache plugin for ROOT
  This package contains the dCache plug-in for ROOT, that allows
  transparent access to files data via a dCache server. Given a path
  which doesn't belong to the dCache managed filesystem, it falls back
  to the ordinary TFile behaviour.
- .
- ROOT web-site: http://root.cern.ch
- dCache web-site: http://www.dcache.org
 
diff --git a/build/package/common/root-plugin-io-gfal.control b/build/package/common/root-plugin-io-gfal.control
new file mode 100644
index 00000000000..6c42653cae4
--- /dev/null
+++ b/build/package/common/root-plugin-io-gfal.control
@@ -0,0 +1,7 @@
+Package: root-plugin-io-gfal
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: GFal plugin for ROOT
+ This package contains the GFal plug-in for ROOT, that allows
+ transparent access to files data via various Grid file services.
+
diff --git a/build/package/common/root-plugin-sql.control b/build/package/common/root-plugin-io-sql.control
similarity index 66%
rename from build/package/common/root-plugin-sql.control
rename to build/package/common/root-plugin-io-sql.control
index e2b366918f9..e3a81bcb55f 100644
--- a/build/package/common/root-plugin-sql.control
+++ b/build/package/common/root-plugin-io-sql.control
@@ -1,11 +1,9 @@
-Package: root-plugin-sql
+Package: root-plugin-io-sql
 Architecture: any
 Depends: ${shlibs:Depends}
-Recommends: root-db-client | root-plugin-mysql
+Recommends: root-db-client | root-plugin-io-mysql
 Description: SQL plugin for ROOT
  This package contains the SQL plug-in for ROOT, that allows
- transparent access to files data via an SQL database, using ROOTs
+ transparent access to files data via an SQL database, using ROOT's
  TFile interface.
- .
- ROOT web-site: http://root.cern.ch
 
diff --git a/build/package/common/root-plugin-xml.control b/build/package/common/root-plugin-io-xml.control
similarity index 76%
rename from build/package/common/root-plugin-xml.control
rename to build/package/common/root-plugin-io-xml.control
index 1dcd83b4721..7e24f39af4f 100644
--- a/build/package/common/root-plugin-xml.control
+++ b/build/package/common/root-plugin-io-xml.control
@@ -1,9 +1,7 @@
-Package: root-plugin-xml
+Package: root-plugin-io-xml
 Architecture: any
 Depends: ${shlibs:Depends}
 Description: XML reader plugin for ROOT
  This package contains the XML reader plug-in for ROOT.   This package
  provide a plug-in to parse XML files with ROOT.
- .
- ROOT web-site: http://root.cern.ch
 
diff --git a/build/package/common/root-plugin-fftw3.control b/build/package/common/root-plugin-math-fftw3.control
similarity index 57%
rename from build/package/common/root-plugin-fftw3.control
rename to build/package/common/root-plugin-math-fftw3.control
index 876b94fed36..82178a8e86a 100644
--- a/build/package/common/root-plugin-fftw3.control
+++ b/build/package/common/root-plugin-math-fftw3.control
@@ -1,12 +1,8 @@
-Package: root-plugin-fftw3
+Package: root-plugin-math-fftw3
 Architecture: any
 Depends: ${shlibs:Depends}
-Replaces: libroot-fftw5.11
-Conflicts: libroot-fftw
+Homepage: http://fftw.org/
 Description: FFTw plugin for ROOT
  This package contains the Fast Fourier Transform extension for ROOT.
  It uses the very fast fftw (version 3) library.
- .
- ROOT web-site: http://root.cern.ch
- FFTW web-site: http://fftw.org/
 
diff --git a/build/package/common/root-plugin-fumili.control b/build/package/common/root-plugin-math-fumili.control
similarity index 76%
rename from build/package/common/root-plugin-fumili.control
rename to build/package/common/root-plugin-math-fumili.control
index 27182691234..7255a2d08e3 100644
--- a/build/package/common/root-plugin-fumili.control
+++ b/build/package/common/root-plugin-math-fumili.control
@@ -1,10 +1,9 @@
-Package: root-plugin-fumili
+Package: root-plugin-math-fumili
 Architecture: any
 Depends: ${shlibs:Depends}
 Provides: root-fitter
 Description: Fumili plugin for ROOT
  This package contains the fumili plug-in for ROOT.  This provides an
  alternative fitting algorithm for ROOT.
- .
- ROOT web-site: http://root.cern.ch
+
 
diff --git a/build/package/common/root-plugin-minuit2.control b/build/package/common/root-plugin-math-minuit2.control
similarity index 76%
rename from build/package/common/root-plugin-minuit2.control
rename to build/package/common/root-plugin-math-minuit2.control
index 23b95b1af38..2a2249c67db 100644
--- a/build/package/common/root-plugin-minuit2.control
+++ b/build/package/common/root-plugin-math-minuit2.control
@@ -1,10 +1,9 @@
-Package: root-plugin-minuit2
+Package: root-plugin-math-minuit2
 Architecture: any
 Depends: ${shlibs:Depends}
 Provides: root-fitter
 Description: Minuit version 2 plugin for ROOT
  This package contains the MINUIT version 2 plug-in for ROOT.  This 
  provides an fitting algorithm for ROOT.
- .
- ROOT web-site: http://root.cern.ch
+
 
diff --git a/build/package/common/root-plugin-pythia5.control b/build/package/common/root-plugin-montecarlo-pythia5.control
similarity index 84%
rename from build/package/common/root-plugin-pythia5.control
rename to build/package/common/root-plugin-montecarlo-pythia5.control
index 2b1273b226a..18ba51921c0 100644
--- a/build/package/common/root-plugin-pythia5.control
+++ b/build/package/common/root-plugin-montecarlo-pythia5.control
@@ -1,4 +1,4 @@
-Package: root-plugin-pythia5
+Package: root-plugin-montecarlo-pythia5
 Architecture: any
 Depends: ${shlibs:Depends}
 Description: Pythia version 5 plugin for ROOT
@@ -6,6 +6,5 @@ Description: Pythia version 5 plugin for ROOT
  package provide the ROOT user with transparent interface to the
  Pythia (version 5) event generators for hadronic interactions. If the
  term "hadronic" doesn't ring any bells, this package is not for you.
- .
- ROOT web-site: http://root.cern.ch
+
 
diff --git a/build/package/common/root-plugin-pythia6.control b/build/package/common/root-plugin-montecarlo-pythia6.control
similarity index 84%
rename from build/package/common/root-plugin-pythia6.control
rename to build/package/common/root-plugin-montecarlo-pythia6.control
index 202c08e2bfc..38d98b118d4 100644
--- a/build/package/common/root-plugin-pythia6.control
+++ b/build/package/common/root-plugin-montecarlo-pythia6.control
@@ -1,4 +1,4 @@
-Package: root-plugin-pythia6
+Package: root-plugin-montecarlo-pythia6
 Architecture: any
 Depends: ${shlibs:Depends}
 Description: Pythia version 6 plugin for ROOT
@@ -6,6 +6,4 @@ Description: Pythia version 6 plugin for ROOT
  package provide the ROOT user with transparent interface to the
  Pythia (version 6) event generators for hadronic interactions. If the
  term "hadronic" does not ring any bells, this package is not for you.
- .
- ROOT web-site: http://root.cern.ch
 
diff --git a/build/package/common/root-plugin-montecarlo-pythia8.control b/build/package/common/root-plugin-montecarlo-pythia8.control
new file mode 100644
index 00000000000..e8b3d7306b1
--- /dev/null
+++ b/build/package/common/root-plugin-montecarlo-pythia8.control
@@ -0,0 +1,9 @@
+Package: root-plugin-montecarlo-pythia8
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: Pythia version 8 plugin for ROOT
+ This package contains the Pythia version 8 plug-in for ROOT. This
+ package provide the ROOT user with transparent interface to the
+ Pythia (version 8) event generators for hadronic interactions. If the
+ term "hadronic" does not ring any bells, this package is not for you.
+
diff --git a/build/package/common/root-plugin-alien.control b/build/package/common/root-plugin-net-alien.control
similarity index 60%
rename from build/package/common/root-plugin-alien.control
rename to build/package/common/root-plugin-net-alien.control
index 616015d580b..eaacc4c73d3 100644
--- a/build/package/common/root-plugin-alien.control
+++ b/build/package/common/root-plugin-net-alien.control
@@ -1,9 +1,7 @@
-Package: root-plugin-alien
+Package: root-plugin-net-alien
 Architecture: any
+Homepage: http://alien.cern.ch
 Description: AliEn plugin for ROOT
  This package contains the AliEn plug-in for ROOT, which provides an
  interface to the AliEN GRID facility.
- .
- ROOT web-site: http://root.cern.ch
- AliEN web-site: http://alien.cern.ch
 
diff --git a/build/package/common/root-plugin-net-glite.control b/build/package/common/root-plugin-net-glite.control
new file mode 100644
index 00000000000..c0dcd2c54e4
--- /dev/null
+++ b/build/package/common/root-plugin-net-glite.control
@@ -0,0 +1,8 @@
+Package: root-plugin-net-glite
+Architecture: any
+Homepage: http://root.cern.ch
+Description: Glite plugin for ROOT
+ This package contains the Glite plug-in for ROOT, which provides an
+ interface to the Glite GRID facility.
+
+
diff --git a/build/package/common/root-plugin-globus.control b/build/package/common/root-plugin-net-globus.control
similarity index 64%
rename from build/package/common/root-plugin-globus.control
rename to build/package/common/root-plugin-net-globus.control
index 16583edfd1b..03377576a0c 100644
--- a/build/package/common/root-plugin-globus.control
+++ b/build/package/common/root-plugin-net-globus.control
@@ -1,10 +1,8 @@
-Package: root-plugin-globus
+Package: root-plugin-net-globus
 Architecture: any
 Depends: ${shlibs:Depends}
+Homepage: http://www.globus.org
 Description: Globus plugin for ROOT
  This package contains the Globus plug-in for ROOT, that allows
  authentification and authorization against globus.
- .
- ROOT web-site: http://root.cern.ch
- globus web-site: http://www.globus.org
 
diff --git a/build/package/common/root-plugin-krb5.control b/build/package/common/root-plugin-net-krb5.control
similarity index 80%
rename from build/package/common/root-plugin-krb5.control
rename to build/package/common/root-plugin-net-krb5.control
index cabc4244b79..07f7bf78b45 100644
--- a/build/package/common/root-plugin-krb5.control
+++ b/build/package/common/root-plugin-net-krb5.control
@@ -1,9 +1,8 @@
-Package: root-plugin-krb5
+Package: root-plugin-net-krb5
 Architecture: any
 Depends: ${shlibs:Depends}, krb5-user | heimdal-clients
 Description: Kerberos (version 5) plugin for ROOT
  This package contains the Kerberos (version 5) plug-in for ROOT, that
  allows authentication and authorisation using Kerberos tokens.
- .
- ROOT web-site: http://root.cern.ch
+
 
diff --git a/build/package/common/root-plugin-net-monalisa.control b/build/package/common/root-plugin-net-monalisa.control
new file mode 100644
index 00000000000..54eb29b6a7c
--- /dev/null
+++ b/build/package/common/root-plugin-net-monalisa.control
@@ -0,0 +1,7 @@
+Package: root-plugin-net-monalisa
+Architecture: any
+Homepage: http://monalisa.cacr.caltech.edu
+Description: Monalisa plugin for ROOT
+ This package contains the Monalisa plug-in for ROOT, which provides an
+ interface MonaLisa Monitoring Services.
+
diff --git a/build/package/common/root-plugin-netx.control b/build/package/common/root-plugin-net-netx.control
similarity index 62%
rename from build/package/common/root-plugin-netx.control
rename to build/package/common/root-plugin-net-netx.control
index 1b1e3361f68..110369fb60a 100644
--- a/build/package/common/root-plugin-netx.control
+++ b/build/package/common/root-plugin-net-netx.control
@@ -1,9 +1,10 @@
-Package: root-plugin-netx
+Package: root-plugin-net-netx
 Architecture: any
 Depends: ${shlibs:Depends}
+Recommends: root-plugin-net-xrootd
+Homepage: http://root.cern.ch
 Description: NetX plugin for ROOT
  This package contains the NetX plug-in for ROOT.  Client for the
  XRootd server.
- .
- ROOT web-site: http://root.cern.ch
+
 
diff --git a/build/package/common/root-plugin-srp.control b/build/package/common/root-plugin-net-srp.control
similarity index 69%
rename from build/package/common/root-plugin-srp.control
rename to build/package/common/root-plugin-net-srp.control
index e11403eba02..70c1c730ee1 100644
--- a/build/package/common/root-plugin-srp.control
+++ b/build/package/common/root-plugin-net-srp.control
@@ -1,11 +1,9 @@
-Package: root-plugin-srp
+Package: root-plugin-net-srp
 Architecture: any
 Depends: ${shlibs:Depends}
+Homepage: http://srp.stanford.edu
 Description: SRP plugin for ROOT
  This package contains the SRP (Secure Remote Protocol) utility plug-in 
  for ROOT. This package provides some tools for SRP authentication 
  with ROOT.
- .
- ROOT web-site: http://root.cern.ch
- SRP web-site: http://srp.stanford.edu
 
diff --git a/build/package/common/root-plugin-net-xrootd.install.in b/build/package/common/root-plugin-net-xrootd.install.in
new file mode 100644
index 00000000000..b8c8a520614
--- /dev/null
+++ b/build/package/common/root-plugin-net-xrootd.install.in
@@ -0,0 +1,3 @@
+@prefix@/bin/xrd.bin
+@prefix@/bin/xrdcp.bin
+@prefix@/bin/xrdpwdadmin.bin
diff --git a/build/package/common/root-plugin-peac.control b/build/package/common/root-plugin-proof-peac.control
similarity index 67%
rename from build/package/common/root-plugin-peac.control
rename to build/package/common/root-plugin-proof-peac.control
index 5dbc3ea01ab..b67ce73fc5e 100644
--- a/build/package/common/root-plugin-peac.control
+++ b/build/package/common/root-plugin-proof-peac.control
@@ -1,6 +1,7 @@
-Package: root-plugin-peac
+Package: root-plugin-proof-peac
 Architecture: any
-Depends: ${shlibs:Depends}, root-plugin-proof
+Depends: ${shlibs:Depends}
+Homepage: http://physics.ucsd.edu/~schsu/project/peac.html
 Description: PEAC plugin for ROOT - run-time libraries
  This package contains the PEAC (Proof Enabled Analysis Center)
  plug-in for ROOT.
@@ -9,7 +10,4 @@ Description: PEAC plugin for ROOT - run-time libraries
  Clarens as a "glue" protocol to advertise and communicate amongst
  SAM, Global Manager (GM), Local Manager (LM), DCache, and PROOF
  services.
- .
- ROOT web-site: http://root.cern.ch
- PEAC web-site: http://physics.ucsd.edu/~schsu/project/peac.html
 
diff --git a/build/package/common/root-plugin-proof-proofplayer.control b/build/package/common/root-plugin-proof-proofplayer.control
new file mode 100644
index 00000000000..3b94d3bd480
--- /dev/null
+++ b/build/package/common/root-plugin-proof-proofplayer.control
@@ -0,0 +1,9 @@
+Package: root-plugin-proof-proofplayer
+Architecture: any
+Depends: ${shlibs:Depends}
+Suggests: root-plugin-net-netx, root-plugin-proof-xproof
+Description: PROOF plugin for ROOT
+ This package contains the proof plug-in for ROOT.  This provides a
+ client to use in a PROOF environment.
+
+
diff --git a/build/package/common/root-plugin-xproof.control b/build/package/common/root-plugin-proof-xproof.control
similarity index 61%
rename from build/package/common/root-plugin-xproof.control
rename to build/package/common/root-plugin-proof-xproof.control
index 25f6449717d..c5ba31555d5 100644
--- a/build/package/common/root-plugin-xproof.control
+++ b/build/package/common/root-plugin-proof-xproof.control
@@ -1,12 +1,11 @@
-Package: root-plugin-xproof
+Package: root-plugin-proof-xproof
 Architecture: any
-Depends: ${shlibs:Depends}, root-plugin-proof
-Suggests: root-plugin-netx
+Depends: ${shlibs:Depends}
+Suggests: root-plugin-net-netx
 Replaces: root-proofd
 Conflicts: root-proofd (<= 5.13.05-4)
 Description: XPROOF plugin for ROOT
  This package contains the xproof plug-in for ROOT.  This provides a
  client to be used in a PROOF environment.
- .
- ROOT web-site: http://root.cern.ch
+
 
diff --git a/build/package/common/root-plugin-maxdb.control b/build/package/common/root-plugin-sql-maxdb.control
similarity index 65%
rename from build/package/common/root-plugin-maxdb.control
rename to build/package/common/root-plugin-sql-maxdb.control
index 228930db98f..d5f19b7c171 100644
--- a/build/package/common/root-plugin-maxdb.control
+++ b/build/package/common/root-plugin-sql-maxdb.control
@@ -1,15 +1,11 @@
-Package: root-plugin-maxdb
+Package: root-plugin-sql-maxdb
 Architecture: i386 ia64 amd64
 Depends: ${shlibs:Depends}
 Provides: root-db-client
-Replaces: root-plugin-sapdb
-Conflicts: root-plugin-sapdb
+Homepage: http://www.mysql.com/products/maxdb
 Description: MaxDB client plugin for ROOT
  This package contains the MaxDB plug-in for ROOT. This package
  provide a thin client (interface) to MaxDB servers. Using this
  client, one can obtain information from a MaxDB database into 
  the ROOT environment.
- .
- ROOT web-site: http://root.cern.ch
- MaxDB web-site: http://www.mysql.com/products/maxdb
 
diff --git a/build/package/common/root-plugin-mysql.control b/build/package/common/root-plugin-sql-mysql.control
similarity index 67%
rename from build/package/common/root-plugin-mysql.control
rename to build/package/common/root-plugin-sql-mysql.control
index 5951ddf2263..c673ec54533 100644
--- a/build/package/common/root-plugin-mysql.control
+++ b/build/package/common/root-plugin-sql-mysql.control
@@ -1,12 +1,11 @@
-Package: root-plugin-mysql
+Package: root-plugin-sql-mysql
 Architecture: any
 Depends: ${shlibs:Depends}
 Provides: root-db-client
 Description: MySQL client plugin for ROOT
- This package contains the mysql plug-in for ROOT.  This plugin
+ This package contains the MySQL plug-in for ROOT.  This plugin
  provides a thin client (interface) to MySQL servers. Using this
  client, one can obtain information from a MySQL database into the
  ROOT environment.
- .
- ROOT web-site: http://root.cern.ch
+
 
diff --git a/build/package/common/root-plugin-odbc.control b/build/package/common/root-plugin-sql-odbc.control
similarity index 69%
rename from build/package/common/root-plugin-odbc.control
rename to build/package/common/root-plugin-sql-odbc.control
index 807e3eb630c..c906aba0f6c 100644
--- a/build/package/common/root-plugin-odbc.control
+++ b/build/package/common/root-plugin-sql-odbc.control
@@ -1,12 +1,10 @@
-Package: root-plugin-odbc
+Package: root-plugin-sql-odbc
 Architecture: any
 Depends: ${shlibs:Depends}
 Provides: root-db-client
+Homepage: http://unixodbc.org or http://iodbc.org
 Description: ODBC plugin for ROOT
  This package contains the ODBC (Open DataBase Connectivity) plug-in
  for ROOT, that allows transparent access to any kind of database that
  supports the ODBC protocol. 
- .
- ROOT web-site: http://root.cern.ch
- ODBC web-site: http://unixodbc.org or http://iodbc.org
 
diff --git a/build/package/common/root-plugin-oracle.control b/build/package/common/root-plugin-sql-oracle.control
similarity index 84%
rename from build/package/common/root-plugin-oracle.control
rename to build/package/common/root-plugin-sql-oracle.control
index fd70e2fc05a..2af65107c69 100644
--- a/build/package/common/root-plugin-oracle.control
+++ b/build/package/common/root-plugin-sql-oracle.control
@@ -1,4 +1,4 @@
-Package: root-plugin-oracle
+Package: root-plugin-sql-oracle
 Architecture: any
 Depends: oracle-instantclient-basic, ${shlibs:Depends}
 Provides: root-db-client
@@ -7,6 +7,5 @@ Description: Oracle client plugin for ROOT
  provides a thin client (interface) to Oracle servers. Using this
  client, one can obtain information from a Oracle database into the
  ROOT environment.
- .
- ROOT web-site: http://root.cern.ch
+
 
diff --git a/build/package/common/root-plugin-pgsql.control b/build/package/common/root-plugin-sql-pgsql.control
similarity index 84%
rename from build/package/common/root-plugin-pgsql.control
rename to build/package/common/root-plugin-sql-pgsql.control
index 594bf3d3dd4..c6f324e1fd9 100644
--- a/build/package/common/root-plugin-pgsql.control
+++ b/build/package/common/root-plugin-sql-pgsql.control
@@ -1,4 +1,4 @@
-Package: root-plugin-pgsql
+Package: root-plugin-sql-pgsql
 Architecture: any
 Depends: ${shlibs:Depends}
 Provides: root-db-client
@@ -7,6 +7,5 @@ Description: PostgreSQL client plugin for ROOT
  provides a thin client (interface) to PostGreSQL servers. Using this
  client, one can obtain information from a PostGreSQL database into the
  ROOT environment.
- .
- ROOT web-site: http://root.cern.ch
+
 
diff --git a/build/package/common/root-plugin-tree-treeplayer.control b/build/package/common/root-plugin-tree-treeplayer.control
new file mode 100644
index 00000000000..73ef7912c9d
--- /dev/null
+++ b/build/package/common/root-plugin-tree-treeplayer.control
@@ -0,0 +1,8 @@
+Package: root-plugin-tree-treeplayer
+Architecture: any
+Conflicts: libroot-dev (<< 5.19.01-1)
+Replaces: libroot-dev
+Depends: ${shlibs:Depends}
+Description: Plug-in to loop over a ROOT tree 
+ Plug-in to loop over a ROOT tree.
+
diff --git a/build/package/common/root-plugin-tree-treeviewer.control b/build/package/common/root-plugin-tree-treeviewer.control
new file mode 100644
index 00000000000..4b8e525ba9a
--- /dev/null
+++ b/build/package/common/root-plugin-tree-treeviewer.control
@@ -0,0 +1,9 @@
+Package: root-plugin-tree-treeviewer
+Architecture: any
+Conflicts: libroot-dev (<< 5.19.01-1)
+Replaces: libroot-dev
+Depends: ${shlibs:Depends}
+Description: GUI to browse an a ROOT tree
+ This package contains a plug-in for browsing a ROOT tree.
+ in ROOT.
+
diff --git a/build/package/common/root-plugin-venus.control b/build/package/common/root-plugin-venus.control
deleted file mode 100644
index 2cb874ca55a..00000000000
--- a/build/package/common/root-plugin-venus.control
+++ /dev/null
@@ -1,11 +0,0 @@
-Package: root-plugin-venus
-Architecture: any
-Depends: ${shlibs:Depends}
-Description: Venus plugin for ROOT
- This package contains the venus plug-in for ROOT. This package
- provide the ROOT user with transparent interface to the Venus event
- generators for hadronic interactions. If the term "hadronic" doesn't
- ring any bells, this package is not for you.
- .
- ROOT web-site: http://root.cern.ch
-
diff --git a/build/package/common/root-system-bin.control b/build/package/common/root-system-bin.control
index a13593e2ee1..6a0f99918b1 100644
--- a/build/package/common/root-system-bin.control
+++ b/build/package/common/root-system-bin.control
@@ -1,7 +1,7 @@
 Package: root-system-bin
 Architecture: any
-Depends: ${shlibs:Depends}, root-plugin-asimage
-Recommends: root-plugin-gl, libroot-minuit | root-fitter, libroot-dev
+Depends: ${shlibs:Depends}, root-plugin-graf2d-asimage
+Recommends: root-plugin-graf3d-gl, libroot-math-minuit | root-fitter, libroot-core-dev, root-plugin-graf2d-x11 | root-system-display
 Description: Numerical data analysis framework - general applications
  The ROOT system provides a set of OO frameworks with all the
  functionality needed to handle and analyse large amounts of data in a
@@ -27,6 +27,5 @@ Description: Numerical data analysis framework - general applications
  extended by linking external libraries. This makes ROOT a premier
  platform on which to build data acquisition, simulation and data
  analysis systems.
- .
- ROOT web-site: http://root.cern.ch
+
 
diff --git a/build/package/common/root-system-bin.install.in b/build/package/common/root-system-bin.install.in
index 7a8cd00d071..cbee6e751f4 100644
--- a/build/package/common/root-system-bin.install.in
+++ b/build/package/common/root-system-bin.install.in
@@ -1,6 +1,7 @@
 @prefix@/share/root/macros/Dialogs.C
 @prefix@/bin/ssh2rpd
 @prefix@/bin/root.exe
+@prefix@/bin/roots.exe
 @prefix@/bin/rootn.exe
 @prefix@/bin/hadd
 @prefix@/bin/cint
@@ -8,6 +9,7 @@
 @prefix@/share/man/man1/ssh2rpd.1*
 @prefix@/share/man/man1/root.exe.1*
 @prefix@/share/man/man1/rootn.exe.1*
+@prefix@/share/man/man1/roots.exe.1*
 @prefix@/share/man/man1/hadd.1*
 @prefix@/share/man/man1/cint.1*
 @prefix@/share/man/man1/makecint.1*
diff --git a/build/package/common/root-system-common.control b/build/package/common/root-system-common.control
index fde600ca3d7..80ab7b3cf1d 100644
--- a/build/package/common/root-system-common.control
+++ b/build/package/common/root-system-common.control
@@ -3,6 +3,5 @@ Architecture: all
 Depends: ttf-freefont | root-ttf, ttf-opensymbol | root-ttf
 Description: Common files for ROOT
  This package contains some common infrastructure files for ROOT.
- .
- ROOT web-site: http://root.cern.ch
+
  
diff --git a/build/package/common/root-system-common.install.in b/build/package/common/root-system-common.install.in
index f530ede122c..d0ff396c6ab 100644
--- a/build/package/common/root-system-common.install.in
+++ b/build/package/common/root-system-common.install.in
@@ -1,13 +1,16 @@
+@sysconfdir@/root/gdb-backtrace.sh 
+@sysconfdir@/root/gdb-backtrace-script
 @sysconfdir@/root/hostcert.conf
+@sysconfdir@/root/html
 @sysconfdir@/root/pdg_table.txt
+@sysconfdir@/root/plugins
+@sysconfdir@/root/RadioNuclides.txt
 @sysconfdir@/root/root.mimes
+# @sysconfdir@/root/svninfo.txt
 @sysconfdir@/root/system.rootauthrc
 @sysconfdir@/root/system.rootrc
 @sysconfdir@/root/system.rootdaemonrc
-@sysconfdir@/root/RadioNuclides.txt
-@sysconfdir@/root/gdb-backtrace.sh 
-@sysconfdir@/root/html
-@sysconfdir@/root/plugins
+@sysconfdir@/root/valgrind-root.supp
 @prefix@/share/man/man1/system.rootdaemonrc.1*
 @prefix@/share/root/icons/
 @prefix@/share/root/fonts/symbol.ttf
diff --git a/build/package/common/root-system-doc.control b/build/package/common/root-system-doc.control
index 3d5bed70f9d..7f40019019e 100644
--- a/build/package/common/root-system-doc.control
+++ b/build/package/common/root-system-doc.control
@@ -4,7 +4,6 @@ Architecture: all
 Suggests: root-system-bin
 Description: Tutorial and test suit for the ROOT system
  This package contains the tutorial scripts and test suit for the ROOT
- system.
- .
- ROOT web-site: http://root.cern.ch
+ system, as well as the automatically generated HTML class documentation.
+
 
diff --git a/build/package/common/root-system-proofd.control b/build/package/common/root-system-proofd.control
index 80497bf7279..87f7c56a6b7 100644
--- a/build/package/common/root-system-proofd.control
+++ b/build/package/common/root-system-proofd.control
@@ -1,7 +1,7 @@
 Package: root-system-proofd
 Architecture: any
 Pre-Depends: openbsd-inetd | inet-superserver
-Depends: root-system-common, root-plugin-proof, lsb-base (>= 3.0-6), ${shlibs:Depends}
+Depends: root-system-common, lsb-base (>= 3.0-6), ${shlibs:Depends}
 Recommends: root-system-bin, libroot-dev, root-file-server | root-system-rootd
 Description: Parallel ROOt Facility - distributed, parallel computing
  This package contains the PROOF server.  proofd is the core daemon of
@@ -10,6 +10,5 @@ Description: Parallel ROOt Facility - distributed, parallel computing
  for the machine to participate in a parallel computing farm (cluster
  or via the Internet), either as a master or a slave, using a
  transparent interface.
- .
- ROOT web-site: http://root.cern.ch
+
 
diff --git a/build/package/common/root-system-rootd.control b/build/package/common/root-system-rootd.control
index 989facd0c22..297af4efaeb 100644
--- a/build/package/common/root-system-rootd.control
+++ b/build/package/common/root-system-rootd.control
@@ -9,6 +9,5 @@ Description: ROOT remote file server
  files, serving files over the Internet. Using this daemon, you can
  access files on the machine from anywhere on the Internet, using a
  transparent interface.
- .
- ROOT web-site: http://root.cern.ch
+
 
diff --git a/build/package/common/root-system-xrootd.control b/build/package/common/root-system-xrootd.control
index 43fa3c69ee2..80c0a550e29 100644
--- a/build/package/common/root-system-xrootd.control
+++ b/build/package/common/root-system-xrootd.control
@@ -1,11 +1,20 @@
+Package: root-plugin-net-xrootd
+Section: science
+Architecture: any
+Depends: ${shlibs:Depends}
+Replaces: root-system-xrootd
+Conflicts: root-system-xrootd (<< 5.19.03-1)
+Homepage: http://xrootd.slac.stanford.edu
+Description: Plugins for xrootd protocol 
+ This package contains the plug-ins for xrootd protocol.
+
 Package: root-system-xrootd
 Architecture: any
 Depends: root-system-common, lsb-base (>= 3.0-6), ${shlibs:Depends}
+Recommends: root-plugin-net-xrootd
 Provides: root-file-server
+Homepage: http://xrootd.slac.stanford.edu
 Description: Extented ROOT file server
  This package contains the xrootd server for ROOT, the eXtended
  Request Daemon (xrd) and associated software.
- .
- ROOT web-site: http://root.cern.ch
- XRootd web-site: http://xrootd.slac.stanford.edu
 
diff --git a/build/package/common/root-system-xrootd.install.in b/build/package/common/root-system-xrootd.install.in
index f44b83c3937..3d9855c41b8 100644
--- a/build/package/common/root-system-xrootd.install.in
+++ b/build/package/common/root-system-xrootd.install.in
@@ -1,5 +1,8 @@
-@prefix@/bin/xrd.bin
-@prefix@/bin/xrdcp.bin
-@prefix@/bin/xrdpwdadmin.bin
+# @prefix@/bin/xrd.bin
+# @prefix@/bin/xrdcp.bin
+# @prefix@/bin/xrdpwdadmin.bin
 # @prefix@/bin/xrdgsiproxy.bin
-
+@prefix@/bin/xrootd
+@prefix@/bin/olbd
+@prefix@/share/man/man1/xrootd.1*
+@prefix@/share/man/man1/olbd.1*
diff --git a/build/package/common/ttf-root-installer.control b/build/package/common/ttf-root-installer.control
index 83739cfdafc..5d55d342d45 100644
--- a/build/package/common/ttf-root-installer.control
+++ b/build/package/common/ttf-root-installer.control
@@ -1,7 +1,7 @@
 Package: ttf-root-installer
 Architecture: all
 Section: contrib/x11
-Depends: ${misc:Depends}, wget (>= 1.9.1-4), xutils (>= 4.0.2), debconf (>= 1.2.0)
+Depends: ${misc:Depends}, wget (>= 1.9.1-4), xfonts-utils | xutils (>= 4.0.2), debconf (>= 1.2.0)
 Provides: root-ttf
 Conflicts: ttf-root
 Description: True type fonts for ROOT - installer package
@@ -10,6 +10,5 @@ Description: True type fonts for ROOT - installer package
  redistribute this font files.   This package will download the fonts
  from the ROOT FTP server,  or alternatively use an already downloaded
  tar-file.  
- .
- ROOT web-site: http://root.cern.ch
+
 
diff --git a/build/package/debian/README.Debian b/build/package/debian/README.Debian
index 5461f283cea..bc814ec4416 100644
--- a/build/package/debian/README.Debian
+++ b/build/package/debian/README.Debian
@@ -71,7 +71,7 @@ built depends on your system.
 * root-plugin-pythia5   Wrapper for Pythia event generator (version 5) (***)
 * root-plugin-pythia6   Wrapper for Pythia event generator (version 6) (***)
 * root-plugin-qt        ROOT GUIs using QT
-* root-plugin-qaudp     Quadratic Programming plugin 
+* root-plugin-quadp     Quadratic Programming plugin 
 * root-plugin-maxdb     MaxDB/SapDB client for ROOT
 * root-plugin-venus     Wrapper for Venus event generator  (***)
 * root-plugin-xml       XML plugin for ROOT
diff --git a/build/package/debian/changelog b/build/package/debian/changelog
index 6d8e22e7828..5e286419bb1 100644
--- a/build/package/debian/changelog
+++ b/build/package/debian/changelog
@@ -1,3 +1,55 @@
+root-system (5.21.07-1) unstable; urgency=low
+
+  * New upstream version
+
+ -- Christian Holm Christensen <cholm@nbi.dk>  Fri, 28 Nov 2008 19:28:17 +0100
+
+root-system (5.21.05-1) unstable; urgency=low
+
+  * New upstream version
+
+ -- Christian Holm Christensen <cholm@nbi.dk>  Tue, 07 Oct 2008 09:26:04 +0200
+
+root-system (5.19.05-1) unstable; urgency=low
+
+  * New upstream version
+
+ -- Christian Holm Christensen <cholm@nbi.dk>  Wed, 14 May 2008 23:16:12 +0200
+
+root-system (5.19.03-2) unstable; urgency=low
+
+  * Moved root-plugin-graf3d-gl to libroot-graf3d-gl and 
+    libroot-graf3d-dev, since the code needs to be callable for custom 
+    EVE implementations of quads, etc. 
+  * Fixed problem with startup URL - points to 
+    http://localhost/doc/root/html - implies recommendation of a 
+    web-server.  Aparently, the TGHtml gui element does not really know 
+    how to resolve relative links from a "file:///" URL.
+  * Added "--etcdir" option to root-config script - should be useful
+    for VMC and the like implementations.
+
+ -- Christian Holm Christensen <cholm@nbi.dk>  Thu, 08 May 2008 08:09:44 +0200
+
+root-system (5.19.03-1) unstable; urgency=low
+
+  * New upstream version (Closes: #478956)
+  * Added prober build dependencies on fortran compiler on all 
+    platforms (Closes: #429186)
+  * With the kind help of Thiemo Seufer <ths@networkno.de>, 
+    Dirk Van Hertem <dirk.vanhertem@ieee.org>, and Boris <boris@mogwitz.eu>
+    we managed to get ROOT to compile on mips/mipsel.   This is a new ROOT 
+    platform too. (Closes: #434855, #425257)
+  * Fixed GSL version recognision. (Closes: #450507, #450508)
+  * ROOT now builds against Qt 4. (Closes: #476324)
+  * Fixed download URL of TTF files (Closes: #451510)
+  * Split package root-system-xrootd into 2 packages: root-system-xrootd and 
+    root-plugin-net-xrootd.  
+  * Follow new source directory structure in package structure.  Several new
+    packages that split older libroot<version> package.  
+  * libroot-proof replaces root-plugin-proof
+
+ -- Christian Holm Christensen <cholm@nbi.dk>  Fri, 02 May 2008 08:21:48 +0200
+
 root-system (5.17.07-1) unstable; urgency=low
 
   * New upstream version
diff --git a/build/package/debian/control.in b/build/package/debian/control.in
index 7f50612dfd6..cf533d18a58 100644
--- a/build/package/debian/control.in
+++ b/build/package/debian/control.in
@@ -2,16 +2,16 @@ Source: root-system
 Section: science
 Priority: optional
 Maintainer: Christian Holm Christensen <cholm@nbi.dk>
-Build-Depends: debhelper (>= 5.0.37.2), po-debconf, libssl-dev, comerr-dev, libxpm-dev, libfreetype6-dev, libpcre3-dev, zlib1g-dev | libz-dev, python-dev (>= 2.1)@builddepends@
-Standards-Version: 3.7.3
+Build-Depends: debhelper (>= 5.0.37.2), po-debconf, libssl-dev, comerr-dev, libxpm-dev, libfreetype6-dev, libpcre3-dev, zlib1g-dev | libz-dev, python-dev (>= 2.1), graphviz, libxft-dev@builddepends@
+Standards-Version: 3.8.0
 
 Package: root-system
 Architecture: all
-Depends: root-system-bin, libroot-dev
+Depends: root-system-bin, libroot-core-dev
 Recommends: @plugins@
 Suggests: @extras@
-Description: Meta package to install all ROOT packages
- This package is a meta package to ensure the installation of all
+Description: Meta-package to install all ROOT packages
+ This package is a metapackage to ensure the installation of all
  possible ROOT packages on this system. 
  .
  The ROOT system provides a set of OO frameworks with all the
diff --git a/build/package/debian/libroot-bindings-python-dev.links.in b/build/package/debian/libroot-bindings-python-dev.links.in
new file mode 100644
index 00000000000..f61564f4ebc
--- /dev/null
+++ b/build/package/debian/libroot-bindings-python-dev.links.in
@@ -0,0 +1,2 @@
+@prefix@/lib/root/@libvers@/libPyROOT.so    @pythondir@/libPyROOT.so
+@prefix@/lib/root/@libvers@/ROOT.py         /usr/share/python-support/root/ROOT.py
diff --git a/build/package/debian/libroot-bindings-ruby-dev.links.in b/build/package/debian/libroot-bindings-ruby-dev.links.in
new file mode 100644
index 00000000000..77430f36bb1
--- /dev/null
+++ b/build/package/debian/libroot-bindings-ruby-dev.links.in
@@ -0,0 +1 @@
+usr/lib/root/libRuby.so @rubyarchdir@/libRuby.so
diff --git a/build/package/debian/root-plugin-geom-gdml.links.in b/build/package/debian/root-plugin-geom-gdml.links.in
new file mode 100644
index 00000000000..cfdc3ade256
--- /dev/null
+++ b/build/package/debian/root-plugin-geom-gdml.links.in
@@ -0,0 +1,2 @@
+@prefix@/lib/root/@libvers@/ROOTwriter.py   /usr/share/python-support/root/ROOTwriter.py   
+@prefix@/lib/root/@libvers@/writer.py       /usr/share/python-support/root/writer.py       
diff --git a/build/package/debian/root-plugin-net-xrootd.overrides b/build/package/debian/root-plugin-net-xrootd.overrides
new file mode 100644
index 00000000000..0b9af91e29c
--- /dev/null
+++ b/build/package/debian/root-plugin-net-xrootd.overrides
@@ -0,0 +1,3 @@
+root-plugin-net-xrootd: binary-without-manpage usr/bin/xrdpwdadmin.bin
+root-plugin-net-xrootd: binary-without-manpage usr/bin/xrd.bin
+root-plugin-net-xrootd: binary-without-manpage usr/bin/xrdcp.bin
diff --git a/build/package/debian/root-system-bin.desktop.in b/build/package/debian/root-system-bin.desktop.in
index 4b29a6bb864..2880a2a6de2 100644
--- a/build/package/debian/root-system-bin.desktop.in
+++ b/build/package/debian/root-system-bin.desktop.in
@@ -1,5 +1,4 @@
 [Desktop Entry]
-Encoding=UTF-8
 Name=ROOT
 GenericName=ROOT
 Comment=ROOT's Object Oriented Technologies
diff --git a/build/package/debian/root-system-common.dirs.in b/build/package/debian/root-system-common.dirs.in
index 6b349760d5c..575bd2c4b3c 100644
--- a/build/package/debian/root-system-common.dirs.in
+++ b/build/package/debian/root-system-common.dirs.in
@@ -1,4 +1,2 @@
-@prefix@/lib/root
-@sysconfdir@/root
 @sysconfdir@/root
 @sysconfdir@/ld.so.conf.d
diff --git a/build/package/debian/root-system-doc.doc-base b/build/package/debian/root-system-doc.doc-base
new file mode 100644
index 00000000000..be6417d1ce1
--- /dev/null
+++ b/build/package/debian/root-system-doc.doc-base
@@ -0,0 +1,19 @@
+Document: root-system
+Title: ROOT Reference Manual
+Author: ROOT Team <rootdev@root.cern.ch>
+Abstract: Reference manual of all ROOT classes. 
+ The ROOT system provides a set of OO frameworks with all the
+ functionality needed to handle and analyse large amounts of data in a
+ very efficient way. Having the data defined as a set of objects,
+ specialised storage methods are used to get direct access to the
+ separate attributes of the selected objects, without having to touch
+ the bulk of the data. Included are histograming methods in 1, 2 and 3
+ dimensions, curve fitting, function evaluation, minimisation,
+ graphics and visualisation classes to allow the easy setup of an
+ analysis system that can query and process the data interactively or
+ in batch mode.
+Section: Science/Physics
+
+Format: HTML
+Index: /usr/share/doc/root/html/index.html
+Files: /usr/share/doc/root/html/*.html
diff --git a/build/package/debian/root-system-rootd.preinst b/build/package/debian/root-system-rootd.preinst
index b71df2148dd..2a39cb7b9c8 100644
--- a/build/package/debian/root-system-rootd.preinst
+++ b/build/package/debian/root-system-rootd.preinst
@@ -51,10 +51,10 @@ case "$1" in
 	fi
 
 	# modifying the user
-	usermod -c "Anonymous rootd"    rootd
-	usermod -d "/var/spool/rootd"   rootd
-	usermod -g "rootd"              rootd
-	usermod -s "/bin/false"         rootd
+	usermod -c "Anonymous rootd"    rootd > /dev/null
+	usermod -d "/var/spool/rootd"   rootd > /dev/null
+	usermod -g "rootd"              rootd > /dev/null
+	usermod -s "/bin/false"         rootd > /dev/null
 
 	# Since the home directory was created before putting the user
 	# into the rootd group and moreover we cannot guarantee that
diff --git a/build/package/debian/root-system-xrootd.default b/build/package/debian/root-system-xrootd.default
index 0b357f9f3d1..474b4080634 100644
--- a/build/package/debian/root-system-xrootd.default
+++ b/build/package/debian/root-system-xrootd.default
@@ -55,6 +55,23 @@ OLBD_REDIRECTOR=no
 # Additional options for olbd 
 ODAEMON_OPTS=
 
+# If this is set to `yes', then the server is started.  
+# Anything else disables the server
+ENABLE_CMSD=no
+
+# Configuration file for cmsd - please refer to the cmsd(1) manual. 
+CMSD_CONFIG_FILE=
+
+# Log file for cmsd 
+CMSD_LOG_FILE=
+
+# Port to listen to (per default 1094) - note, that you can not run 
+# both rootd and cmsd on the same port.  You should give a different 
+# port to one of them. 
+CMSD_PORT=
+
+# Additional options for cmsd 
+CDAEMON_OPTS=
 
 #
 # EOF
diff --git a/build/package/debian/root-system-xrootd.init.in b/build/package/debian/root-system-xrootd.init.in
index f78e5896d10..c86f5ee9b27 100644
--- a/build/package/debian/root-system-xrootd.init.in
+++ b/build/package/debian/root-system-xrootd.init.in
@@ -22,11 +22,14 @@
 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 XDAEMON=@prefix@/bin/xrootd
 ODAEMON=@prefix@/bin/olbd
+CDAEMON=@prefix@/bin/cmsd
 XNAME=xrootd
 ONAME=olbd
+CNAME=cmsd
 DESC="Extended ROOT file server"
 XDESC="Extended ROOT file server" 
 ODESC="Open Load Balancer server"
+CDESC="Cluster Management System server"
 USER=root
 test -x $DAEMON || exit 0
 
@@ -44,6 +47,7 @@ fi
 # Check enables 
 enable_xrootd=`echo $ENABLE_XROOTD | tr '[:upper:]' '[:lower:]'`
 enable_olbd=`echo $ENABLE_OLBD| tr '[:upper:]' '[:lower:]'`
+enable_cmsd=`echo $ENABLE_CMSD| tr '[:upper:]' '[:lower:]'`
 
 # xrood options 
 # Configuration file
@@ -85,6 +89,20 @@ if test "x$OLBD_REDIRECTOR" != "xyes" ; then
     ODAEMON_OPTS="$ODAEMON_OPTS -r" 
 fi
 
+# cmsd options 
+# Confguration file 
+if test "x$CMSD_CONFIG_FILE" != "x" ; then 
+    CDAEMON_OPTS="$CDAEMON_OPTS -c $CMSD_CONFIG_FILE" 
+fi
+# Log file 
+if test "x$CMSD_LOG_FILE" != "x" ; then 
+    CDAEMON_OPTS="$CDAEMON_OPTS -l $CMSD_LOG_FILE" 
+fi
+# Port to listen to
+if test "x$CMSD_PORT" != "x" ; then 
+    CDAEMON_OPTS="$CDAEMON_OPTS -p $CMSD_PORT" 
+fi
+
 # User 
 if test "x$XROOTD_USER" = "xroot" ; then 
     :
@@ -93,9 +111,10 @@ elif test "x$XROOTD_USER" != "x" ; then
 fi
 
 # Check if we're enabled
-case $enable_rootd:$enable_olbd in 
-    yes:*) ;;
-    *:yes) ;;
+case $enable_rootd:$enable_olbd:$enable_cmsd in 
+    yes:*:*) ;;
+    *:yes:*) ;;
+    *:*:yes) ;;
     *) exit 0;;
 esac
 
@@ -114,6 +133,13 @@ startito ()
 	--pidfile /var/run/$ONAME.pid --exec $ODAEMON \
 	--background -- $ODAEMON_OPTS
 }
+startitc ()
+{
+    [ "$VERBOSE" != no ] && log_progress_msg "$CNAME" 
+    start-stop-daemon --make-pidfile --chuid $USER --start --quiet \
+	--pidfile /var/run/$CNAME.pid --exec $CDAEMON \
+	--background -- $CDAEMON_OPTS
+}
 
 stopitx() 
 {
@@ -125,6 +151,11 @@ stopito()
     start-stop-daemon --user $USER --stop --oknodo --quiet --pidfile \
 	/var/run/$ONAME.pid --exec $ODAEMON 
 }
+stopitc()
+{
+    start-stop-daemon --user $USER --stop --oknodo --quiet --pidfile \
+	/var/run/$CNAME.pid --exec $CDAEMON 
+}
 
 # executable code 
 case "$1" in
diff --git a/build/package/debian/root-system.overrides b/build/package/debian/root-system.overrides
new file mode 100644
index 00000000000..6fdd27bc076
--- /dev/null
+++ b/build/package/debian/root-system.overrides
@@ -0,0 +1,3 @@
+W: root-system source: debian-rules-ignores-make-clean-error line 388
+W: root-system source: configure-generated-file-in-source graf2d/asimage/src/libAfterImage/config.log
+W: root-system source: configure-generated-file-in-source graf2d/asimage/src/libAfterImage/config.status
diff --git a/build/package/debian/rules b/build/package/debian/rules
index 193e3a8c86c..b934a2bd93b 100644
--- a/build/package/debian/rules
+++ b/build/package/debian/rules
@@ -31,39 +31,20 @@ endif
 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
 INSTALL_PROGRAM = -s
 endif
-SAPDB		= --disable-sapdb
-ifneq (,$(findstring linux-gnu,$(DEB_BUILD_GNU_SYSTEM)))
-ifneq (,$(findstring i386,$(DEB_BUILD_ARCH)))
-SAPDB		= --enable-sapdb
-endif
-ifneq (,$(findstring ia64,$(DEB_BUILD_ARCH)))
-SAPDB		= --enable-sapdb
-endif
-ifneq (,$(findstring amd64,$(DEB_BUILD_ARCH)))
-SAPDB		= --enable-sapdb
-endif
-endif
-HBOOK		= --enable-cern
-ifneq (,$(findstring kfreebsd-i386,$(DEB_BUILD_GNU_SYSTEM)))
-HBOOK		= --disable-cern
-endif
-ifneq (,$(findstring kfreebsd-amd64,$(DEB_BUILD_GNU_SYSTEM)))
-HBOOK		= --disable-cern
-endif
 UNUR		= --enable-unuran
-ifneq (,$(findstring alpha, $(DEB_BUILD_ARCH)))
-UNUR		= --disable-unuran
-endif
+#ifneq (,$(findstring alpha, $(DEB_BUILD_ARCH)))
+#UNUR		= --disable-unuran
+#endif
 XRD		= --enable-xrootd
-ifneq (,$(findstring sparc, $(DEB_BUILD_ARCH)))
-XRD		= --disable-xrootd
-endif
+#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)/cint
+CINTDIR		= $(PREFIX)/lib/root/$(SOVERS)
 ICONTHEME	= $(PREFIX)/share/icons/hicolor/48x48
 CONFOPTIONS	:=--enable-cintex				\
 		  --enable-clarens				\
@@ -105,11 +86,11 @@ CONFOPTIONS	:=--enable-cintex				\
 		  --disable-oracle				\
 		  --disable-pythia6				\
 		  --disable-rfio				\
+		  --disable-sapdb				\
+		  --disable-cint7				\
 		  --fail-on-missing				\
 		  $(UNUR)					\
 		  $(XRD)					\
-		  $(SAPDB)					\
-		  $(HBOOK)					\
 		  $(BUILDOPT)					
 #
 # Things for the future 
@@ -126,54 +107,93 @@ 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-dev			\
-		   libroot			\
-		   root-system-bin		\
-		   root-system-common		\
+ESSENTIALS	:= libroot-core-dev			\
+		   libroot-core				\
+		   root-system-bin			\
+		   root-system-common			\
 		   ttf-root-installer		
-PLUGINS		:= libroot-ldap			\
-		   libroot-mathmore		\
-		   libroot-minuit		\
-		   libroot-mlp			\
-		   libroot-quadp		\
-		   libroot-tmva			\
-		   libroot-unuran		\
-		   root-system-doc		\
-		   root-plugin-asimage		\
-		   root-plugin-fftw3		\
-		   root-plugin-fumili		\
-		   root-plugin-gl		\
-		   root-plugin-hbook		\
-		   root-plugin-krb5		\
-		   root-plugin-minuit2		\
-		   root-plugin-netx		\
-		   root-plugin-odbc		\
-		   root-plugin-proof		\
-		   root-plugin-qt		\
-		   root-plugin-sql		\
-		   root-plugin-xml		\
-		   root-plugin-xproof		\
-		   root-system-proofd		\
-		   root-system-rootd		\
+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-table			\
+		   libroot-montecarlo-eg		\
+		   libroot-montecarlo-vmc		\
+		   libroot-net				\
+		   libroot-net-auth			\
+		   libroot-net-ldap			\
+		   libroot-proof			\
+		   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-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-proof-proofplayer	\
+		   root-plugin-sql-odbc			\
+		   root-plugin-tree-treeviewer		\
+		   root-system-proofd			\
+		   root-system-doc			\
+		   root-system-rootd			\
 		   root-system-xrootd		
-EXTRAS		:= libroot-clarens		\
-		   libroot-python		\
-		   libroot-roofit		\
-		   libroot-ruby			\
-		   root-plugin-alien		\
-		   root-plugin-castor		\
-		   root-plugin-chirp		\
-		   root-plugin-dcache		\
-		   root-plugin-globus		\
-		   root-plugin-peac		\
-		   root-plugin-maxdb		\
-		   root-plugin-mysql		\
-		   root-plugin-oracle		\
-		   root-plugin-pgsql		\
-		   root-plugin-pythia5		\
-		   root-plugin-pythia6		\
-		   root-plugin-srp		\
-		   root-plugin-venus		
+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-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)
@@ -183,21 +203,21 @@ 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))
+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-ruby, $(PKGLIST))
-ifeq ($(HAVERUBY), libroot-ruby)
+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-python, $(PKGLIST))
-ifeq ($(HAVEPYTHON), libroot-python)
+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)
@@ -223,7 +243,7 @@ show_libpkgs:
 show_conf:
 	./configure $(PLATFORM) --pkglist $(CONFOPTIONS)
 
-debian/%:debian/%.in  
+debian/%:debian/%.in debian/rules
 	@echo "Making $@ from $< "
 	@sed -e 's,@prefix@,$(PREFIX),g' \
 		-e 's,@sysconfdir@,$(SYSCONFDIR),g' \
@@ -232,14 +252,14 @@ debian/%:debian/%.in
 		-e 's,@pythondir@,$(PYTHONDIR),g' \
 		-e 's,@libvers@,$(SOVERS),g' < $< > $@ 
 
-debian/control:debian/control.in 
+debian/control:debian/control.in  debian/rules
 	@echo "Making $@ (special)"
 	@cp $< $@.tmp
 	@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))";\
+	@builddep="$(shell ./build/package/lib/makebuilddepend.sh $(PKGLIST))" && \
 	    sed -e 's,@prefix@,$(PREFIX),g' \
 		-e 's,@libvers@,$(SOVERS),g' \
 		-e 's,@sysconfdir@,$(SYSCONFDIR),g' \
@@ -247,10 +267,26 @@ debian/control:debian/control.in
 		-e "s/@builddepends@/$${builddep}/" \
 		-e 's/@pyvers@/$(PYVER)/g' \
 		-e 's/@pkglist@/$(DPKGLIST)/'	\
-		-e 's/@plugins@/$(PLUGINLIST)/'	\
-		-e 's/@extras@/$(EXTRALIST)/' < $@.tmp > $@
+		-e 's/@plugins@/$(PLUGINLIST:%,=% (>= $${binary:Version}),)  (>= $${binary:Version})/'	\
+		-e 's/@extras@/$(EXTRALIST:%,=% (>= $${binary:Version}),) (>= $${binary:Version})/' < $@.tmp > $@
 	rm -rf $@.tmp 
 
+debian/html.C:
+	rm -f $@
+	@echo "{" 						>> $@
+	@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.MakeAll();"				>> $@
+	@echo "}"						>> $@
+
+htmldoc:debian/html.C
+	-LD_LIBRARY_PATH=$(CURDIR)/lib:$(CURDIR)/cint/cint/include:$(CURDIR)/cint/cint/stl:$(LD_LIBRARY_PATH) \
+		$(CURDIR)/bin/roota -l -b -q $^
+	rm -f debian/html.C
+
 configure-stamp:$(TEMPLATES:%.in=%) config.status
 config.status: configure 
 	dh_testdir
@@ -264,20 +300,20 @@ config.status: configure
 		    --with-sys-iconpath=$(PREFIX)/share/pixmaps		\
 		    --libdir=$(PREFIX)/lib/root/$(SOVERS)		\
 		    $(CONFOPTIONS)
-	touch xrootd/src/headers.d 
-	touch asimage/src/headers.d 
-	touch unuran/src/headers.d 
+	touch math/unuran/src/headers.d 
 	touch configure-stamp
 
 #	  --fontdir=%_datadir/root/fonts/truetype
 #Architecture 
 build: build-arch build-indep
 
-build-arch: build-arch-cint-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) ASTEPETAG= XROOTDETAG= UNURANETAG=
+	$(MAKE) UNURANETAG=
+	$(MAKE) static UNURANETAG=
 	touch build-arch-stamp
 
 build-arch-cint-stamp:build-arch-stamp
@@ -285,7 +321,7 @@ build-arch-cint-stamp:build-arch-stamp
 	touch build-arch-cint-stamp
 
 build-indep: build-indep-stamp
-build-indep-stamp:  configure-stamp
+build-indep-stamp:  configure-stamp htmldoc
 
 	# Add here commands to compile the indep part of the package.
 	#$(MAKE) doc
@@ -313,17 +349,17 @@ clean:	$(TEMPLATES:%.in=%)
 	-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	asimage/src/libAfterImage/Makefile
-	-rm -f	asimage/src/libAfterImage/afterbase.h
-	-rm -f	asimage/src/libAfterImage/afterimage-config
-	-rm -f	asimage/src/libAfterImage/afterimage-libs
-	-rm -f	asimage/src/libAfterImage/config.h
-	-rm -f	asimage/src/libAfterImage/config.log
-	-rm -f	asimage/src/libAfterImage/config.status
-	-rm -f	asimage/src/libAfterImage/libAfterImage.a
-	-rm -f	xrootd/src/xrootd/GNUmakefile
-	-rm -f	xrootd/src/xrootd/src/GNUmake.env
-	-rm -f	xrootd/src/xrootd/src/GNUmake.options
+	-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" 			\
@@ -336,42 +372,58 @@ clean:	$(TEMPLATES:%.in=%)
 		-and -not -name "G__security.h"  	\
 		| xargs rm -rf
 	# Add here commands to clean up after the build process.
-	touch unuran/src/.bogus.tar.gz
-	-$(MAKE) distclean ASTEPVERS=.bogus  ASTEPETAG= \
-			   XROOTDDIRD=	     XROOTDETAG= \
-			   UNRVERS=.bogus    UNURANETAG=
-	rm -f unuran/src/.bogus.tar.gz
-	build/unix/makecintdll.sh clean
-	rm -rf bin lib include				\
-		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			\
-		freetype/src/freetype-2.1.3		\
-		cint/lib/posix/a.out			\
-		cint/include/*.so*			\
-		cint/include/*.dll			\
-		cint/include/sys/*.so*			\
-		cint/include/sys/*.dll			\
-		cint/stl/*.so*				\
-		cint/stl/*.dll				\
-		pcre/src/pcre-6.4			\
-		unuran/src/unuran-*-root/config.status	\
-		unuran/src/unuran-*-root/config.log	\
-		xrootd/src/xrootd/lib			\
-		xrootd/src/xrootd/obj			\
-		xrootd/src/xrootd/bin
+	[ ! -f config/Makefile.config ] || $(MAKE) distclean \
+		UNURANETAG= \
+		UNURKEEP=yes
+	-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 xrootd/src/headers.d 
-	touch asimage/src/headers.d 
-	touch unuran/src/headers.d 
+	# touch net/xrootd/src/headers.d 
+	# touch graf2d/asimage/src/headers.d 
 	-rm -f  $(filter-out debian/control, $(TEMPLATES:%.in=%))
 	dh_clean 
 
@@ -400,6 +452,7 @@ install-indep:
 
 	# dh_install $(IPKGOPTS) --sourcedir=$(DTMP)
 	dh_install -i --sourcedir=$(DTMP)
+	-cp -a htmldoc/ $(CURDIR)/debian/root-system-doc/usr/share/doc/root/html
 
 	# Fix some permissions 
 	-find debian/root-system-common/$(PREFIX)/share/root/icons \
@@ -423,8 +476,9 @@ install-arch:
 
 	# 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) \
+	#	ASTEPETAG= XROOTDETAG= UNURANETAG=
+	$(MAKE) install DESTDIR=$(CURDIR)/$(DTMP) UNURANETAG=
 
 	# Install desktop entry and icon 
 	mkdir -p $(DTMP)/$(PREFIX)/share/applications
@@ -445,9 +499,14 @@ install-arch:
 		< $(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)
+	# 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,\(.*\.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
 
@@ -478,14 +537,17 @@ install-arch:
 	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)/lib/posix/a.out
-	rm -rf $(DTMP)$(CINTDIR)/lib/posix/mktypes
-	rm -rf $(DTMP)$(CINTDIR)/lib/dll_stl/setup
-	rm -rf $(DTMP)$(CINTDIR)/lib/G__*
-	rm -rf $(DTMP)$(CINTDIR)/lib/dll_stl/G__*
-	rm -rf $(DTMP)$(CINTDIR)/lib/dll_stl/rootcint_*
-	rm -rf $(DTMP)$(CINTDIR)/lib/posix/exten.o
-	rm -rf $(DTMP)$(CINTDIR)/include/makehpib
+	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
@@ -505,8 +567,10 @@ install-arch:
 	find $(DTMP) -name ".cvsignore" | xargs rm -fr
 
 	# Fix some permissions 
-	-find $(DTMP)$(CINTDIR) -perm 755 -and -not -type d | xargs chmod a-x 
-	-chmod a+x $(DTMP)$(CINTDIR)/lib/pthread/setup
+	-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
@@ -564,6 +628,13 @@ install-arch:
 #		    -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` ; \
@@ -605,7 +676,10 @@ binary-common:
 	dh_installman
 	dh_link
 	dh_strip
-	dh_compress -Xusr/share/doc/root/test -Xusr/share/doc/root/tutorials
+	dh_compress 				\
+		-Xusr/share/doc/root/test 	\
+		-Xusr/share/doc/root/tutorials	\
+		-Xusr/share/doc/root/html
 	dh_fixperms
 #	dh_perl
 
@@ -620,24 +694,27 @@ binary-indep: build-indep install-indep
 # 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-python)
+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-python-dev 
+	dh_pysupport -plibroot-bindings-python-dev 
 	#	$(PREFIX)/lib/root/$(SOVERS) $(PREFIX)/lib/root
-	dh_pysupport -plibroot-dev \
+	dh_pysupport -plibroot-core-dev \
 		$(PREFIX)/lib/root/$(SOVERS)/python/genreflex
-ifeq ($(HAVEPYTHON), libroot-python)
+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-python-dev.substvars
+	echo "python:Provides=python$(PYVER)-pyroot" >> debian/libroot-bindings-python-dev.substvars
 endif
-	dh_makeshlibs -V $(patsubst %, -p%, $(filter libroot%$(SOVERS),$(SPKGLIST))) -proot-plugin-proof
+	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:%=debian/%/$(PREFIX)/lib/root/$(SOVERS)) | tr ' ' ':')
+	  -l$(shell echo $(SPKGLIST:%=$(CURDIR)/debian/%$(PREFIX)/lib/root/$(SOVERS)) | tr ' ' ':')
 	dh_gencontrol -s
 	dh_md5sums -s 
 	dh_builddeb -s 
diff --git a/build/package/debian/ttf-root-installer.overrides b/build/package/debian/ttf-root-installer.overrides
new file mode 100644
index 00000000000..1ca9dc4572a
--- /dev/null
+++ b/build/package/debian/ttf-root-installer.overrides
@@ -0,0 +1 @@
+W: ttf-root-installer: package-contains-empty-directory usr/share/root/fonts/
diff --git a/build/package/lib/makebuilddepend.sh b/build/package/lib/makebuilddepend.sh
index 03e244d62d2..28cbba23a76 100755
--- a/build/package/lib/makebuilddepend.sh
+++ b/build/package/lib/makebuilddepend.sh
@@ -1,184 +1,326 @@
 #!/bin/sh 
 #
 
+need_krb=0
+need_qt=0
 if test "x$1" = "xrpm" ; then 
     shift
     for i in $* ; do 
 	case $i in 
-	    *-dev) 						        ;;
-	    libroot)							;;
-	    root-system-bin)						;;
-	    root-cint)							;;
-	    root-system-doc)						;;
-	    *alien)	echo "BuildRequires: AliEn-Client" 		;;
+	    *-dev)							;;
+	    libroot-bindings-python)         
+		echo "BuildRequires: python-devel >= 2.1"		;;
+	    libroot-bindings-ruby)	   
+		echo "BuildRequires: ruby-devel >= 1.8"			
+		echo "BuildRequires: ruby >= 1.8"			;;
+	    libroot-core)						;;
+	    libroot-geom) 						;;
+	    libroot-graf2d-gpad)					;;
+	    libroot-graf2d-graf)					;;
+	    libroot-graf2d-postscript)					;;
+	    libroot-graf3d-eve)						;;
+	    libroot-graf3d-g3d)						;;
+	    libroot-graf3d-gl)
+		echo "BuildRequires: mesa-libGLU-devel"			;;
+	    libroot-gui)  						;;
+	    libroot-gui-ged)        					;;
+	    libroot-hist) 						;;
+	    libroot-hist-spectrum)					;;
+	    libroot-io)   						;;
+	    libroot-io-xmlparser)
+	   	echo "BuildRequires: libxml2-devel"			;;
+	    libroot-math-physics)					;;
+	    libroot-math-foam) 						;;
+	    libroot-math-genvector)					;;
+	    libroot-math-mathcore)                                      ;;
+	    libroot-math-mathmore)
+		echo "BuildRequires: gsl-devel"				;;
+	    libroot-math-matrix)  					;;
+	    libroot-math-minuit)					;;
+	    libroot-math-mlp)						;;
+	    libroot-math-quadp)						;;
+	    libroot-math-smatrix) 					;;
+	    libroot-math-splot) 					;;
+	    libroot-math-unuran)					;;
+	    libroot-misc-table) 					;;
+	    libroot-misc-minicern) 				        
+		echo "BuildRequires: gcc-gfortran"		 	;;
+	    libroot-montecarlo-eg) 					;;
+	    libroot-montecarlo-vmc) 					;;
+	    libroot-net-ldap)		
+		echo "BuildRequires: openldap-devel"			;;
+	    libroot-proof)						;;
+	    libroot-proof-clarens)  
+		echo "BuildRequires: xmlrpc-c-devel"			;;
+	    libroot-roofit)						;;
+	    libroot-static)						;;
+            libroot-tmva)						;;
+	    libroot-tree)  						;;
+	    libroot-tree-treeplayer)   					;;
+	    libroot-net)   						;;
+	    libroot-net-auth)   					;;
+	    root-plugin-geom-geompainter)				;;
+	    root-plugin-geom-geombuilder)				;;
+	    root-plugin-geom-gdml)					;;
+	    root-plugin-graf2d-x11)        				;;
 # Build dependency on AfterStep-devel temporarily commented out 
 # until such a time when ROOT can use the normal libAfterImage.
 # Input the build dependencies of the libafterimage-dev package
 #	    *asimage)	echo -n ", AfterStep-devel"			;;
-	    *asimage)							;;
-	    *castor)	echo "BuildRequires: castor-devel"		;;
-	    *chirp)							;;
-	    *clarens)	echo "BuildRequires: xmlrpc-c-devel"		;;
-	    *dcache)							;;
-	    *fumili)							;;
-	    *fftw3)							;;
-	    *gl)							;;
-	    *globus)	echo "BuildRequires: globus"			;;
-	    *hbook)	echo "BuildRequires: gcc-g77"			;;
-	    *krb5)	echo "BuildRequires: krb5-devel"		;;
-	    *ldap)	echo "BuildRequires: openldap-devel"		;;
-	    *minuit)							;;
-	    *minuit2)							;;
-	    *mathmore)	echo "BuildRequires: gsl-devel"			;;
-	    *mlp)							;;
-# This is kinda special 
-	    *mysql)	
+	    root-plugin-graf2d-asimage)  				
+		echo "BuildRequires:  freetype-devel"		
+		echo "BuildRequires:  zlib-devel"		
+		echo "BuildRequires:  libtiff-devel"		
+		echo "BuildRequires:  libpng-devel"		
+		echo "BuildRequires:  libungif-devel"		
+		echo "BuildRequires:  libjpeg-devel"		
+		echo "BuildRequires:  libICE-devel"		
+		echo "BuildRequires:  libSM-devel"		
+		echo "BuildRequires:  gawk"				;;
+	    root-plugin-graf2d-qt)	  	need_qt=1 		;;
+	    root-plugin-graf3d-x3d)        				;;
+	    root-plugin-gui-fitpanel)   				;;
+	    root-plugin-gui-guibuilder) 				;;
+	    root-plugin-gui-qt)	   		need_qt=1		;;
+	    root-plugin-gui-sessionviewer)				;;
+	    root-plugin-hist-hbook)	   				;;
+	    root-plugin-hist-histpainter)  				;;
+	    root-plugin-hist-spectrumpainter)				;;
+	    root-plugin-io-castor)   	
+		echo "BuildRequires: castor-devel"			;;
+	    root-plugin-io-chirp)					;;
+	    root-plugin-io-dcache)   					
+		echo "BuildRequires: d-cache-client"			;;
+	    root-plugin-io-sql)						;;
+	    root-plugin-io-xml)						;;
+	    root-plugin-math-fftw3)	   				
+		echo "BuildRequires: fftw3-devel"			;;
+	    root-plugin-math-fumili)   					;;
+	    root-plugin-math-mathmore)					;;
+	    root-plugin-math-minuit2)					;;
+	    root-plugin-math-mlp)					;;
+	    root-plugin-montecarlo-pythia6)
+		echo "BuildRequires: pythia6-devel"			;;
+	    root-plugin-montecarlo-pythia8)
+		echo "BuildRequires: pythia8-devel"			;;
+	    root-plugin-net-alien)		
+	   	echo "BuildRequires: AliEn-Client"			;;
+	    root-plugin-net-globus)   	
+		echo "BuildRequires: globus"				;;
+	    root-plugin-net-krb5)	
+		echo "BuildRequires: krb5-devel"			;;
+	    root-plugin-net-netx)					;;
+	    root-plugin-net-srp)	   				
+		echo "BuildRequires: srp-devel"				;;
+	    root-plugin-net-xrootd)					;;
+	    root-plugin-proof-peac)					;;
+	    root-plugin-proof-proofplayer)  				;;
+	    root-plugin-proof-xproof)	  				;;
+	    root-plugin-sql-oracle)   
+		"BuildRequires: oracle-instantclient-devel"		;;
+	    root-plugin-sql-mysql)	   
 		cat <<EOF
 %if %{?_vendor} 
-%if %{_vendor} == "MandrakeSoft"
+ %if %{_vendor} == "MandrakeSoft"
 BuildRequires: MySQL-devel >= 4.1.0
-%else
+ %else
 BuildRequires: mysql-devel >= 4.1.0
-%endif
+ %endif
 %else
 BuildRequires: mysql-devel >= 4.1.0
 %endif
 EOF
 		;;
-	    *netx)							;;
-	    *oracle)    echo "BuildRequires: oracle-instantclient-devel";;
-	    *odbc)      echo "BuildRequires: unixODBC-devel >= 2.2.11"  ;;
-	    *peac)							;;
-	    *pgsql)	echo "BuildRequires: postgresql-devel"		;;
-	    *proof)							;;
-	    *pythia5)	echo "BuildRequires: pythia5-devel"		;;
-	    *pythia6)	echo "BuildRequires: pythia6-devel"		;;
-	    *python)	echo "BuildRequires: python-devel >= 2.1"	;;
-# this is kinda special 
-	    *qt)	
-		cat <<EOF
-%if %{?_vendor} 
-%if %{_vendor} == "MandrakeSoft"
-BuildRequires: libqt3-devel
-%else
-%if %{_vendor} == "suse"
-BuildRequires: qt3-devel
-%endif
-%endif
-%else
-BuildRequires: qt-devel >= 3.3.0
-%endif
-EOF
-;;
-	    *quadp)							;;
-	    *roofit)							;;
-	    *ruby)	echo "BuildRequires: ruby-devel >= 1.8"		;;
-	    *maxdb)	echo "BuildRequires: libsqlod75-dev"		;;
-	    *sql)							;;
-	    *srp)							;;
-	    *tmva)							;;
-	    *venus)							;;
-	    *xml)	echo "BuildRequires: libxml2-devel"		;;
+	    root-plugin-sql-odbc)	   	
+		echo "BuildRequires: unixODBC-devel >= 2.2.11"		;;
+	    root-plugin-sql-pgsql)	        
+		echo "BuildRequires: postgresql-devel"			;;
+	    root-plugin-sql-maxdb)	   
+		echo "BuildRequires: libsqlod75-dev"			;;
+	    root-plugin-tree-treeviewer)				;;
+	    root-system-bin)						;;
+	    root-system-common)						;;
+	    root-system-doc)  						;;
 	    root-system-proofd)						;;
 	    root-system-rootd)						;;
-	    root-system-xrootd) echo "BuildRequires: krb5-devel"	;;
+	    root-system-xrootd)		need_krb=1			;;
 	    ttf-root*)							;;
-	    root-system-common)						;;
 	    *) 
 		echo "*** Warning *** Unknown package $i - please update $0" \
-		    > /dev/stderr 
-		;;
+		    > /dev/stderr ;;
 	esac
     done
+    if test $need_qt -gt 0 ; then 
+		    cat <<EOF
+%if %{?_vendor} 
+ %if %{_vendor} == "MandrakeSoft"
+BuildRequires: libqt4-devel
+ %else
+   %if %{_vendor} == "suse"
+BuildRequires: qt4-devel >= 4.3.0
+   %else 
+BuildRequires: qt4-devel >= 4.3.0
+   %endif
+ %endif
+%else
+BuildRequires: qt4-devel >= 4.3.0
+%endif
+EOF
+    fi
+    if test $need_krb -gt 0 ; then 
+	echo "BuildRequires: krb5-devel"
+    fi
     exit 0
 fi    
 
 ### echo %%% Making build dependencies
 bd=
 have_krb=0
+have_qt=0
 for i in $* ; do 
     case $i in 
 	*-dev)							        ;;
-	libroot)							;;
-	root-system-bin)						;;
-	root-cint) 							;;
-	root-system-doc)  						;;
-	*alien)	   echo -n ", libalien-dev" 				;;
+	libroot-bindings-python)         
+	    echo -n ", python-support (>= 0.3)"				;;
+	libroot-bindings-ruby)	   
+	    echo -n ", ruby (>= 1.8), ruby1.8-dev | ruby-dev (>= 1.8)"	;;
+	libroot-core)							;;
+	libroot-geom) 							;;
+	libroot-graf2d-gpad)						;;
+	libroot-graf2d-graf)						;;
+	libroot-graf2d-postscript)					;;
+	libroot-graf3d-eve)						;;
+	libroot-graf3d-g3d)						;;
+	libroot-graf3d-gl)					        
+	    echo -n ", libglu1-mesa-dev | libglu1-xorg-dev "
+	    echo -n "| xlibmesa-glu-dev |  libglu-dev, ftgl-dev"	;;
+	libroot-gui)  							;;
+	libroot-gui-ged)        					;;
+	libroot-hist) 							;;
+	libroot-hist-spectrum)						;;
+	libroot-io)   							;;
+	libroot-io-xmlparser)	   	echo -n ", libxml2-dev"		;;
+	libroot-math-physics)						;;
+	libroot-math-foam) 						;;
+	libroot-math-genvector)						;;
+	libroot-math-mathcore)						;;
+	libroot-math-mathmore)		echo -n ", libgsl0-dev"		;;
+	libroot-math-matrix)  						;;
+	libroot-math-minuit)						;;
+	libroot-math-mlp)						;;
+	libroot-math-quadp)						;;
+	libroot-math-smatrix) 						;;
+	libroot-math-splot) 						;;
+	libroot-math-unuran)						;;
+	libroot-misc-table) 						;;
+	libroot-misc-minicern) 						
+	    echo -n ", gfortran|fortran-compiler" 			;;
+	libroot-montecarlo-eg) 						;;
+	libroot-montecarlo-vmc) 					;;
+	libroot-net-ldap)		
+	    echo -n ", libldap2-dev | libldap-dev"			;;
+	libroot-proof)							;;
+	libroot-proof-clarens)  
+	    echo -n ", libxmlrpc-c3-dev | libxmlrpc-c-dev"
+	    echo -n ", libcurl4-gnutls-dev | libcurl4-openssl-dev | libcurl-dev"	
+	    								;;
+	libroot-roofit)							;;
+        libroot-tmva)							;;
+	libroot-tree)  							;;
+	libroot-tree-treeplayer)   					;;
+	libroot-net)   							;;
+	libroot-net-auth)   						;;
+	root-plugin-geom-geompainter)					;;
+	root-plugin-geom-geombuilder)					;;
+	root-plugin-geom-gdml)						;;
+	root-plugin-graf2d-x11)        					;;
 # Build dependency libafterimage-dev temporarily commented out 
 # until such a time that ROOT can use the normal libAfterImage.
-#	*asimage)  echo -n ", libafterimage-dev"			;;
+#	root-plugin-graf3d-asimage)  	echo -n ", libafterimage-dev"	;;
 # Input the build dependencies of the libafterimage-dev package
-	*asimage)  
+	root-plugin-graf2d-asimage)  
 	    echo -n ", libjpeg62-dev, libpng12-dev, libtiff4-dev"
-            echo -n ", libungif4-dev, libxinerama-dev";;
-	*castor)   echo -n ", libshift-dev"				;;
-	*chirp)	   echo -n ", libchirp-dev"				;;
-	*clarens)  echo -n ", libxmlrpc-c3-dev | libxmlrpc-c-dev, libcurl4-gnutls-dev | libcurl4-openssl-dev | libcurl-dev"	;;
-	*dcache)   echo -n ", libdcap-dev"				;;
-	*fftw3)	   echo -n ", fftw3-dev"				;;
-	*fumili)   							;;
-	*gl)	   
-	    echo -n ", libglu1-mesa-dev | libglu1-xorg-dev "
-	    echo -n "| xlibmesa-glu-dev |  libglu-dev, ftgl-dev"	;;
-	*globus)   echo -n ", globus"					;;
-	*hbook)	   
-	    echo -n ", libpacklib1-dev [!kfreebsd-i386 !kfreebsd-amd64]"
-	    echo -n ", gfortran|fortran-compiler" 			;;
-	*krb5)		 
-	    if test $have_krb -lt 1 ; then 
-		echo -n ", libkrb5-dev|heimdal-dev"
-		have_krb=1
-	    fi 
-	    echo -n ",krb5-user|heimdal-clients"		
-	    ;;
-	*ldap)	   echo -n ", libldap2-dev | libldap-dev"		;;
-	*oracle)   echo -n ", oracle-instantclient-devel"		;;
-	*mathmore) echo -n ", libgsl0-dev"				;;
-	*minuit)   							;;
-	*minuit2)  							;;
-	*mlp)	   							;;
-	*mysql)	   
+            echo -n ", libgif-dev | libungif4-dev, libxinerama-dev";;
+	root-plugin-graf2d-qt)	      need_qt=1		  	        ;;
+	root-plugin-graf3d-x3d)        					;;
+	root-plugin-gui-fitpanel)   					;;
+	root-plugin-gui-guibuilder) 					;;
+	root-plugin-gui-qt)	   	need_qt=1			;;
+	root-plugin-gui-sessionviewer)					;;
+	root-plugin-hist-hbook)	   					;;
+	root-plugin-hist-histpainter)  					;;
+	root-plugin-hist-spectrumpainter)				;;
+	root-plugin-io-castor)   	echo -n ", libshift-dev"	;;
+	root-plugin-io-chirp)	 	echo -n ", libchirp-dev"	;;
+	root-plugin-io-dcache)   	echo -n ", libdcap-dev"		;;
+	root-plugin-io-sql)						;;
+	root-plugin-io-xml)						;;
+	root-plugin-math-fftw3)	   	
+	    echo -n ", libfftw3-dev | fftw3-dev"			;;
+	root-plugin-math-fumili)   					;;
+	root-plugin-math-minuit2)					;;
+	root-plugin-math-mlp)						;;
+	root-plugin-montecarlo-pythia5) echo -n ", pythia5-dev"		;;
+	root-plugin-montecarlo-pythia6)	echo -n ", pythia6-dev"		;;
+	root-plugin-montecarlo-pythia8)	echo -n ", pythia8-dev"		;;
+	root-plugin-net-alien)	   	echo -n ", libgapiui-dev" 	;;
+	root-plugin-net-globus)   	
+	    echo -n ", libglobus-gss-assist-dev"
+            echo -n ", libglobus-gssapi-gsi-dev"
+            echo -n ", libglobus-gsi-credential-dev"
+            echo -n ", libglobus-common-dev"
+            echo -n ", libglobus-gsi-callback-dev"
+            echo -n ", libglobus-proxy-ssl-dev"
+            echo -n ", libglobus-gsi-sysconfig-dev"
+            echo -n ", libglobus-openssl-error-dev"
+            echo -n ", libglobus-gssapi-gsi-dev"
+            echo -n ", libglobus-gsi-callback-dev"
+            echo -n ", libglobus-oldgaa-dev"
+            echo -n ", libglobus-gsi-cert-utils-dev"
+            echo -n ", libglobus-openssl-dev"
+            echo -n ", libglobus-gsi-proxy-core-dev"
+	    echo -n ", libglobus-callout-dev"
+ 	    ;;
+	root-plugin-net-krb5)		 need_krb5=1			
+	    echo -n ",krb5-user|heimdal-clients"		        ;;
+	root-plugin-net-netx)						;;
+	root-plugin-net-srp)	   	echo -n ", libsrputil-dev"	;;
+	root-plugin-net-xrootd)						;;
+	root-plugin-proof-peac)						;;
+	root-plugin-proof-proofplayer)  				;;
+	root-plugin-proof-xproof) 	 				;;
+	root-plugin-sql-oracle)   
+	    echo -n ", oracle-instantclient-devel"			;;
+	root-plugin-sql-mysql)	   
 	    echo -n ", libmysqlclient15-dev | libmysqlclient14-dev"
-	    echo -n "| libmysqlclient12-dev| libmysqlclient-dev" 	;;
-	*netx)	   							;;
-	*odbc)	   echo -n ", libiodbc2-dev | unixodbc-dev"		;;
-	*peac)	   							;;
-	*pgsql)	   echo -n ",  libpq-dev | postgresql-dev"		;;
-	*proof)	   							;;
-	*pythia5)  echo -n ", pythia5-dev"				;;
-	*pythia6)  echo -n ", pythia6-dev"				;;
-	*python)   echo -n ", python-support (>= 0.3)"			;;
-	*qt)	   
-	    echo -n ", libqt4-dev (>= 4.3.0) | libqt3-mt-dev (>= 3.3.0)"
-	    echo -n ", qt4-dev-tools (>= 4.3.0) | qt3-dev-tools (>= 3.3.0)"
-	    ;;
-	    #echo -n ", libqt3-mt-dev, libqt3-headers" 
-            #echo -n ", qt3-dev-tools, libqt3-compat-headers"		;;
-	*quadp)	   							;;
-	*roofit)   							;;
-	*ruby)	   echo -n ", ruby (>= 1.8), ruby1.8-dev | ruby-dev (>= 1.8)";;
-	*maxdb)	   echo -n ", libsqlod75-dev [i386 ia64 amd64]"		;;
-	*sql)	   							;;
-	*srp)	   echo -n ", libsrputil-dev"				;;
-        *tmva)	   							;;
-	*unuran)                                                        ;;
-	*venus)	   echo -n ", libvenus-dev"				;;
-	*xml)	   echo -n ", libxml2-dev"				;;
+	    echo -n "| libmysqlclient12-dev| libmysqlclient-dev"	;;
+	root-plugin-sql-odbc)	   	
+	    echo -n ", libiodbc2-dev | unixodbc-dev"			;;
+	root-plugin-sql-pgsql)	        
+	    echo -n ",  libpq-dev | postgresql-dev"			;;
+	root-plugin-sql-maxdb)	   
+	    echo -n ", libsqlod75-dev [i386 ia64 amd64]"		;;
+	root-plugin-tree-treeviewer)					;;
+	root-system-bin)						;;
+	root-system-common)						;;
+	root-system-doc)  						;;
 	root-system-proofd)						;;
 	root-system-rootd)						;;
-	root-system-xrootd)	
-	    if test $have_krb -lt 1 ; then 
-		echo -n ", libkrb5-dev|heimdal-dev"		
-		have_krb=1
-	    fi
-	    ;;
+	root-system-xrootd)	need_krb5=1				;;
 	ttf-root*)							;;
-	root-system-common)						;;
 	*) 
 	    echo "*** Warning *** Unknown package $i - please update $0" \
 		> /dev/stderr ;;
     esac
 done
+if test $need_qt -gt 0 ; then 
+    echo -n ", libqt4-dev (>= 4.3.0) | libqt3-mt-dev (>= 3.3.0)"
+    echo -n ", qt4-dev-tools (>= 4.3.0) | qt3-dev-tools (>= 3.3.0)"
+    echo -n ", libqt4-opengl-dev"
+fi
+if test $need_krb5 -gt 0 ; then
+    echo -n ", libkrb5-dev|heimdal-dev"
+fi 
 
 #
 # EOF
diff --git a/build/package/lib/makedebdir.sh b/build/package/lib/makedebdir.sh
index 732132281b0..aaaba79c23f 100755
--- a/build/package/lib/makedebdir.sh
+++ b/build/package/lib/makedebdir.sh
@@ -11,6 +11,7 @@ setup=1
 upcl=1
 root_sovers=`cat build/version_number | sed 's,/.*,,'` 
 
+
 # ____________________________________________________________________
 usage ()
 {
@@ -26,28 +27,137 @@ EOF
     exit 0
 }
 
+# ____________________________________________________________________
+message()
+{
+    opt=
+    post=
+    while test $# -gt 0 ; do 
+	case $1 in 
+	    -n) post=" ..." ; opt="$opt $1" ;;
+	    -*) opt="$opt $1" ;; 
+	    *)  break;;
+	esac
+	shift
+    done
+    echo $opt "$@${post}"
+}
+
+# ____________________________________________________________________
+check_retval()
+{
+    retval=$?
+    if test $# -gt 0 ; then 
+	message -n $@ ":"
+    fi
+    if test $retval -ne 0 ; then 
+	echo " Failure: $@"
+	cd $savdir
+	exit $retval
+    else
+	echo " OK"
+    fi
+}
+
+# ____________________________________________________________________
+extract_tarballs()
+{
+    dir=$1 ; shift
+    ext=$1 ; shift
+    if test "x$ext" = "x" ; then ext=.tar.gz ; fi
+    case $ext in 
+	.tar.gz|.tgz) 	dopt=z ;; 
+	.tar.bz2|.tbz2) dopt=j ;;
+	.tar.Z)		dopt=Z ;;
+	*)              dopt=a ;;
+    esac
+    tars=`find $dir -name "*${ext}"  2>/dev/null` 
+    for i in ${tars} ; do 
+	case `basename $i ${ext}` in 
+	    .bogus) continue ;; 
+            *)
+		sub=`tar -t${dopt}f $i | head -n 1 | xargs basename` 
+		if test "x$sub" != "x" && \
+		    test "x$sub" != "x." ; then 
+		    message -n "Removing $dir/$sub" 
+		    rm -rf $dir/$sub 
+		    check_retval
+		fi
+		message -n "Extracting `basename $i`"
+		tar -x${dopt}f $i -C $dir
+		check_retval ""
+		
+		message -n "Removing $i"
+		rm -f ${i}
+		touch ${dir}/headers.d
+		check_retval 
+		;;
+	esac
+    done
+}
+
+
 # ____________________________________________________________________
 purge ()
 {
     test $purge -lt 1 && return 0 
 
     cat <<-EOF 
-	=============================================================
+	=============================================================
 	Warning: Purging sources of unwanted stuff
 	
 	I will expand tar-balls, and remove them.  I will also remove 
 	non-free True Type Fonts.  To restore these files, you should 
 	do a CVS update. 
-	=============================================================
+	=============================================================
 	EOF
     # Now, remove files we definitely don't want 
     # rm -f fonts/*.ttf 
-    echo -n "Removing unwanted files ... "
+    message -n "Removing unwanted files"
     rm -f \
-	build/package/common/root-cint.control			\
-	build/package/common/root-cint.copyright		\
-	build/package/common/root-cint.install.in		\
+        build/package/common/libroot-clarens.control		\
+        build/package/common/libroot.control			\
+        build/package/common/libroot-dev.install.in		\
+        build/package/common/libroot.install.in			\
+        build/package/common/libroot-mathmore.control		\
+        build/package/common/libroot-minuit.control		\
+        build/package/common/libroot-mlp.control		\
+        build/package/common/libroot-python.control		\
+        build/package/common/libroot-python-dev.install.in	\
+        build/package/common/libroot-python.install.in		\
+        build/package/common/libroot-quadp.control		\
+        build/package/common/libroot-ruby.control		\
+        build/package/common/libroot-unuran.control		\
 	build/package/common/libroot-dev.control		\
+	build/package/debian/libroot.postinst			\
+	build/package/debian/libroot.postrm			\
+        build/package/common/root-plugin-alien.control		\
+        build/package/common/root-plugin-castor.control		\
+        build/package/common/root-plugin-chirp.control		\
+        build/package/common/root-plugin-dcache.control		\
+        build/package/common/root-plugin-fftw3.control		\
+        build/package/common/root-plugin-fumili.control		\
+        build/package/common/root-plugin-gl.control		\
+        build/package/common/root-plugin-globus.control		\
+        build/package/common/root-plugin-hbook.control		\
+        build/package/common/root-plugin-hbook.install.in	\
+        build/package/common/root-plugin-krb5.control		\
+        build/package/common/root-plugin-maxdb.control		\
+        build/package/common/root-plugin-minuit2.control	\
+        build/package/common/root-plugin-mysql.control		\
+        build/package/common/root-plugin-netx.control		\
+        build/package/common/root-plugin-odbc.control		\
+        build/package/common/root-plugin-oracle.control		\
+        build/package/common/root-plugin-peac.control		\
+        build/package/common/root-plugin-pgsql.control		\
+        build/package/common/root-plugin-pythia5.control	\
+        build/package/common/root-plugin-pythia6.control	\
+        build/package/common/root-plugin-qt.control		\
+        build/package/common/root-plugin-sql.control		\
+        build/package/common/root-plugin-srp.control		\
+        build/package/common/root-plugin-venus.control		\
+        build/package/common/root-plugin-xml.control		\
+        build/package/common/root-plugin-xproof.control		\
 	build/package/common/root-plugin-clarens.control	\
 	build/package/common/root-plugin-ldap.control		\
 	build/package/common/root-plugin-minuit.control		\
@@ -58,27 +168,32 @@ purge ()
 	build/package/common/root-plugin-roofit.control		\
 	build/package/common/root-plugin-ruby.control		\
 	build/package/common/root-plugin-sapdb.control		\
-	build/package/common/root-rootd.install.in		\
-	build/package/common/root-xrootd.install.old		\
-	build/package/common/ttf-root.control			\
-	build/package/common/ttf-root.install.in		\
-	build/package/debian/libroot.postinst			\
-	build/package/debian/libroot.postrm			\
-	build/package/debian/pycompat				\
 	build/package/debian/root-plugin-roofit.copyright	\
+	build/package/debian/root-system-proofd.postinst.in	\
+	build/package/debian/root-system-rootd.postinst.in	\
+	build/package/common/root-cint.control			\
+	build/package/common/root-cint.copyright		\
+	build/package/common/root-cint.install.in		\
 	build/package/debian/root-cint.copyright		\
 	build/package/debian/root-cint.postinst.in		\
 	build/package/debian/root-cint.postrm.in		\
 	build/package/debian/root-cint.prerm.in			\
+	build/package/common/root-rootd.install.in		\
+	build/package/common/root-xrootd.install.old		\
+	build/package/debian/pycompat				\
+	build/package/common/ttf-root.control			\
+	build/package/common/ttf-root.install.in		\
 	build/package/debian/ttf-root.copyright			\
 	build/package/debian/dirs				\
-	build/package/debian/root-system-proofd.postinst.in	\
-	build/package/debian/root-system-rootd.postinst.in	\
 	build/package/lib/makerpmspecs.sh			\
 	fonts/LICENSE						
+    check_retval "unwanted files"
+
+
     # rm -rf asimage/src/libAfterImage				
     # rm -rf xrootd/src/xrootd 
     # rm -rf unuran/src/unuran-*-root
+    message -n "Removing non-free fonts"
     for i in fonts/*.ttf ; do 
 	if test ! -f ${i} ; then continue ; fi 
 	case $i in 
@@ -86,56 +201,26 @@ purge ()
 	    *) rm $i ;;
 	esac
     done
+    check_retval 
+
     if test $leave -lt 1 ; then 
+	message -n "Removing old packaging files"
         # Remove old package files 
 	for i in build/package/*/root-{bin,doc,common,xrootd,rootd,proofd}* 
 	  do 
 	  if test ! -f $i ; then continue ; fi 
 	  rm $i 
 	done
+	check_retval 
     fi
-    echo "done"
 
     # Extract tar-balls, and remove the tar-balls. 
-    echo -n "Extracting tar-balls ... "
-    # Xrootd
-    xtar=`find xrootd/src/ -name "*.tgz"` 
-    if test "x$xtar" != "x" ; then 
-	rm -rf xrootd/src/xrootd 
-	echo -n "$xtar ... "
-	tar -xzf $xtar -C xrootd/src/
-	touch xrootd/src/headers.d
-	rm -f unuran/src/unuran-*-root/config.status
-	rm -f unuran/src/unuran-*-root/config.log
-	rm -f $xtar
-    fi
-    # ASImage
-    atar=`find asimage/src/ -name "*.tar.gz"` 
-    if test "x$atar" != "x" ; then 
-	rm -rf asimage/src/libAfterImage
-	echo -n "$atar ... "
-	tar -xzf $atar -C asimage/src/
-	touch asimage/src/headers.d
-	rm -f $atar
-        # Some extra files to delete from the unpacked sources of libAfterimage
-	rm -rf asimage/src/libAfterImage/Makefile		\
-	    asimage/src/libAfterImage/afterbase.h		\
-	    asimage/src/libAfterImage/afterimage-config	\
-	    asimage/src/libAfterImage/afterimage-libs	\
-	    asimage/src/libAfterImage/config.h		\
-	    asimage/src/libAfterImage/config.log		\
-	    asimage/src/libAfterImage/config.status
-    fi
-    # Unuran
-    utar=`find unuran/src/ -name "*.tar.gz"` 
-    if test "x$utar" != "x" ; then 
-	rm -rf unuran/src/unuran-*-root
-	echo -n "$utar ... "
-	tar -xzf $utar -C unuran/src/
-	touch unuran/src/headers.d
-	rm -f $utar
+    message "Extracting tar-balls"
+    extract_tarballs math/unuran/src 
+    if test $? -eq 0 ; then 
+	rm -f math/unuran/src/unuran-*-root/config.status
+	rm -f math/unuran/src/unuran-*-root/config.log
     fi
-    echo "done"
 }
 
 # ____________________________________________________________________
@@ -143,17 +228,14 @@ clean()
 {
     if test $clean -lt 1 ; then return 0 ; fi 
 
-    echo -n "Cleaning ... " 
-    touch unuran/src/.bogus.tar.gz
+    message -n "Cleaning" 
     make maintainer-clean \
-	ASTEPVERS=.bogus ASTEPETAG=	\
-	XROOTDDIRD=      XROOTDETAG=	\
-	UNRVERS=.bogus   UNURANETAG=
-    rm -f unuran/src/.bogus.tar.gz
+		UNURANETAG= \
+		UNURKEEP=yes > /dev/null 2>&1
     rm -rf debian
     rm -f fonts/s050000l.pfb
     rm -f fonts/s050000l.pe
-    echo "done"
+    check_retval
 }
 
 
@@ -171,17 +253,18 @@ update_cl()
     test $upcl -lt 1 && return 0 
     
     cl=build/package/debian/changelog
-    echo -n "Update $cl ..."
-    root_vers=`cat build/version_number` 
+    message -n "Update $cl"
+    root_vers=`cat build/version_number | tr '/' '.'` 
     last_vers=`head -n 1 $cl | sed 's/root-system (\(.*\)).*/\1/'`
     root_lvers=`vers2num $root_vers`
     last_lvers=`vers2num $last_vers`
     if test $root_lvers -gt $last_lvers ; then 
+	res=$root_lvers
 	dch -v ${root_vers}-1 -c $cl "New upstream version"
-	echo "done"
     else 
-	echo "same version"
+	res="same version"
     fi
+    check_retval $res
 }
 
 # ____________________________________________________________________
@@ -190,21 +273,25 @@ setup()
     test $setup -lt 1 && return 0 
 
     ### echo %%% Make the directory 
-    echo "Setting up debian directory ... "
+    message "Setting up debian directory ..."
     mkdir -p debian
 
     ### echo %%% Copy files to directory, making subsitutions if needed
     for i in build/package/debian/* ; do 
 	if test -d $i ; then 
 	    case $i in 
-		*/CVS) continue ;;
+		*/CVS|.svn) continue ;;
 	    esac
-	    echo "Copying directory `basename $i` to debian/" 
-	    cp -a $i debian/ 
-	    continue
 	fi
 
 	case $i in 
+	    */lib*-static.*.in)
+		e=`basename $i .in | sed 's/.*\.//'`
+		b=`basename $i .$e.in`
+		t="${b}.${e}.in"
+		echo "Copying ${b}.${e}.in to debian/${t}"
+		cp -a $i debian/${t}
+		;;
 	    */lib*-dev*)
 		echo "Copying `basename $i` to debian/"
 		cp -a $i debian/
@@ -226,7 +313,7 @@ setup()
 		e=`basename $i | sed 's/.*\.//'`
 		b=`basename $i .$e`
 		t="${b}${root_sovers}.${e}"
-		echo "Copying ${b}.${e}.in to debian/${t}n"
+		echo "Copying ${b}.${e}.in to debian/${t}"
 		cp -a $i debian/${t} 
 		;; 
 	    */s050000l.pfb|*/s050000l.pe)
@@ -235,6 +322,13 @@ setup()
 		echo "Copying $b to fonts/$b" 
 		cp $i fonts/
 		;;
+	    */po)
+		b=`basename $i`
+		echo "Making directory debian/$b"
+		mkdir -p debian/$b
+		echo "Copying to directory debian/$b"
+		cp -a $i/* debian/$b/
+		;;
 	    *)
 		b=`basename ${i}`
 		echo "Copying $b to debian/$b"
@@ -244,7 +338,8 @@ setup()
     done
 
     # cp -a build/package/debian/* debian/
-    find debian -name "CVS" | xargs -r rm -frv 
+    find debian -name "CVS"  | xargs -r rm -frv 
+    find debian -name ".svn" | xargs -r rm -frv 
     rm -fr debian/root-system-bin.png
     rm -fr debian/application-x-root.png
     chmod a+x debian/rules 
@@ -252,6 +347,7 @@ setup()
 
     # Make sure we rebuild debian/control
     touch debian/control.in
+    check_retval "Setting up debian directory"
 }
 
 # ____________________________________________________________________
diff --git a/build/package/lib/makelist b/build/package/lib/makelist
index e5b2fb80264..678edbb73d5 100755
--- a/build/package/lib/makelist
+++ b/build/package/lib/makelist
@@ -27,11 +27,20 @@ endif
 # Include general and directory specific make rules 
 ifneq ($(DIRS),)
 include config/Makefile.config 
+include config/Makefile.$(ARCH)
 include $(foreach i, $(DIRS), $(i)/Module.mk)
-endif
-ifneq ($(filter cint,$(DIRS)),)
-include cint/cintdlls.mk
+# Special case of xrootd 
+ifeq ($(DIRS), net/xrootd)
+XRDLIBS := $(patsubst lib/%, $(LPATH)/%, \
+		$(filter-out lib/libXrdProofd.so, $(wildcard lib/libXrd*.so)))
+ALLLIBS	:= $(XRDLIBS:$(RLIBD)/%=$(RLIBD)/%)
+ALLEXECS:= $(filter-out bin/xrootd bin/olbd, $(ALLEXECS))
+endif # $(DIRS) = xrootd
+endif # ! $(DIRS) = 
+ifneq ($(filter cint/cint,$(DIRS)),)
+include cint/ROOT/cintdlls.mk
 DICTLIBS += $(patsubst lib/%, $(RLIBD)/%, $(filter lib/%, $(CINTDICTDLLS)))
+ALLMAPS  =  $(patsubst lib/%, $(RLIBD)/%, $(filter lib/%, $(CINTDICTMAPS)))
 endif
 
 # Default target and message 
@@ -61,23 +70,13 @@ DEVLIBS := $(ALLLIBS)
 else # ! $(LIB) = $(DEV)
 # If the development and library package is the same (plugins), then we need
 # only add the soversion to the library directory 
-ifneq ($(NOVERS),1)
+ifeq ($(DIRS), net/xrootd)
+PKGLIBS := $(ALLLIBS:$(RLIBD)/%=$(RLIBD)/$(SOVER)/%)
+else
 PKGLIBS	:= $(ALLLIBS:$(RLIBD)/%=$(RLIBD)/$(SOVER)/%.$(SOVER)) 	\
 	   $(ALLLIBS:$(RLIBD)/%=$(RLIBD)/$(SOVER)/%.$(MAJOR)) 	\
 	   $(ALLLIBS:$(RLIBD)/%=$(RLIBD)/$(SOVER)/%) 		
-else # ! $(NOVERS) != 1
-# Special case of xrootd 
-ifeq ($(DIRS), xrootd)
-XRDLIBS := $(patsubst lib/%, $(LPATH)/%, \
-		$(filter-out lib/libXrdProofd.so, $(wildcard lib/libXrd*.so)))
-PKGLIBS	:= $(XRDLIBS:$(RLIBD)/%=$(RLIBD)/$(SOVER)/%)
-# In case we do not have a library package 
-else  # ! $(DIR) = xrootd
-PKGLIBS	:= $(ALLLIBS) \
-	   $(ALLLIBS:$(RLIBD)/%=$(RLIBD)/$(SOVER)/%) 		\
-	   $(ALLLIBS:$(RLIBD)/%=$(RLIBD)/%.$(SOVER))		
-endif # $(DIRS) = xrootd
-endif # $(NOVERS) != 1
+endif # $(DIRS) = net/xrootd
 endif # $(LIB) = $(DEV)
 endif # $(LIB)
 ifneq ($(NOMAP),1) 
@@ -90,22 +89,12 @@ endif
 liblist:
 ifneq ($(LIB),)
 	@for f in $(PKGLIBS)  ; do echo $$f ; done >> $(OUT)/$(SLIB).install
-ifneq ($(LIB),$(DEV))
+ifneq ($(LIB), $(DEV))
 	@(cd $(BUILD)/$(RLIBD) && \
 	   for i in $(ALLLIBS) ; do \
 	      b=`basename $$i` ; \
 	      ln -fs $(SOVER)/$$b . ; \
 	      ln -fs $(SOVER)/$$b.$(SOVER) . ; done)
-
-#	      mv $(SOVER)/$$b.$(SOVER) . ; \
-#	      (cd $(SOVER) && ln -sf ../$$b.$(SOVER) .) ; done)
-#else 
-#ifneq ($(DIRS), xrootd) 
-#	@(cd $(BUILD)/$(RLIBD) && \
-#	   for i in $(ALLLIBS) ; do \
-#	      b=`basename $$i` ; \
-#	      ln -fs $(SOVER)/$$b.$(SOVER) .; done)
-#endif
 endif # $(LIB) = $(DEV)
 endif # $(LIB)
 
@@ -117,9 +106,11 @@ endif # $(DEV)
 # Rule to make development package list 
 devlist:
 ifneq ($(DEV),)
+ifneq ($(DEV),$(LIB))
 	@for f in $(filter-out %.cw %.pri, $(PKGHDRS)) ; \
 		do echo $$f ; done >> $(OUT)/$(DEV).install
 endif
+endif
 
 # If we have a binary package, then get list of programs and man pages
 ifneq ($(BIN),)
diff --git a/build/package/lib/makelists.sh b/build/package/lib/makelists.sh
index 77596749441..d8d0124f918 100755
--- a/build/package/lib/makelists.sh
+++ b/build/package/lib/makelists.sh
@@ -15,11 +15,41 @@ for i in build/package/common/*.install ; do
     cp $i $outdir
 done
 
+set_lib_names()
+{
+    base=$1 ; shift
+    sub=$1 ; shift
+    
+    lib=libroot-${base}
+    if test "x$sub" != "x" ; then lib=${lib}-${sub} ; fi
+    dev=${lib}-dev
+    if test "x$1" != "x" ; then 
+	bin=$1
+    else
+	bin=${lib}
+    fi
+}
+
+set_plugin_names()
+{
+    base=$1 ; shift
+    sub=$1 ; shift 
+    lib=root-plugin-${base}-${sub}
+    dev=${lib}
+    if test "x$1" != "x" ; then 
+	bin=$1
+    else
+	bin=${lib}
+    fi
+}
+   
+    
 #
 # Loop over the directories, and update the file lists based on the 
 # information in Module.mk files in each subdirectory
 #
-for d in * ; do 
+l=`find . -name "Module.mk" -print0 | xargs -L 1 -0 dirname | sort -u | sed 's,./,,'`
+for d in $l ; do 
     # 
     # If there's no Module.mk file in the currently inspected
     # directory, continue  
@@ -33,69 +63,93 @@ for d in * ; do
     lib= 
     bin= 
     extra= 
-    
+    base=`dirname $d`
+    sub=`basename $d`
+
     #
     # Deal with some special directories.  For each directory, check
     # if it's libraries and such should go into some special package. 
     # 
     case $d in 		
-	auth)       lib=libroot             ; dev=libroot-dev; 
-	            bin=root-system-bin     ;;
-	base)       lib=libroot             ; dev=libroot-dev; 
-	            bin=root-system-bin
-	            extra="ALLMAPS=${prefix}/lib/root/libCore.rootmap "
-                    extra="$extra ALLLIBS=${prefix}/lib/root/libCore.so" ;; 
-	cint)	    lib=libroot             ; dev=libroot-dev; 
-	            bin=root-system-bin     ;
-	    	    extra="ALLLIBS=${prefix}/lib/root/libCint.so" ;;   
-	    	    # extra="NOMAP=1 ALLLIBS=${prefix}/lib/root/libCint.so" ;; 
-        clib|cont|eg|foam|fitpanel|g3d|gdml|ged*|geom*|gpad|graf|gui*|hist*)
-	            lib=libroot             ; dev=libroot-dev; 
-		    bin=root-system-bin ;;
-        html|io|math|mathcore|matrix|meta*|net|physics|postscript|rint)
- 	            lib=libroot             ; dev=libroot-dev; 
-		    bin=root-system-bin ;;
-        spectrum*|table|thread|tree*|unix|utils|vmc|x11*|x3d|zip)
-	            lib=libroot             ; dev=libroot-dev; 
-		    bin=root-system-bin ;;
-	rpdutils)   lib=libroot             ; dev=libroot-dev; 
-		    bin=root-system-bin     ;; # extra="NOMAP=1"  ;;
-        rootx|sessionviewer|smatrix|splot|xml)    
-	            lib=libroot             ; dev=libroot-dev; 
-		    bin=root-system-bin ;;
-	newdelete)  lib=libroot		    ; dev=libroot-dev; 
-	    	    bin=libroot-dev         ;; # extra="NOMAP=1" ;;
-	reflex)     lib=libroot		    ; dev=libroot-dev; 
-	    	    bin=libroot-dev         ;; # extra="NOMAP=1" ;;
-	cintex)     lib=libroot		    ; dev=libroot-dev; 
-	    	    bin=libroot-dev         ;;
-	globusauth) lib=root-plugin-globus  ; dev=$lib       ; bin=$lib ;;  
-	qtroot)     lib=root-plugin-qt      ; dev=$lib       ; bin=$lib ;;
-	pythia)     lib=root-plugin-pythia5 ; dev=$lib       ; bin=$lib ;;  
-	rfio)       lib=root-plugin-castor  ; dev=$lib       ; bin=$lib ;;  
-	srputils)   lib=root-plugin-srp     ; dev=$lib       ; bin=$lib ;;  
-	xmlparser)  lib=root-plugin-xml     ; dev=$lib       ; bin=$lib ;;
-	krb5auth)   lib=root-plugin-krb5    ; dev=$lib       ; bin=$lib ;;
-	proofd)	    lib=root-plugin-xproof  ; dev=$lib       ; 
-	            bin=root-system-proofd  ;; 
-	proofplayer)	    
-	            lib=root-plugin-proof   ; dev=$lib       ; bin=$lib ;; 
-	rootd)      lib=root-system-$d      ; dev=$lib       ; bin=$lib ;;
-	xrootd)     lib=root-system-$d      ; dev=$lib       ; bin=$lib ;
-	            xrdlibs=                ; extra="ALLLIBS= NOVERS=1" ;; 
-                    # NOMAP=1" ;;     
-	pyroot)     lib=libroot-python      ; dev=${lib}-dev ; bin=$lib ;; 
-	roofitcore) lib=libroot-roofit	    ; dev=${lib}-dev ; bin=$lib ;;
-	clarens|ldap|mlp|quadp|roofit|ruby|mathmore|minuit|tmva|unuran)
-	            lib=libroot-$d          ; dev=${lib}-dev ; bin=$lib ;;  
-	build|freetype|win*|main) continue ;; 			
-	eve)        lib=root-plugin-gl	    ; dev=$lib       ; bin=$lib ;;  
-	proofx)     lib=root-plugin-xproof  ; dev=$lib       ; bin=$lib ;;  
-	sapdb)      lib=root-plugin-maxdb   ; dev=$lib       ; bin=$lib ;;  
-	qtgsi)      lib=root-plugin-qt      ; dev=$lib       ; bin=$lib ;;  
-	fftw)       lib=root-plugin-${d}3   ; dev=$lib       ; bin=$lib ;;
-	            # extra="NOMAP=1"         ;;  
-	*)          lib=root-plugin-$d      ; dev=$lib       ; bin=$lib ;;  
+	bindings/pyroot)set_lib_names    $base python 	;;
+	bindings/*)     set_lib_names    $base $sub 	;;
+	build)          continue ;;
+	core/winnt)     continue ;; 
+	core/newdelete) set_lib_names    $base "" root-system-bin
+	                extra="ALLMAPS=${prefix}/lib/root/libCore.rootmap ";;
+	core/rint)      set_lib_names    $base "" root-system-bin ;;
+	core/thread)    set_lib_names    $base "" root-system-bin ;;
+	core/*)         set_lib_names    $base "" root-system-bin
+	                extra="ALLMAPS=${prefix}/lib/root/libCore.rootmap "
+                        extra="$extra ALLLIBS=${prefix}/lib/root/libCore.so" ;; 
+	cint/cint)	set_lib_names    core  "" root-system-bin
+	    	        extra="ALLLIBS=${prefix}/lib/root/libCint.so" ;;   
+	    	        # extra="NOMAP=1 ALLLIBS=${prefix}/lib/root/libCint.so" 
+	cint/cint7)	continue ;;
+	cint/reflex)	set_lib_names    core  "" libroot-core-dev
+	    	        extra="REFLEXLIB=${prefix}/lib/root/libReflex.so" ;;   
+	cint/*)	        set_lib_names    core  "" root-system-bin	;;
+	geom/geom)	set_lib_names	 $base 		;;
+	geom/*)	        set_plugin_names $base $sub	;;
+	graf2d/gpad)    set_lib_names    $base $sub	;;
+	graf2d/graf)    set_lib_names    $base $sub	;;
+	graf2d/postscript) set_lib_names    $base $sub	;;
+	graf2d/asimage) set_plugin_names $base $sub	;;
+	graf2d/freetype)continue;;
+	graf2d/win32gdk)continue;;
+	graf2d/x11*)    set_plugin_names $base x11	;;
+	graf2d/*)       set_plugin_names $base $sub	;;
+	graf3d/ftgl)    set_lib_names    $base gl       ;;
+	graf3d/gl)      set_lib_names    $base $sub	;;
+	graf3d/g3d)     set_lib_names    $base $sub	;;
+	graf3d/eve)     set_lib_names    $base $sub	;;
+	graf3d/*)       set_plugin_names $base $sub	;;
+	gui/gui)        set_lib_names    $base 		;;
+	gui/guihtml)    set_lib_names    $base 		;;
+	gui/ged)        set_lib_names    $base $sub	;;
+	gui/qt*)        set_plugin_names $base qt	;;
+	gui/*)          set_plugin_names $base $sub	;;
+	hist/hist)      set_lib_names    $base		;;
+	hist/spectrum)  set_lib_names    $base $sub	;;
+	hist/*)         set_plugin_names $base $sub	;;
+        html)           set_lib_names    $sub 		;;
+	io/io)          set_lib_names    $base 		;;
+	io/xmlparser)   set_lib_names    $base $sub	;;
+	io/rfio)	continue;;
+	io/*)           set_plugin_names $base $sub	;;
+	main)           continue;;
+        math/fftw)      set_plugin_names $base ${sub}3	;;
+        math/fumili)    set_plugin_names $base $sub	;;
+        math/minuit2)   set_plugin_names $base $sub	;;
+	math/*)         set_lib_names    $base $sub	;;
+        misc/*)         set_lib_names	 $base $sub	;; 
+        montecarlo/pythia*)   
+	                set_plugin_names $base $sub	;;
+        montecarlo/*)   set_lib_names    $base $sub	;;
+        net/auth)       set_lib_names    $base $sub	;;
+	net/net)        set_lib_names    $base 		;;
+	net/ldap)       set_lib_names    $base $sub	;;
+	net/rootd)      lib=root-system-$sub    ; dev=$lib       ; bin=$lib ;;
+	net/xrootd)     set_plugin_names $base $sub	;;
+        net/globusauth) set_plugin_names $base globus	;;
+        net/krb5auth)   set_plugin_names $base krb5	;;
+        net/srputils)   set_plugin_names $base srp	;;
+        net/rpdutils)   set_lib_names    core  ""	root-system-bin	;;
+        net/*)          set_plugin_names $base $sub	;;
+	proof/proofd)   set_plugin_names $base xproof   root-system-${base}d ;;
+	proof/proofx)   set_plugin_names $base xproof   ;;
+        proof/clarens)  set_lib_names    $base $sub	;;
+        proof/proof)    set_lib_names    $base 		;;
+        proof/*)        set_plugin_names $base $sub	;;
+        roofit/*)       set_lib_names    $base  	;; 
+	rootx)	        set_lib_names    core  ""	root-system-bin ;;
+	sql/sapdb)      set_plugin_names $base maxdb	;;
+	sql/*)          set_plugin_names $base $sub	;;
+        tmva)           set_lib_names    $sub 		;;
+        tree/tree)      set_lib_names    $base 		;;
+        tree/treeplayer)set_lib_names    $base $sub	;;
+	tree/*)         set_plugin_names $base $sub	;;
+	*)              set_plugin_names $base $sub	;;  
     esac 
 
     # 
@@ -117,9 +171,10 @@ for i in build/package/common/*.install.in ; do
     if test ! -f $i ; then continue ; fi
     b=`basename $i .install.in`
     case $b in 
-	lib*-dev) b=$outdir/${b}          ;; 
-	lib*)     b=$outdir/${b}${sovers} ;;
-	*)        b=$outdir/${b}          ;; 
+	lib*static*)  b=$outdir/${b}          ;;
+	lib*-dev)     b=$outdir/${b}          ;; 
+	lib*)         b=$outdir/${b}${sovers} ;;
+	*)            b=$outdir/${b}          ;; 
     esac
     grep -v "^#" $i | 					\
 	sed -e "s|@prefix@|${prefix}|g" 		\
diff --git a/build/package/lib/makerpmspec.sh b/build/package/lib/makerpmspec.sh
index 7ba4fdb1d73..0adb76ba751 100755
--- a/build/package/lib/makerpmspec.sh
+++ b/build/package/lib/makerpmspec.sh
@@ -10,37 +10,102 @@ chmod a+x build/package/lib/*
 tgtdir=rpm
 
 # Configure arguments 
-confargs="--enable-cintex				\
-	  --enable-explicitlink				\
-    	  --enable-fftw3				\
-	  --enable-mathmore				\
-          --enable-mathcore                          	\
-          --enable-minuit2                           	\
-	  --enable-odbc					\
-	  --enable-pythia				\
-	  --enable-pythia6				\
-	  --enable-qt					\
-	  --enable-qtgsi				\
-    	  --enable-reflex				\
-    	  --enable-roofit				\
-	  --enable-ruby					\
-	  --enable-shared				\
-	  --enable-shadowpw				\
-	  --enable-soversion				\
-    	  --enable-table				\
-	  --enable-xrootd				\
-	  --disable-rpath				\
-	  --disable-afs					\
-	  --disable-srp					\
-	  --disable-builtin-freetype			\
-	  --disable-builtin-pcre			\
-	  --disable-builtin-zlib"
+confargs="--enable-cintex			\
+    --disable-clarens				\
+    --enable-explicitlink			\
+    --enable-gdml				\
+    --disable-fftw3				\
+    --enable-ldap				\
+    --disable-qt					\
+    --disable-qtgsi				\
+    --enable-mathcore				\
+    --enable-mathmore				\
+    --enable-minuit2				\
+    --enable-mysql				\
+    --disable-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				\
+    --enable-builtin-ftgl			\
+    --disable-builtin-freetype			\
+    --disable-builtin-pcre			\
+    --disable-builtin-zlib			\
+    --disable-alien				\
+    --disable-chirp				\
+    --disable-dcache				\
+    --disable-g4root				\
+    --disable-gfal				\
+    --disable-globus				\
+    --disable-monalisa				\
+    --disable-oracle				\
+    --disable-pythia6				\
+    --disable-rfio				\
+    --disable-cint7				\
+    --fail-on-missing				\
+    --enable-unuran				\
+    --enable-xrootd				\
+    --disable-sapdb				\
+    --enable-cern"
+
+# Configure arguments 
+# confargs="--enable-cintex				\
+# 	  --enable-explicitlink				\
+#     	  --enable-fftw3				\
+# 	  --enable-mathmore				\
+#           --enable-mathcore                          	\
+#           --enable-minuit2                           	\
+# 	  --enable-odbc					\
+# 	  --enable-pythia6				\
+# 	  --enable-qt					\
+# 	  --enable-qtgsi				\
+#     	  --enable-reflex				\
+#     	  --enable-roofit				\
+# 	  --enable-ruby					\
+# 	  --enable-shared				\
+# 	  --enable-shadowpw				\
+# 	  --enable-soversion				\
+#     	  --enable-table				\
+# 	  --enable-xrootd				\
+# 	  --disable-rpath				\
+# 	  --disable-afs					\
+# 	  --disable-srp					\
+# 	  --disable-builtin-freetype			\
+# 	  --disable-builtin-pcre			\
+# 	  --disable-builtin-zlib"
+
+test "x$QTDIR" = "x" || unset QTDIR
+test "x$QTLIB" = "x" || unset QTLIB
+test "x$QTINC" = "x" || unset QTINC
 
 ### echo %%% Packages ordered by preference
 pkglist=`./configure --pkglist	${confargs} \
 		| sed -n -e 's/packages: //p'` 
+if test $? -ne 0 ; then 
+    echo "Failed to get package list from configure, try" 
+    echo "  ./configure --pkglist	${confargs}" \
+	| tr '\n' ' ' | sed 's/ */ /'
+    exit 1
+fi
 pkglist=`echo $pkglist | sed 's/libroot\([-a-zA-Z0-9]*\)/libroot\1 libroot\1-dev/g'`
+pkglist="libroot-static $pkglist"
+echo $pkglist
+for i in $pkglist ; do 
+    echo "Adding package $i to spec" 
+done
 builddepends=`build/package/lib/makebuilddepend.sh rpm $pkglist`
+if test $? -ne 0 ;then 
+    echo "Failed to make build dependencies" 
+    exit 1
+fi
 dpkglist="`echo $pkglist | sed -e 's/ *ttf-root[-a-z]* *//g' -e 's/ /, /g'`, root-ttf"
 
 # ROOT version 
@@ -55,8 +120,9 @@ echo "$builddepends" >> root.spec.in
 sed '/@builddepends/d' < root.spec.01 >> root.spec.in
 rm -f root.spec.00 root.spec.01
 ### echo %%% Write header stuff 
-sed -e "s/@version@/${version}/" \
-    -e "s/@pkglist@/${dpkglist}/" \
+sed -e "s/@version@/${version}/"   \
+    -e "s/@sovers@/${sovers}/"     \
+    -e "s/@pkglist@/${dpkglist}/"  \
     -e "s/@confargs@/${confargs}/" \
     < root.spec.in > root.spec
 rm -f root.spec.in
@@ -65,10 +131,12 @@ rm -f root.spec.in
 for p in $pkglist ; do 
     # if test "x$p" = "xttf-root-installer" ; then continue ; fi
     case $p in 
-	root-common)  pp=$p       ; c=libroot ;;
-	libroot*-dev) pp=$p 	  ; c=`echo $p | sed 's/-dev//'`;;  
-	libroot*)     pp=$p$major ; c=$p ;; 
-	*)            pp=$p       ; c=$p ;; 
+	root-common)     pp=$p       ; c=libroot-core ;;
+	libroot-static)  pp=$p       ; c=libroot-core ;;
+	libroot*-dev)    pp=$p       ; c=`echo $p | sed 's/-dev//'`;;  
+	libroot*)        pp=$p$major ; c=$p ;; 
+	*-net-xrootd)    pp=$p	     ; c=root-system-xrootd ;;
+	*)               pp=$p       ; c=$p ;; 
     esac 
     echo "Adding package $p ($pp) to spec file" 
     cat >> root.spec <<-EOF
@@ -87,7 +155,15 @@ for p in $pkglist ; do
 	ttf-root*) 
 	    echo "Provides: root-ttf" 				>> root.spec 
 	    ;;
-	*xrootd|*rootd)
+	*net-xrootd)
+            echo "Provides: libXrdClient.so"			>> root.spec
+            echo "Provides: libXrdCrypto.so"			>> root.spec
+            echo "Provides: libXrdSut.so"			>> root.spec
+	    ;;
+	*xrootd)
+	    echo "Provides: root-file-server" 			>> root.spec 
+	    ;;
+	*rootd)
 	    echo "Provides: root-file-server" 			>> root.spec 
 	    ;;
 	*minuit*|*fumili)
@@ -111,9 +187,10 @@ for p in $pkglist ; do
     esac
     sed -n "/Package: $p/,/^$/ { s/^Description:.*/%description -n $pp/p ; s/^ //p; /^$/q }"  < build/package/common/$c.control >>  root.spec
     case $p in 
-	lib*-dev) files=rpm/${p}.install ;; 
-	lib*)     files=rpm/${p}${sovers}.install ;;
-	*) 	  files=rpm/${p}.install ;; 
+	libroot-static) files=rpm/${p}.install ;;
+	lib*-dev) 	files=rpm/${p}.install ;; 
+	lib*)     	files=rpm/${p}${sovers}.install ;;
+	*) 	  	files=rpm/${p}.install ;; 
     esac
 
     cat >> root.spec <<-EOF
@@ -149,6 +226,12 @@ cat >> root.spec <<EOF
 #
 EOF
 
+l=`find math/unuran/src/ -name "*.tar.gz" 2>/dev/null`
+if test "x$l" = "x" ; then 
+    svn update math/unuran/src 
+    rm -rf math/unuran/src/unuran-*-root
+fi
+
 #
 # EOF
 #
diff --git a/build/package/rpm/libroot-core.post b/build/package/rpm/libroot-core.post
new file mode 100644
index 00000000000..596a0c15e58
--- /dev/null
+++ b/build/package/rpm/libroot-core.post
@@ -0,0 +1,7 @@
+# Add %{_prefix}/lib/root to the directories searched by ldd, if not
+# so already 
+if ! grep -qs ^%{_prefix}/lib/root\$ /etc/ld.so.conf ; then
+    echo %{_prefix}/lib/root >> /etc/ld.so.conf
+fi
+# update /etc/ld.so.cache 
+ldconfig 
diff --git a/build/package/rpm/spec.in b/build/package/rpm/spec.in
index de58735b299..31bbcbc41ff 100644
--- a/build/package/rpm/spec.in
+++ b/build/package/rpm/spec.in
@@ -29,7 +29,8 @@ Source:        ftp://root.cern.ch/root/root_v%{ver}.source.tar.gz
 Group:         Applications/Physics
 BuildRoot:     /tmp/rootrpm
 Summary:       Numerical data analysis framework (OO)
-BuildRequires: XFree86-devel
+BuildRequires: libX11-devel
+BuildRequires: libXext-devel
 BuildRequires: pcre-devel
 BuildRequires: freetype-devel
 BuildRequires: openssl-devel
@@ -61,16 +62,19 @@ ROOT web-site: http://root.cern.ch
 # The actual build
 #
 # Configure the ROOT source tree. You may want to disable some
-# features here, though it is STRONGLY DEPRECIATED. 
+# features here, though it is STRONGLY DISCOURAGED
 #
 #
 %build
+test "x$QTDIR" = "x" || unset QTDIR
+test "x$QTLIB" = "x" || unset QTLIB
+test "x$QTINC" = "x" || unset QTINC
 ./configure @confargs@						\
 	    --prefix=%_prefix 					\
 	    --libdir=%_prefix/lib/root/%{sovers}		\
 	    --mandir=%_prefix/share/man/man1			\
 	    --docdir=%_defaultdocdir				\
-	    --cintincdir=%_prefix/lib/root/%{sovers}/cint 	\
+	    --cintincdir=%_prefix/lib/root/%{sovers}		\
 	    --etcdir=%_sysconfdir/root				\
             --with-sys-iconpath=%_datadir/pixmaps 		
 
@@ -80,6 +84,19 @@ ROOT web-site: http://root.cern.ch
 
 make 
 make cintdlls
+make static 
+# cat > html.C <<EOF
+# {
+#   THtml html;
+#   html.SetProductName("ROOT");
+#   html.SetHomepage("http://root.cern.ch");
+#   html.LoadAllLibs();
+#   html.MakeAll();
+# }
+# EOF
+# LD_LIBRARY_PATH=`pwd`/lib:`pwd`/cint/cint/include:`pwd`/cint/cint/stl:$LD_LIBRARY_PATH \
+#     ./bin/roota -l -b -q html.C
+# rm -f html.C
 
 #---------------------------------------------------------------------
 # The installation 
-- 
GitLab