The unified diff between revisions [3da6ddd6..] and [808b3c87..] is displayed below. It can also be downloaded as a raw diff.

#
#
# rename "debian/gnade-dev.README.Debian"
#     to "debian/gnadecommon1-dev.README.Debian"
#
# add_file "debian/test_installed.sh"
#  content [c3be6d7e0deb550cc0bc290c5a6069db9ed90236]
#
# patch ".mtn-ignore"
#  from [87b31e2b0cb79195ea025e6da9bd2183f59eab4d]
#    to [decb68609a3235bcb5c237328f455fcb5924d016]
#
# patch "debian/changelog"
#  from [bcf30b0245a838c91b59eacc7a0f20533392fa1c]
#    to [6e8c108c14eeaf8304e249f975942ca6a3424fa5]
#
# patch "debian/compat"
#  from [5d9474c0309b7ca09a182d888f73b37a8fe1362c]
#    to [ccf271b7830882da1791852baeca1737fcbe4b90]
#
# patch "debian/gnadecommon.gpr"
#  from [9ef39dee1add4f182c9bb672d0ff0699f365edba]
#    to [a75393e0f168c78bbafd10b044d29fb7d0cacb37]
#
# patch "debian/gnadecommon1-dev.README.Debian"
#  from [29d355c57d139ef2351dc5189418ace3edb14881]
#    to [6c7210ce9fa97bcbf1e68277ac689e8ab3ab9653]
#
# patch "debian/rules"
#  from [11788645d4eae7869a71ea20a76df29ce520c316]
#    to [79ef55bf8dfccc56a287df9530db82ca0098d73b]
#
#   set "debian/test_installed.sh"
#  attr "mtn:execute"
# value "true"
#
============================================================
--- debian/test_installed.sh	c3be6d7e0deb550cc0bc290c5a6069db9ed90236
+++ debian/test_installed.sh	c3be6d7e0deb550cc0bc290c5a6069db9ed90236
@@ -0,0 +1,49 @@
+#!/bin/bash
+#
+# install gnade packages (normally in the chroot that just built it),
+# and run examples using installed libraries.
+
+# usage (as root, not yet in chroot):
+# cd gnade-<version>/debian
+# /etc/init.d/mysql stop
+# schroot ./test_installed.sh
+
+# This re-installs the latest version.
+
+dpkg --install ../../libgnadecommon1_1.6.2-3_i386.deb
+dpkg --install ../../libgnadeodbc2_1.6.2-3_i386.deb
+dpkg --install ../../libgnadesqlite3-2_1.6.2-3_i386.deb
+
+dpkg --install ../../libgnadecommon1-dev_1.6.2-3_i386.deb
+dpkg --install ../../libgnadeodbc1-dev_1.6.2-3_i386.deb
+dpkg --install ../../libgnadesqlite3-1-dev_1.6.2-3_i386.deb
+
+rm -rf tmp/odbc-example-obj
+rm -rf tmp/sqlite3-example-obj
+
+if [ ! -d tmp/odbc-example-src ]; then mkdir tmp/odbc-example-src; fi
+if [ ! -d tmp/sqlite3-example-src ]; then mkdir tmp/sqlite3-example-src; fi
+
+gunzip -c /usr/share/doc/libgnadeodbc1-dev/examples/demo.adb.gz > tmp/odbc-example-src/demo.adb
+cp /usr/share/doc/libgnadesqlite3-1-dev/examples/demo.adb tmp/sqlite3-example-src
+
+gnatmake -p -Pgnade_odbc_example_installed
+gnatmake -p -Pgnade_sqlite3_example_installed
+
+if [ ! -f odbc-sqladmin-stamp ]; then
+    /etc/init.d/mysql start;
+    mysqladmin -uroot create gnade;
+    echo "create user gnade identified by 'gnade'" | mysql -uroot;
+    echo "grant all on gnade.* to gnade" | mysql -uroot;
+    mysql -ugnade -pgnade < ../samples/sample_db/gnade.mysql.sql;
+    odbcinst -i -d -f odbc_mysql_driver.ini;
+    odbcinst -i -s -l -f odbc_mysql_source.ini;
+    touch odbc-sqladmin-stamp
+fi
+
+tmp/odbc-example-obj/demo
+
+# this creates 'demo.db' in current directory
+cd tmp; sqlite3-example-obj/demo
+
+# end of file
============================================================
--- .mtn-ignore	87b31e2b0cb79195ea025e6da9bd2183f59eab4d
+++ .mtn-ignore	decb68609a3235bcb5c237328f455fcb5924d016
@@ -21,6 +21,8 @@
 ^debian/.*-dev$
 ^debian/.*-stamp$
 ^debian/files$
