[Pkg-mono-svn-commits] rev 956 - mono/trunk/debian

Eduard Bloch blade@haydn.debian.org
Sat, 12 Jun 2004 10:04:34 -0600


Author: blade
Date: 2004-06-12 10:04:31 -0600 (Sat, 12 Jun 2004)
New Revision: 956

Modified:
   mono/trunk/debian/dh_makenetlibs
   mono/trunk/debian/dh_netdeps
   mono/trunk/debian/mono-utils.manpages
   mono/trunk/debian/rules
Log:
Integration into mono-utils, first manpage for dh_make...


Modified: mono/trunk/debian/dh_makenetlibs
===================================================================
--- mono/trunk/debian/dh_makenetlibs	2004-06-12 16:00:58 UTC (rev 955)
+++ mono/trunk/debian/dh_makenetlibs	2004-06-12 16:04:31 UTC (rev 956)
@@ -11,34 +11,33 @@
 
 =head1 SYNOPSIS
 
-B<dh_makenetlibs> [S<I<debhelper options>>] [B<-m>I<major>] [B<-V>I<[dependancies]>] [B<-n>] [B<-X>I<item>]
+B<dh_makenetlibs> [S<I<debhelper options>>] [B<-m>I<minversion>] [B<-l>I<nextincompatible>] [B<-X>I<item>]
 
 =head1 DESCRIPTION
 
-dh_makenetlibs is a debhelper program that automatically scans for shared
-libraries, and generates a netlibs file for the libraries it finds.
+dh_makenetlibs is a debhelper program that automatically scans for
+versioned .NET assemblies, and generates a netlibs file for the
+libraries it finds.
 
-It also adds a call to ldconfig in the postinst and postrm scripts (in
-V3 mode and above only) to any packages which it finds shared libraries in.
+By default, dh_makenetlibs scans the DLL files in the package
+directories and writes the discovered compatibility data (major/minor,
+build, token) to "netlibs" files int he appropriate packages. The
+dependencies on native shared libs are resolved as good as possible.
 
+However, if a file like debian/package.netlibs is found, this one will
+be installed and no scanning is performed.
+
 =head1 OPTIONS
 
 =over 4
 
-=item B<-m>I<major>, B<--major=>I<major>
-
-Instead of trying to guess the major number of the library with objdump,
-use the major number specified after the -m parameter. This is much less
-useful than it used to be, back in the bad old days when this program
-looked at library filenames rather than using objdump.
-
 =item B<-V>, B<-V>I<dependancies>
 
 =item B<--version-info>, B<--version-info=>I<dependancies>
 
 By default, the netlibs file generated by this program does not make packages
-depend on any particular version of the package containing the shared
-library. It may be necessary for you to add some version dependancy
+depend on any particular version of the package containing the assembly.
+It may be necessary for you to add some version dependancy
 information to the netlibs file. If -V is specified with no dependancy
 information, the current version of the package is plugged into a
 dependancy that looks like "packagename (>= packageversion)". If -V is
@@ -51,10 +50,18 @@
 they won't break. The flip side is that packages might end up with
 dependencies that are too tight and so find it harder to be upgraded.
 
-=item B<-n>, B<--noscripts>
+=item B<-m>I<minversion>
 
-Do not modify postinst/postrm scripts.
+Like -V, but specifies only the version string, the package name comes
+from the package that is actually processed. This option is more
+flexible if you try to set a range of valid versions for different
+assembly packages coming from one source package.
 
+=item B<-l>I<nextincompatible>
+
+Specifies the (expected) version of this package when the compatibility
+to the current assemblies will break.
+
 =item B<-X>I<item>, B<--exclude=>I<item>
 
 Exclude files that contain "item" anywhere in their filename or directory 
@@ -66,21 +73,35 @@
 
  dh_makenetlibs
 
-Assuming this is a package named libfoobar1, generates a netlibs file that
+Assuming this is a package named libfoobar0.9x-cil, generates a netlibs file that
 looks something like:
