#
# old_revision [e94b5297b98e65686b97c47eafcf62ee53f53bf9]
#
# delete "debian/build_lib_dynamic"
# 
# delete "debian/build_lib_static"
# 
# delete "debian/build_obj_dynamic"
# 
# delete "debian/build_obj_static"
# 
# delete "debian/build_xmlada.gpr"
# 
# add_file "debian/patches/dom_does_not_need_input_sources.diff"
#  content [4a1b1d2697085b2ae42cc25334c0b947173df2bc]
# 
# add_file "debian/patches/handle_build_flags.diff"
#  content [5ca51947f1c562cd597fdc88502e86b81209939f]
# 
# add_file "debian/xmlada.gpr"
#  content [3b965abf2617facad90ee8f41007dce4a81bccd4]
# 
# patch "debian/ada_libraries"
#  from [d3d3c6aea857d7f91d440d2f3a8328e9bcd0a415]
#    to [ac795cb6f4948cc7de897e6cf4694d6b68f4a78a]
# 
# patch "debian/control"
#  from [fe35f0a7f4aea4c28278129d98da149cbe8f6e26]
#    to [4390a9a8c78380ef7db80fcffbacea0647d00cbd]
# 
# patch "debian/install"
#  from [9d7996ccdcc3dad3b925aca5ef93adbafec72922]
#    to [ad0cbdca8c2ee56d9faacb63687fdc301b576d83]
# 
# patch "debian/patches/series"
#  from [5cd27321a14fd2299f19a0a644bac5691a89b5d7]
#    to [e0a0c796364ca850d58dc024f3d05f03b2ed512e]
# 
# patch "debian/patches/xmlada-config.diff"
#  from [7bdaf6a33af394315a5f343faa9a3f7780f3b2ee]
#    to [45065f0045a0daddaceb79a755cabefa6304bab1]
# 
# patch "debian/rules"
#  from [8814ae5ad29b3dea23d51fed3eef7f85ade621a4]
#    to [6d324ea1131f6302a6160337c277bfb6cad53902]
# 
# patch "debian/xmlada-config.1"
#  from [f53ed7937dfe24f8ece8f37e05d632765159c10b]
#    to [a8bdb8d0da26bed4ecf04486d5f17d2f0124f8bf]
#
============================================================
--- debian/ada_libraries	d3d3c6aea857d7f91d440d2f3a8328e9bcd0a415
+++ debian/ada_libraries	ac795cb6f4948cc7de897e6cf4694d6b68f4a78a
@@ -1,3 +1,5 @@
-kind=dynamic
-soname=ignored_by_dh_ada_library
-debian/build_xmlada.gpr
+MODE=distrib LIBRARY_TYPE=relocatable unicode/unicode.gpr
+MODE=distrib LIBRARY_TYPE=relocatable input_sources/input_sources.gpr
+MODE=distrib LIBRARY_TYPE=relocatable sax/sax.gpr
+MODE=distrib LIBRARY_TYPE=relocatable dom/dom.gpr
+MODE=distrib LIBRARY_TYPE=relocatable schema/schema.gpr
============================================================
--- debian/build_xmlada.gpr	900b393381290334685b45079050639004ef6db4
+++ /dev/null	
@@ -1,28 +0,0 @@
-with "../shared.gpr";
-
-library project Build_XMLAda is
-   type Library_Kind is ("dynamic", "static");
-   Kind : Library_Kind := External ("kind");
-
-   for Source_Dirs use
-     ("../dom",
-      "../input_sources",
-      "../sax",
-      "../schema",
-      "../unicode");
-   for Library_Name use "xmlada";
-   for Library_Dir use "build_lib_" & Kind;
-   for Library_Kind use Kind;
-   case Kind is
-      when "dynamic" =>
-         for Library_Version use "lib" & Project'Library_Name
-           & Shared.So_Ext & "." & Shared.Version;
-         for Library_Options use External_As_List ("LDFLAGS", " ");
-      when "static" =>
-         null;
-   end case;
-   for Object_Dir use "build_obj_" & Kind;
-   package Compiler is
-      for Default_Switches ("Ada") use External_As_list ("ADAFLAGS", " ");
-   end Compiler;
-end Build_XMLAda;
============================================================
--- debian/control	fe35f0a7f4aea4c28278129d98da149cbe8f6e26
+++ debian/control	4390a9a8c78380ef7db80fcffbacea0647d00cbd
@@ -21,7 +21,13 @@ Architecture: any
 
 Package: libxmlada4.4.0-dev
 Architecture: any