+^debian/gnadeodbc1-dev\.README\.Debian$
+^debian/gnadesqlite31-dev\.README\.Debian$
 ^debian/libgnadecommon1$
 ^debian/libgnadeodbc2$
 ^debian/libgnadesqlite3-2$
============================================================
--- debian/changelog	bcf30b0245a838c91b59eacc7a0f20533392fa1c
+++ debian/changelog	6e8c108c14eeaf8304e249f975942ca6a3424fa5
@@ -1,3 +1,23 @@
+gnade (1.6.2-3) UNRELEASED; urgency=low
+
+  * debian/rules: Install source, ali files in correct directories
+    according to Debian Ada Policy. Install examples.
+
+  * debian/odbc.gpr: renamed to debian/gnadeodbc.gpr, refer to correct
+    directories
+
+  * debian/sqlite3.gpr: renamed to debian/gnadesqlite3.gpr, refer to
+    correct directories
+
+  * debian/gnadecommon.gpr: new
+
+  * debian/compat: change to 6.
+
+  * debian/test_installed.sh: New file, for running examples against
+    installed packages.
+
+ -- Stephen Leake <stephen_leake@stephe-leake.org>  Thu, 05 Nov 2009 06:14:01 -0500
+
 gnade (1.6.2-2) unstable; urgency=low

   [Stephen Leake]
============================================================
--- debian/compat	5d9474c0309b7ca09a182d888f73b37a8fe1362c
+++ debian/compat	ccf271b7830882da1791852baeca1737fcbe4b90
@@ -1 +1 @@
-5
+6
============================================================
--- debian/gnadecommon.gpr	9ef39dee1add4f182c9bb672d0ff0699f365edba
+++ debian/gnadecommon.gpr	a75393e0f168c78bbafd10b044d29fb7d0cacb37
@@ -15,11 +15,11 @@
 --  This project file is only used by gnadeodbc and gnadesqlite3; it
 --  is not useful on its own.

-project GNADEODBC is
-   for Library_Name use "gnadeodbc";
+project GNADECommon is
+   for Library_Name use "gnadecommon";
    for Library_Dir use  "/usr/lib";
    for Library_Kind use "dynamic";
    for Source_Dirs use ("/usr/share/ada/adainclude/gnadecommon");
    for Library_ALI_Dir use "/usr/lib/ada/adalib/gnadecommon";
    for Externally_Built use "true";
-end GNADEODBC;
+end GNADECommon;
============================================================
--- debian/gnade-dev.README.Debian	29d355c57d139ef2351dc5189418ace3edb14881
+++ debian/gnadecommon1-dev.README.Debian	6c7210ce9fa97bcbf1e68277ac689e8ab3ab9653
@@ -1,36 +1,34 @@ gnade for Debian
 gnade for Debian
 ----------------

-The Ada specifications and bodies are in the directory
-/usr/share/ada/adainclude/gnade.
+There are three gnade packages; gnadecommon, gnadeodbc, and
+gnadesqlite3.