- libfoobar 1 libfoobar1
+ libfoobar  1.0.2345.0_23a12f34  libfoobar0.9x-cil
 
  dh_makenetlibs -V
 
-Assuming the current version of the package is 1.0-3, generates a netlibs
+Assuming the current version of the package is 0.93-3, generates a netlibs
 file that looks something like:
- libfoobar 1 libfoobar1 (>= 1.0-3)
+ libfoobar 1.0.2345.0_23a12f34 libfoobar0.9x-cil (>= 0.93-3)
 
- dh_makenetlibs -V 'libfoobar1 (>= 1.0)'
+ dh_makenetlibs -V 'libfoobar0.9x-cil (>= 0.92)'
 
 Generates a netlibs file that looks something like:
-  libfoobar 1 libfoobar1 (>= 1.0)
+  libfoobar 1.0.2345.0_23a12f34 libfoobar0.9x-cil (>= 0.92)
 
+Assuming that your package creates libfoobar-cil and liblafasel-cil,
+which are compatible to 0.92 versions but the upstream is going to break
+compatibility in the next version, 0.94:
+
+ dh_makenetlibs -m 0.92 -l 0.94
+
+Generates netlibs file that looks something like:
+
+  libfoobar 1.0.2345.0_23a12f34 libfoobar-cil (>= 0.92), libfoobar-cil (<< 0.94)
+
+and
+
+  liblafasel 1.0.2345.0_23a12f34 liblafasel-cil (>= 0.92), liblafasel-cil (<< 0.94)
+
 =cut
 
 init();
@@ -150,7 +171,20 @@
                 # Remove debian version, if any.
                 $version =~ s/-[^-]+$//;
             }