-Depends: ${misc:Depends}, ${ada:Depends}
+# Architecture any because of xmlada-config.
+Depends: ${misc:Depends},
+ libxmlada-dom4.4.0-dev,
+ libxmlada-input-sources4.4.0-dev,
+ libxmlada-sax4.4.0-dev,
+ libxmlada-schema4.4.0-dev,
+ libxmlada-unicode4.4.0-dev
 Recommends: libxmlada-doc
 Description: XML/Ada, a full XML suite for Ada programmers
  XML/Ada is a set of modules that provide a simple manipulation of XML
@@ -54,13 +60,29 @@ Description: XML/Ada, a full XML suite f
  .
  This package contains the documentation in text, PDF and HTML.
 
-Package: libxmlada4.4.0
+# Dom
+
+Package: libxmlada-dom4.4.0-dev
+Architecture: any
+Depends: ${misc:Depends}, ${ada:Depends}
+Description: XML/Ada, a full XML suite for Ada programmers (dom)
+ XML/Ada is a set of modules that provide a simple manipulation of XML
+ streams. It supports the whole XML 1.0 specifications, and can parse
+ any file that follows this standard (including the contents of the
+ DTD).  It also provides support for a number of other standard
+ associated with XML, like SAX, DOM, and XML Schemas.  In addition, it
+ includes a module to manipulate Unicode streams, since this is required
+ by the XML standard.
+ .
+ This package contains the development tools for the dom module.
+
+Package: libxmlada-dom4.4.0
 Section: libs
 Architecture: any
 Pre-Depends: ${misc:Pre-Depends}
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Multi-Arch: same
-Description: XML/Ada, a full XML suite for Ada programmers (runtime)
+Description: XML/Ada, a full XML suite for Ada programmers (dom runtime)
  XML/Ada is a set of modules that provide a simple manipulation of XML
  streams. It supports the whole XML 1.0 specifications, and can parse
  any file that follows this standard (including the contents of the
@@ -69,9 +91,9 @@ Description: XML/Ada, a full XML suite f
  includes a module to manipulate Unicode streams, since this is required
  by the XML standard.
  .
- This package contains the runtime shared library.
+ This package contains the dom runtime shared library.
 
-Package: libxmlada-dbg
+Package: libxmlada-dom-dbg
 Section: debug
 Priority: extra
 Architecture: any
@@ -79,7 +101,7 @@ Suggests: ${ada:Suggests}
 Depends: ${ada:Depends}, ${misc:Depends}
 Recommends: ${ada:Recommends}
 Suggests: ${ada:Suggests}
-Description: XML/Ada, a full XML suite for Ada programmers (debugging symbols)
+Description: XML/Ada, a full XML suite for Ada programmers (dom debugging symbols)
  XML/Ada is a set of modules that provide a simple manipulation of XML
  streams. It supports the whole XML 1.0 specifications, and can parse
  any file that follows this standard (including the contents of the
@@ -88,5 +110,217 @@ Description: XML/Ada, a full XML suite f
  includes a module to manipulate Unicode streams, since this is required
  by the XML standard.
  .
- This package contains the detached debugging symbols for the runtime
- shared library.
+ This package contains the detached debugging symbols for the dom
+ runtime shared library.
+
+# Input-sources
+
+Package: libxmlada-input-sources4.4.0-dev
+Architecture: any
+Depends: ${misc:Depends}, ${ada:Depends}
+Description: XML/Ada, a full XML suite for Ada programmers (input_sources)
+ XML/Ada is a set of modules that provide a simple manipulation of XML
+ streams. It supports the whole XML 1.0 specifications, and can parse
+ any file that follows this standard (including the contents of the
+ DTD).  It also provides support for a number of other standard
+ associated with XML, like SAX, DOM, and XML Schemas.  In addition, it
+ includes a module to manipulate Unicode streams, since this is required
+ by the XML standard.
+ .
+ This package contains the development tools for the input_sources module.
+
+Package: libxmlada-input-sources4.4.0
+Section: libs
+Architecture: any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Multi-Arch: same
+Description: XML/Ada, a full XML suite for Ada programmers (input_sources runtime)
+ XML/Ada is a set of modules that provide a simple manipulation of XML
+ streams. It supports the whole XML 1.0 specifications, and can parse
+ any file that follows this standard (including the contents of the
+ DTD).  It also provides support for a number of other standard
+ associated with XML, like SAX, DOM, and XML Schemas.  In addition, it
+ includes a module to manipulate Unicode streams, since this is required
+ by the XML standard.
+ .
+ This package contains the input_sources runtime shared library.
+
+Package: libxmlada-input-sources-dbg
+Section: debug
+Priority: extra
+Architecture: any
+Multi-Arch: same
+Depends: ${ada:Depends}, ${misc:Depends}
+Recommends: ${ada:Recommends}
+Suggests: ${ada:Suggests}
+Description: XML/Ada, a full XML suite for Ada programmers (input_sources debugging symbols)
+ XML/Ada is a set of modules that provide a simple manipulation of XML
+ streams. It supports the whole XML 1.0 specifications, and can parse
+ any file that follows this standard (including the contents of the
+ DTD).  It also provides support for a number of other standard
+ associated with XML, like SAX, DOM, and XML Schemas.  In addition, it
+ includes a module to manipulate Unicode streams, since this is required
+ by the XML standard.
+ .
+ This package contains the detached debugging symbols for the input_sources
+ runtime shared library.
+
+# Sax
+
+Package: libxmlada-sax4.4.0-dev
+Architecture: any
+Depends: ${misc:Depends}, ${ada:Depends}
+Description: XML/Ada, a full XML suite for Ada programmers (sax)
+ XML/Ada is a set of modules that provide a simple manipulation of XML
+ streams. It supports the whole XML 1.0 specifications, and can parse
+ any file that follows this standard (including the contents of the
+ DTD).  It also provides support for a number of other standard
+ associated with XML, like SAX, DOM, and XML Schemas.  In addition, it
+ includes a module to manipulate Unicode streams, since this is required
+ by the XML standard.
+ .
+ This package contains the development tools for the sax module.
+
+Package: libxmlada-sax4.4.0
+Section: libs
+Architecture: any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Multi-Arch: same
+Description: XML/Ada, a full XML suite for Ada programmers (sax runtime)
+ XML/Ada is a set of modules that provide a simple manipulation of XML
+ streams. It supports the whole XML 1.0 specifications, and can parse
+ any file that follows this standard (including the contents of the
+ DTD).  It also provides support for a number of other standard
+ associated with XML, like SAX, DOM, and XML Schemas.  In addition, it
+ includes a module to manipulate Unicode streams, since this is required
+ by the XML standard.
+ .
+ This package contains the sax runtime shared library.
+
+Package: libxmlada-sax-dbg
+Section: debug
+Priority: extra
+Architecture: any
+Multi-Arch: same
+Depends: ${ada:Depends}, ${misc:Depends}
+Recommends: ${ada:Recommends}
+Suggests: ${ada:Suggests}
+Description: XML/Ada, a full XML suite for Ada programmers (sax debugging symbols)
+ XML/Ada is a set of modules that provide a simple manipulation of XML
+ streams. It supports the whole XML 1.0 specifications, and can parse
+ any file that follows this standard (including the contents of the
+ DTD).  It also provides support for a number of other standard
+ associated with XML, like SAX, DOM, and XML Schemas.  In addition, it
+ includes a module to manipulate Unicode streams, since this is required
+ by the XML standard.
+ .
+ This package contains the detached debugging symbols for the sax
+ runtime shared library.
+
+# Schema
+
+Package: libxmlada-schema4.4.0-dev
+Architecture: any
+Depends: ${misc:Depends}, ${ada:Depends}
+Description: XML/Ada, a full XML suite for Ada programmers (schema)
+ XML/Ada is a set of modules that provide a simple manipulation of XML
+ streams. It supports the whole XML 1.0 specifications, and can parse
+ any file that follows this standard (including the contents of the
+ DTD).  It also provides support for a number of other standard
+ associated with XML, like SAX, DOM, and XML Schemas.  In addition, it
+ includes a module to manipulate Unicode streams, since this is required
+ by the XML standard.
+ .
+ This package contains the development tools for the schema module.
+
+Package: libxmlada-schema4.4.0
+Section: libs
+Architecture: any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Multi-Arch: same
+Description: XML/Ada, a full XML suite for Ada programmers (schema runtime)
+ XML/Ada is a set of modules that provide a simple manipulation of XML
+ streams. It supports the whole XML 1.0 specifications, and can parse
+ any file that follows this standard (including the contents of the
+ DTD).  It also provides support for a number of other standard
+ associated with XML, like SAX, DOM, and XML Schemas.  In addition, it
+ includes a module to manipulate Unicode streams, since this is required
+ by the XML standard.
+ .
+ This package contains the schema runtime shared library.
+
+Package: libxmlada-schema-dbg
+Section: debug
+Priority: extra
+Architecture: any
+Multi-Arch: same
+Depends: ${ada:Depends}, ${misc:Depends}
+Recommends: ${ada:Recommends}
+Suggests: ${ada:Suggests}
+Description: XML/Ada, a full XML suite for Ada programmers (schema debugging symbols)
+ XML/Ada is a set of modules that provide a simple manipulation of XML
+ streams. It supports the whole XML 1.0 specifications, and can parse
+ any file that follows this standard (including the contents of the
+ DTD).  It also provides support for a number of other standard
+ associated with XML, like SAX, DOM, and XML Schemas.  In addition, it
+ includes a module to manipulate Unicode streams, since this is required
+ by the XML standard.
+ .
+ This package contains the detached debugging symbols for the schema
+ runtime shared library.
+
+# Unicode
+
+Package: libxmlada-unicode4.4.0-dev
+Architecture: any
+Depends: ${misc:Depends}, ${ada:Depends}
+Description: XML/Ada, a full XML suite for Ada programmers (unicode)
+ XML/Ada is a set of modules that provide a simple manipulation of XML
+ streams. It supports the whole XML 1.0 specifications, and can parse
+ any file that follows this standard (including the contents of the
+ DTD).  It also provides support for a number of other standard
+ associated with XML, like SAX, DOM, and XML Schemas.  In addition, it
+ includes a module to manipulate Unicode streams, since this is required
+ by the XML standard.
+ .
+ This package contains the development tools for the unicode module.
+
+Package: libxmlada-unicode4.4.0
+Section: libs
+Architecture: any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Multi-Arch: same
+Description: XML/Ada, a full XML suite for Ada programmers (unicode runtime)
+ XML/Ada is a set of modules that provide a simple manipulation of XML
+ streams. It supports the whole XML 1.0 specifications, and can parse
+ any file that follows this standard (including the contents of the
+ DTD).  It also provides support for a number of other standard
+ associated with XML, like SAX, DOM, and XML Schemas.  In addition, it
+ includes a module to manipulate Unicode streams, since this is required
+ by the XML standard.
+ .
+ This package contains the unicode runtime shared library.
+
+Package: libxmlada-unicode-dbg
+Section: debug
+Priority: extra
+Architecture: any
+Multi-Arch: same
+Depends: ${ada:Depends}, ${misc:Depends}
+Recommends: ${ada:Recommends}
+Suggests: ${ada:Suggests}
+Description: XML/Ada, a full XML suite for Ada programmers (unicode debugging symbols)
+ XML/Ada is a set of modules that provide a simple manipulation of XML
+ streams. It supports the whole XML 1.0 specifications, and can parse
+ any file that follows this standard (including the contents of the
+ DTD).  It also provides support for a number of other standard
+ associated with XML, like SAX, DOM, and XML Schemas.  In addition, it
+ includes a module to manipulate Unicode streams, since this is required
+ by the XML standard.
+ .
+ This package contains the detached debugging symbols for the unicode
+ runtime shared library.
============================================================
--- debian/install	9d7996ccdcc3dad3b925aca5ef93adbafec72922
+++ debian/install	ad0cbdca8c2ee56d9faacb63687fdc301b576d83
@@ -1 +1,2 @@ xmlada-config usr/bin
 xmlada-config usr/bin
+debian/xmlada.gpr usr/share/ada/adainclude
============================================================
--- /dev/null	
+++ debian/patches/dom_does_not_need_input_sources.diff	4a1b1d2697085b2ae42cc25334c0b947173df2bc
@@ -0,0 +1,15 @@
+Author: Nicolas Boulenguez <nicolas@debian.org>
+Description: Dom project does not need to import input_sources project.
+ This creates an unneeded linker dependency without --as-needed.
+ This is reported upstream by mail, and does not deserve much more.
+Forwarded: yes
+--- a/dom/dom.gpr
++++ b/dom/dom.gpr
+@@ -1,7 +1,6 @@
+ with "../shared.gpr";
+ with "../sax/sax.gpr";
+ with "../unicode/unicode.gpr";
+-with "../input_sources/input_sources.gpr";
+ 
+ project Dom is
+ 
============================================================
--- /dev/null	
+++ debian/patches/handle_build_flags.diff	5ca51947f1c562cd597fdc88502e86b81209939f
@@ -0,0 +1,83 @@
+Author: Nicolas Boulenguez <nicolas@debian.org>
+Description: Remove compilation and link flags from projects
+ so that we can set ADAFLAGS BUILDER_OPTIONS LDFLAGS on the
+ command line.
+Forwarded: not-needed
+--- a/shared.gpr.in
++++ b/shared.gpr.in
+@@ -13,11 +13,16 @@
+ 
+    So_Ext := "@SO_EXT@";
+ 
++   Adaflags := External_As_List ("ADAFLAGS", " ");
++   Ldflags := External_As_List ("LDFLAGS", " ");
++
+    package Builder is
+        case Mode is
+           when "optimize" =>
+              for Global_Configuration_Pragmas use "gnat_optimize.adc";
+              for Switches ("Ada") use ("-j" & Processors);
++          when "distrib" =>
++             null;
+           when others =>
+              for Switches ("Ada") use ("-g", "-j" & Processors);
+        end case;
+@@ -28,7 +33,7 @@
+ 
+       case Mode is
+          when "distrib" =>
+-            for Switches ("Ada") use ("-O2", "-gnatn");
++            for Switches ("Ada") use Adaflags;
+ 
+          when "coverage" =>
+             for Switches ("Ada") use warnings
+--- a/dom/dom.gpr
++++ b/dom/dom.gpr
+@@ -11,6 +11,7 @@
+    for Library_Dir use "lib/" & Project'Library_Kind;
+    for Library_Version use "lib" & Project'Library_Name
+       & Shared.So_Ext & "." & Shared.Version;
++   for Library_Options use Shared.Ldflags;
+ 
+    package Builder  renames Shared.Builder;
+    package Compiler renames Shared.Compiler;
+--- a/input_sources/input_sources.gpr
++++ b/input_sources/input_sources.gpr
+@@ -9,6 +9,7 @@
+    for Library_Dir use "lib/" & Project'Library_Kind;
+    for Library_Version use "lib" & Project'Library_Name
+       & Shared.So_Ext & "." & Shared.Version;
++   for Library_Options use Shared.Ldflags;
+ 
+    package Builder  renames Shared.Builder;
+    package Compiler renames Shared.Compiler;
+--- a/sax/sax.gpr
++++ b/sax/sax.gpr
+@@ -10,6 +10,7 @@
+    for Library_Dir use "lib/" & Project'Library_Kind;
+    for Library_Version use "lib" & Project'Library_Name
+       & Shared.So_Ext & "." & Shared.Version;
++   for Library_Options use Shared.Ldflags;
+ 
+    package Builder  renames Shared.Builder;
+    package Compiler renames Shared.Compiler;
+--- a/schema/schema.gpr
++++ b/schema/schema.gpr
+@@ -11,6 +11,7 @@
+    for Library_Dir use "lib/" & Project'Library_Kind;
+    for Library_Version use "lib" & Project'Library_Name
+       & Shared.So_Ext & "." & Shared.Version;
++   for Library_Options use Shared.Ldflags;
+ 
+    package Builder  renames Shared.Builder;
+    package Compiler renames Shared.Compiler;
+--- a/unicode/unicode.gpr
++++ b/unicode/unicode.gpr
+@@ -8,6 +8,7 @@
+    for Library_Dir use "lib/" & Project'Library_Kind;
+    for Library_Version use "lib" & Project'Library_Name
+       & Shared.So_Ext & "." & Shared.Version;
++   for Library_Options use Shared.Ldflags;
+ 
+    package Builder  renames Shared.Builder;
+    package Compiler renames Shared.Compiler;
============================================================
--- debian/patches/series	5cd27321a14fd2299f19a0a644bac5691a89b5d7
+++ debian/patches/series	e0a0c796364ca850d58dc024f3d05f03b2ed512e
@@ -1,4 +1,6 @@
+handle_build_flags.diff
 update_license_in_readme.diff
 remove_w_from_soversion.diff
 xmlada-config.diff
 compile_with_4.6.diff
+dom_does_not_need_input_sources.diff
============================================================
--- debian/patches/xmlada-config.diff	7bdaf6a33af394315a5f343faa9a3f7780f3b2ee
+++ debian/patches/xmlada-config.diff	45065f0045a0daddaceb79a755cabefa6304bab1
@@ -6,7 +6,7 @@ Forwarded: not-needed
 Forwarded: not-needed
 --- a/xmlada-config.in
 +++ b/xmlada-config.in
-@@ -1,28 +1,23 @@
+@@ -1,28 +1,27 @@
  #!/bin/sh
  # @configure_input@
  
@@ -27,69 +27,30 @@ Forwarded: not-needed
 -mflags_static="-aI${includedir} -aO${libdir}/static"
 -libs_relocatable="-L${libdir}/relocatable -lxmlada_input_sources -lxmlada_sax -lxmlada_unicode"
 -libs_static="${libdir}/static/libxmlada_input_sources.a ${libdir}/static/libxmlada_sax.a ${libdir}/static/libxmlada_unicode.a"
--
--full_libs_relocatable="-lxmlada_dom -lxmlada_schema"
--full_libs_static="${libdir}/static/libxmlada_dom.a ${libdir}/static/libxmlada_schema.a"
 +mflags_relocatable="-aI${includedir} -aO${ali_dir}"
 +mflags_static="-aI${includedir} -aO${ali_dir}"
-+libs_relocatable="-L${libdir} -lxmlada"
-+libs_static="${libdir}/libxmlada.a"
++libs_relocatable="-L${libdir} -lxmlada_input_sources -lxmlada_sax -lxmlada_unicode"
++libs_static="${libdir}/libxmlada_input_sources.a ${libdir}/libxmlada_sax.a ${libdir}/libxmlada_unicode.a"
  
+ full_libs_relocatable="-lxmlada_dom -lxmlada_schema"
+-full_libs_static="${libdir}/static/libxmlada_dom.a ${libdir}/static/libxmlada_schema.a"
++full_libs_static="${libdir}/libxmlada_dom.a ${libdir}/libxmlada_schema.a"
+ 
  show_cflags=0
  show_mflags=1
  show_libs=1
--sax_only=0
+ sax_only=0
 -libtype=@DEFAULT_LIBRARY_TYPE@
 +libtype=relocatable
  
  usage()
  {
-@@ -40,9 +35,6 @@
-             Output the linker flags to use for XML/Ada
-         [--cflags]
-             Output the compiler flags to use for XML/Ada
--        [--sax]
--            Output all the flags to use for XML/Ada, provided
--            you are not using the DOM module.
-         [--static]
-             Output all the flags (compiler and linker) required to
-             compile a static version of your program
-@@ -75,9 +67,6 @@
-       show_cflags=0
-       show_mflags=0
-       ;;
--    --sax)
--      sax_only=1
--      ;;
-     --cflags)
-       show_libs=0
-       show_cflags=1
-@@ -97,13 +86,6 @@
-   shift
+@@ -98,7 +97,7 @@
  done
  
--## Force static if relocatable was not installed
+ ## Force static if relocatable was not installed
 -if [ -d $libdir/relocatable ]; then
--   :
--else
--   libtype=static
--fi
--
- result=""
- 
- if [ $show_cflags = 1 ]; then
-@@ -125,14 +107,8 @@
- if [ $show_libs = 1 ]; then
-    if [ $libtype = static ]; then
-       result="${result}${libs_static}"
--      if [ $sax_only = 0 ]; then
--         result="${result} ${full_libs_static}"
--      fi
-    else
-       result="${result}${libs_relocatable}"
--      if [ $sax_only = 0 ]; then
--         result="${result} ${full_libs_relocatable}"
--      fi
-    fi
- fi
- 
++if [ -d $libdir ]; then
+    :
+ else
+    libtype=static
============================================================
--- debian/rules	8814ae5ad29b3dea23d51fed3eef7f85ade621a4
+++ debian/rules	6d324ea1131f6302a6160337c277bfb6cad53902
@@ -45,10 +45,7 @@ override_dh_auto_build-arch:
 	touch $@
 
 override_dh_auto_build-arch:
-	gnatmake $(BUILDER_OPTIONS) -Pdebian/build_xmlada -Xkind=static \
-          $(foreach f,ADAFLAGS,"-X$(f)=$($(f))")
-	gnatmake $(BUILDER_OPTIONS) -Pdebian/build_xmlada -Xkind=dynamic \
-          $(foreach f,ADAFLAGS LDFLAGS,"-X$(f)=$($(f))")
+	$(MAKE) "GNATMAKE=gnatmake $(BUILDER_OPTIONS) $(foreach v,ADAFLAGS LDFLAGS,'-X$(v)=$($(v))')"
 
 override_dh_auto_build-indep:
 	$(MAKE) -C docs html latexpdf text SPHINXOPTS=-j$(BUILDER_JOBS)
@@ -58,11 +55,9 @@ override_dh_auto_clean:
 override_dh_auto_install:
 
 override_dh_auto_clean:
-	rm -f $(foreach d, lib obj, \
-              $(foreach k, dynamic static, \
-              debian/build_$(d)_$(k)/*))
 	dh_auto_clean
 	rm -f distrib/xmlada_shared.gpr shared.gpr xmlada-config
+	rm -f $(foreach m,dom input_sources sax schema unicode,$(m)/lib/relocatable/libxmlada_$(m).so.*)
 	if test -e configure-stamp; then \
           for f in config.guess config.sub configure; do \
             mv $$f.backup $$f; \
============================================================
--- debian/xmlada-config.1	f53ed7937dfe24f8ece8f37e05d632765159c10b
+++ debian/xmlada-config.1	a8bdb8d0da26bed4ecf04486d5f17d2f0124f8bf
@@ -21,10 +21,9 @@ Output the compiler flags to use for XML
 Output the linker flags to use for XML/Ada
 .IP \fB\-\-cflags\fR
 Output the compiler flags to use for XML/Ada
-\" This part is disabled as long as Debian provides only one library.
-\".IP \fB\-\-sax\fR
-\"Output all the flags to use for XML/Ada, provided
-\"you are not using the DOM module
+.IP \fB\-\-sax\fR
+Output all the flags to use for XML/Ada, provided
+you are not using the DOM module
 .IP \fB\-\-static\fR
 Output all the flags (compiler and linker) required to
 compile a static version of your program
============================================================
--- /dev/null	
+++ debian/xmlada.gpr	3b965abf2617facad90ee8f41007dce4a81bccd4
@@ -0,0 +1,9 @@
+with "xmlada_dom";
+with "xmlada_input_sources";
+with "xmlada_sax";
+with "xmlada_schema";
+with "xmlada_unicode";
+
+project Xmlada is
+   for Source_Dirs use ();
+end Xmlada;