-The Ada Library Information (*.ali) files are in the directory
-/usr/lib/ada/adalib/gnade.
+The binary library packages have a shared object version appended to
+the package name; the development packages have an ali version
+appended to the package name; see
+http://people.debian.org/~lbrenta/debian-ada-policy.html for more
+information on these version numbers.

-The static libraries with debugging symbols and the stripped shared
-libraries are in /usr/lib.
+gnadecommon is used by gnadeodbc and gnadesqlite3; it is not useful on
+its own.

-There is, in addition, a GNAT project file provided in
-/usr/share/ada/adainclude/gnade.gpr; it contains usage instructions.
+The Ada specifications and bodies are in the directories
+/usr/share/ada/adainclude/gnadecommon, gnadeodbc, gnadesqlite3.

-Thus, there are two ways to use GNADE in your Ada programs:
+The Ada Library Information (*.ali) files are in the directories
+/usr/lib/ada/adalib/gnadecommon, gnadeodbc, gnadesqlite3.

-pass the following options to gnatmake:
+The static libraries with debugging symbols and the stripped shared
+libraries are in /usr/lib.

--aI/usr/share/ada/adainclude/gnade \
--aO/usr/lib/ada/adalib/gnade \
--lgnadeodbc [optionally: -lgnadepostgresql, etc.]
+There is a GNAT project file for each library in
+/usr/share/ada/adainclude/gnadecommon.gpr, gnadeodbc.gpr,
+gnadesqlite.gpr; they contains usage instructions.

-or
+To use GNADE in your Ada programs, write a GNAT project file for your
+project, and "with" either gnadeodbc or gnadesqlite3 (or both).

-write a GNAT project file for your project, and "with" the project
-file provided:
+See the usage instructions inside the *.gpr files for more details.