-            $deps = "$package (>= $version)";
+            if ($dh{V_FLAG_SET}) {
+               if ($dh{V_FLAG} ne '') {
+                  $deps=$dh{V_FLAG};
+               }	
+               else {
+                  $deps = "$package (>= $version)";
+               }
+            }
+            if( defined($dh{M_PARAMS})) {
+               $deps = "$package (>= ".$dh{M_PARAMS}.")";
+            }
+            if( defined($dh{L_PARAMS})) {
+               $deps .= ", $package (<< ".$dh{L_PARAMS}.")";
+            }
             if ( defined($library)
                 && defined($ver)
                 && defined($deps)
@@ -183,11 +217,11 @@
 
 L<debhelper(7)>
 
-This program is a part of debhelper.
+This program is a part of mono-utils.
 
 =head1 AUTHOR
 
-Joey Hess <joeyh@debian.org>
+Eduard Bloch <blade@debian.org>, inspired by dh_makeshlibs by Joey Hess <joeyh@debian.org>
 
 =cut
 

Modified: mono/trunk/debian/dh_netdeps
===================================================================
--- mono/trunk/debian/dh_netdeps	2004-06-12 16:00:58 UTC (rev 955)
+++ mono/trunk/debian/dh_netdeps	2004-06-12 16:04:31 UTC (rev 956)
@@ -126,7 +126,7 @@
 
 my $fh;
 my %libdata;
-open( $fh, "cat /var/lib/dpkg/info/*.netlibs debian/*.netlibs 2>/dev/null |" );
+open( $fh, "cat /var/lib/dpkg/info/*.netlibs debian/*/DEBIAN/netlibs 2>/dev/null |" );
 while (<$fh>) {
     /(\S+)\s+(\S+)\s+(\S+)/;
     $libdata{"$1/$2"} = $3;
@@ -171,54 +171,11 @@
        close F;
     }, $tmp;
 
-    print( keys %depkgs );
-    exit 1;
+    #print( keys %depkgs );
+    #exit 1;
 
-    # we have a list of DLLs in %libs keys
-
-    #  my %libs;
-    #  if (%libs) {
-    #     my %libsLoc; # custom dll-to-pkgname map
-    #     my %minvLoc; # custom pkgname-to-min-version map
-    #     # first create reserve lists from mono.local
-    #     if(-r "debian/monolibs.local") {
-    #        my $l;
-    #        open($l, "<debian/monolibs.local");
-    #        while(<$l>) {
-    #           # syntax: 
-    #           # foobar.dll package-name
-    #           # optional with minimal/maximal version:
-    #           # package-name: (<= any-version-string)
-    #           # set 0 as version string to not match at a spec. version
-    #           if(/^(.+).dll\s(\S+)/) { $libsLoc{$1}=$2; }
-    #           if(/^[^:]+:\s*(.+)\n/) { $minvLoc{$1}=$2; }
-    #        }
-    #     }
-    #
-    #     # fill %deps with pkg names as keys
-    #     foreach my $lib (keys %libs) {
-    #        my $kand = $libsLoc{$lib}; # resolve via local map
-##        $kand = `dlocate -e /usr/lib/$lib.dll || dpkg -S /usr/lib/$lib.dll` 
-    #        $kand = `dpkg -S /usr/lib/$lib.dll` unless $kand;
-##        $kand = `dlocate -e $lib.dll | grep /usr/share/dotnet` unless $kand;
-    #        $kand = `dpkg -S $lib.dll | grep /usr/share/dotnet` unless $kand;
-    #        $kand =~ s/:.*//;
-    #        if($kand) { 
-    #           # we also don't want to have circular deps to this package
-    #           $deps{$kand} = 1 if($kand ne $package);
-    #        }
-    #        else {
-#           print "Warning, $lib.dll not found on this system or in debian/mono.local!\n";
-    #        }
-    #     }
-
-    # some overrides
-    # $minvLoc{"mono-jit"} = ">= 0.29";
-
-    # preset the cli dep
-
     addsubstvar( $package, "net:Depends",
-        "mono-jit (>> 0.29) | cli-virtual-machine" );
+        "mono-jit (>> $mono_version) | cli-virtual-machine", join(", ", (keys %depkgs)) );
 
     #     # finaly resolve the version and add it to substvars
     #     foreach my $pkg (keys %deps) {

Modified: mono/trunk/debian/mono-utils.manpages
===================================================================
--- mono/trunk/debian/mono-utils.manpages	2004-06-12 16:00:58 UTC (rev 955)
+++ mono/trunk/debian/mono-utils.manpages	2004-06-12 16:04:31 UTC (rev 956)
@@ -2,3 +2,4 @@
 debian/man/monograph.1
 debian/man/monosn.1
 debian/tmp/usr/share/man/man1/monodis.1
+debian/dh_*.1

Modified: mono/trunk/debian/rules
===================================================================
--- mono/trunk/debian/rules	2004-06-12 16:00:58 UTC (rev 955)
+++ mono/trunk/debian/rules	2004-06-12 16:04:31 UTC (rev 956)
@@ -62,6 +62,7 @@
 	dh_clean -k
 	dh_installdirs
 	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
+	for x in debian/dh_* ; do chmod +x $$x; pod2man $$x > $$x.1 ; done
 	# this is no longer installed by the build system, why?
 	cp -a ./mono/metadata/monosn $(CURDIR)/debian/tmp/usr/bin
 	# removing trash (real assemblies/libs get build by the mcs source package)
@@ -78,6 +79,7 @@
 	dh_testdir -i
 	dh_testroot -i
 	dh_movefiles -i
+	dh_install -i
 	dh_link -i
 	dh_installchangelogs -i ChangeLog
 	dh_installdocs -i
@@ -98,6 +100,7 @@
 	dh_testdir -s
 	dh_testroot -s
 	dh_movefiles -s
+	dh_install -s
 	dh_link -s
 	install -m644 -D debian/lintian debian/mono/usr/share/lintian/overrides/mono
 	# the SONAMEs fix, done via dpatch now