-with "/usr/share/ada/adainclude/gnade.gpr";
-project My_Project is
-   ...
-end My_Project;
-
-See the usage instructions inside the `gnade.gpr' for more details.
-
- -- stephe <stephen_leake@stephe-leake.org>, Sat, 12 Sep 2009 08:37:18 -0400
+ -- Stephen Leake <stephen_leake@stephe-leake.org>, Wed,  4 Nov 2009 03:56:35 -0500
============================================================
--- debian/rules	11788645d4eae7869a71ea20a76df29ce520c316
+++ debian/rules	79ef55bf8dfccc56a287df9530db82ca0098d73b
@@ -19,10 +19,14 @@
 # 02110-1301 USA
 #
 # To build this package:
-# cd ..; sudo schroot --chroot=unstable -- dpkg-buildpackage -uc -us -i"_MTN|\\.mtn-ignore"
+# sudo schroot -d `cd ..; pwd` --chroot=unstable -- dpkg-buildpackage -uc -us -i"_MTN|\\.mtn-ignore"
 #
 # To run lintian:
-# cd ..; schroot --chroot=unstable -- make -f debian/rules lint
+# schroot -d `cd ..; pwd` --chroot=unstable -- make -f debian/rules lint
+#
+# To install the packages and run the examples:
+# sudo /etc/init.d/mysql stop
+# sudo schroot --chroot=unstable -- ./test_installed.sh

 .SUFFIXES=

@@ -58,7 +62,7 @@ build-indep:

 build-indep:

-all_packages += $(foreach l,$(libs), libgnade$(l)-so libgnade$(l)-dev)
+all_packages := $(foreach l,$(libs), libgnade$(l)-so libgnade$(l)-dev) libgnadeodbc-example libgnadesqlite3-example

 binary: binary-arch

@@ -80,8 +84,9 @@ clean: unpatch

 clean: unpatch
 	dh_clean
-# despite the man page, dh_clean does not do this
 	rm -f debian/*-stamp
+	rm -f debian/gnadesqlite3*-dev.README.Debian
+	rm -f debian/gnadeodbc*-dev.README.Debian

 # Helper targets

@@ -97,7 +102,7 @@ odbc_preprocessed_files := $(patsubst %.
 odbc_gpb_files := $(wildcard dbi/odbc/*.gpb)
 odbc_preprocessed_files := $(patsubst %.gpb,debian/tmp/odbc-prep/%.adb,$(notdir $(odbc_gpb_files)))

-.PRECIOUS: debian/tmp/odbc-prep
+.PRECIOUS: debian/tmp/odbc-prep debian/tmp/odbc-example-prep

 GNATPREP_FLAGS=-r -DDEBUG=False -DUNICODE=True -DCALLCONVENTION=C -DLINKOPT=\"-lodbc\"

@@ -110,10 +115,15 @@ debian/libgnade%-stamp:
 	gnatmake -p -j$(CPUS) -Pdebian/gnade_$*_build -XLIBTYPE=dynamic -Xsoversion=$($*_soversion)
 	touch $@

-debian/libgnadeodbc-stamp: $(odbc_preprocessed_files)
+debian/libgnadeodbc-stamp: $(odbc_preprocessed_files) debian/gnadeodbc$(odbc_aliversion)-dev.README.Debian

 debian/libgnadeodbc-stamp debian/libgnadesqlite3-stamp: debian/libgnadecommon-stamp

+debian/libgnadesqlite3-stamp: debian/gnadesqlite3$(sqlite3_aliversion)-dev.README.Debian
+
+debian/gnade%-dev.README.Debian:
+	cd debian; ln -s gnadecommon$(common_aliversion)-dev.README.Debian gnade$*-dev.README.Debian
+
 # Make a directory.
 debian/tmp/%-prep:
 	-mkdir -p $@
@@ -149,13 +159,24 @@ libgnade%-dev: debian/libgnade%-stamp
 	dh_link -p$(package) /usr/lib/libgnade$*.so.$($*_soversion) /usr/lib/libgnade$*.so
 	dh_install -p$(package) debian/gnade$*.gpr /usr/share/ada/adainclude

+# dh_installexamples compresses demo.adb. The Debian Ada Policy says
+# to not compress, but any decent editor can read a compressed file.
+libgnadeodbc-example: package := libgnadeodbc$(odbc_aliversion)-dev
+libgnadeodbc-example: debian/tmp/odbc-example-prep/demo.adb
+	dh_installexamples -p$(package) debian/tmp/odbc-example-prep/demo.adb
+
+libgnadesqlite3-example: package := libgnadesqlite3-$(sqlite3_aliversion)-dev
+libgnadesqlite3-example:
+	dh_installexamples -p$(package) samples/sqlite3/demo.adb
+
 # Check the build by running some examples.
 check: patch debian/check-sqlite3-stamp

 # create 'gnade' mysql account, 'gnade' mysql database
 # install 'MySQL' odbc driver, 'gnade_mysql' odbc source
 # assumes mysql root account has no password
-# assumes mysqld has been started; use '/etc/init.d/mysql start'
+# assumes mysqld in main install has been stopped; use 'sudo /etc/init.d/mysql stop'
+# assumes mysqld in main chroot has been started; use 'sudo schroot -- /etc/init.d/mysql start'
 # assumes gnade db and user have not already been created
 debian/odbc-source-stamp:
 	mysqladmin -uroot create gnade
@@ -183,9 +204,7 @@ debian/check-sqlite3-stamp: debian/libgn
 	export LD_LIBRARY_PATH=`pwd`/debian/tmp; debian/tmp/sqlite3-example-obj/demo debian/tmp/demo.db
 	touch $@

-lint: regexp := ^Version: \([0-9.]\+-.\+\)$$
-lint: version := $(shell dpkg-parsechangelog | grep ^Version | sed 's/$(regexp)/\1/')
 lint:
-	cd ..; lintian --lab ../../lint/gnade-$(version) -i gnade*.changes
+	cd ..; lintian -i gnade*.changes

 # end of file