[Pkg-mono-svn-commits] rev 244 - mono/branches/experimental/trunk/debian

Eduard Bloch blade@quantz.debian.org
Sun, 15 Feb 2004 11:52:19 +0100


Author: blade
Date: 2004-02-15 11:52:18 +0100 (Sun, 15 Feb 2004)
New Revision: 244

Added:
   mono/branches/experimental/trunk/debian/dh_mono
Modified:
   mono/branches/experimental/trunk/debian/changelog
   mono/branches/experimental/trunk/debian/rules
Log:

Added an unfinished version of the library package resolver


Modified: mono/branches/experimental/trunk/debian/changelog
===================================================================
--- mono/branches/experimental/trunk/debian/changelog	2004-02-15 05:12:49 UTC (rev 243)
+++ mono/branches/experimental/trunk/debian/changelog	2004-02-15 10:52:18 UTC (rev 244)
@@ -1,6 +1,7 @@
 mono (0.30-0pre1v1) unstable; urgency=low
 
   * New upstream release
+  * SONAME wokraround for libgstreamer-0.6.so.1
 
  -- Eduard Bloch <blade@debian.org>  Sat, 14 Feb 2004 15:02:47 +0100
 

Added: mono/branches/experimental/trunk/debian/dh_mono
===================================================================
--- mono/branches/experimental/trunk/debian/dh_mono	2004-02-15 05:12:49 UTC (rev 243)
+++ mono/branches/experimental/trunk/debian/dh_mono	2004-02-15 10:52:18 UTC (rev 244)
@@ -0,0 +1,197 @@
+#!/usr/bin/perl -w
+
+=head1 NAME
+
+dh_dotnet - calculates .NET dependencies
+
+=cut
+
+use strict;
+use File::Find;
+eval 'use Debian::Debhelper::Dh_Lib';
+print "You need to install the debhelper package in order to use this program!" if $@;
+
+
+=head1 SYNOPSIS
+
+FIXME: document debian/mono.local
+
+B<dh_python> [S<I<debhelper options>>] [B<-n>] [B<-V> I<version>] [S<I<module dirs ...>>]
+
+=head1 DESCRIPTION
+
+dh_python is a debhelper program that is responsible for generating the
+${python:Depends} substitutions and adding them to substvars files. It
+will also add a postinst and a prerm script if required.
+
+The program will look at python scripts and modules in your package, and
+will use this information to generate a dependency on python, with the
+current major version, or on pythonX.Y if your scripts or modules need a
+specific python version. The dependency will be substituted into your
+package's control file wherever you place the token "${python:Depends}".
+
+If some modules need to be byte-compiled at install time, appropriate
+postinst and prerm scripts will be generated. If already byte-compiled
+modules are found, they are removed.
+
+If you use this program, your package should build-depend on python.
+
+=head1 OPTIONS
+
+=over 4
+
+=item I<module dirs>
+
+If your package installs python modules in non-standard directories, you
+can make dh_python check those directories by passing their names on the
+command line. By default, it will check /usr/lib/site-python,
+/usr/lib/$PACKAGE, /usr/share/$PACKAGE, /usr/lib/games/$PACKAGE,
+/usr/share/games/$PACKAGE and /usr/lib/python?.?/site-packages.
+
+Note: only /usr/lib/site-python, /usr/lib/python?.?/site-packages and the
+extra names on the command line are searched for binary (.so) modules.
+
+=item B<-V> I<version>
+
+If the .py files your package ships are meant to be used by a specific
+pythonX.Y version, you can set this option with the desired X.Y python
+version.
+Do not use if you ship modules in /usr/lib/site-python.
+
+=item B<-n>, B<--noscripts>
+
+Do not modify postinst/postrm scripts.
+
+=back
+
+=head1 CONFORMS TO
+
+Debian policy, version 3.5.7
+
+Python policy, version 0.3.7
+
+=cut
+
+init();
+
+my $cli = '/usr/bin/cli';
+
+# The current python major version
+# my $python_major;
+my $mono_version = `$cli -V 2>&1`;
+
+if (!-x "/usr/bin/monodis") {
+	error("Package mono-utils is not installed, aborting. (Probably forgot to Build-Depend on mono-utils.)");
+}
+
+if(system "grep \"Build-Dep.*mono-utils\" debian/control") { 
+   print "Warning: no Build-Depends on mono-utils!\n";
+}
+
+if (! defined $mono_version || $mono_version eq "") {
+	error("Mono is not installed, aborting. (Probably forgot to
+  Build-Depend on cli-virtual-machine.)");
+}
+elsif ($python_version =~ /(mint|version)\ ([\d\.]+)/) {
+	$mono_version = "$2" ;
+} else { 
+	error("Unable to parse Mono version out of \"$mono_version\".");
+}
+
+# The next python version
+#my $python_nextversion = $python_version + 0.1;
+#my $python_nextmajor = $python_major + 1;
+#
+#my @python_allversions = ('1.5','2.1','2.2','2.3');
+#foreach (@python_allversions) {
+#	s/^/python/;
+#}
+
+# Check for -V
+my $usemono = $mono_version;
+if($dh{V_FLAG_SET}) {
+	$usemono = $dh{V_FLAG};
+}
+
+# Cleaning the paths given on the command line
+foreach (@ARGV) {
+	s#/$##;
+	s#^/##;
+}
+
+foreach my $package (@{$dh{DOPACKAGES}}) {
+	my $tmp=tmpdir($package);
+  my %deps;
+  my %libs;
+
+	delsubstvar($package, "mono:Depends"); # for idempotency
+	
+	# find binaries
+	find sub {
+     my $vers;
+     return unless -f and (-x or /\.(pl|dll)$/);
+		local *F;
+		return unless open F, "monodis $_|";
+    while(<F>) {
+       $vers=$1 if /Version=(.*)\n/;
+       $libs{$1}=$vers if /Name=(.*)\n/;
+    }
+		close F;
+	}, $tmp;
+
+	if (%libs) {
+     foreach $lib (keys %libs) {
+        my $kand;
+        if(!$kand) {
+           my $l;
+           open($l, "<debian/mono.local");
+           # FIXME: construct a parser that saves the exact information for
+           # fooBar.dll: PkgName (>=><< versioninfo)
+           $kand = `grep $lib.dll debian/mono.local`
+        }
+
+        $kand = `dlocate /usr/lib/$lib.dll || dpkg -S /usr/lib/$lib.dll`;
+        $kand = `dlocate $lib.dll | grep /usr/share/dotnet` unless $kand;
+        $kand = `dpkg -S $lib.dll | grep /usr/share/dotnet` unless $kand;
+        print "Warning, $lib.dll not found on this system or in debian/mono.local!\n";
+        $kand =~ /^([^:]+)/;
+        $deps{$1} = 0;
+     }
+
+     foreach $pkg (keys %libs) {
+        ($version) = `dpkg -s $perl` =~ /^Version:\s*(\S+)/m
+          unless $ignoreversions;
+       }
+
+#		my $version="";
+#		if ($deps & XS_MODULE or $dh{V_FLAG_SET}) {
+#			($version) = `dpkg -s $perl` =~ /^Version:\s*(\S+)/m
+#				unless $version;
+#			$version = ">= $version";
+#		}
+#		elsif ($deps & PM_MODULE) {
+#			$version = ">= $min_version";
+##		}
+#		
+#		# no need to depend on an un-versioned perl-base -- it's
+#		# essential
+#		addsubstvar($package, "perl:Depends", $perl, $version)
+#			unless $perl eq 'perl-base' && ! length($version);
+#
+#		# add perlapi-<ver> for XS modules
+#		addsubstvar($package, "perl:Depends", "perlapi-$Config{version}")
+#			if $deps & XS_MODULE;
+	}
+}
+
+=head1 SEE ALSO
+
+L<debhelper(7)>
+
+This program is a part of debhelper.
+
+=head1 AUTHOR
+
+Brendan O'Dea <bod@debian.org>
+
+=cut


Property changes on: mono/branches/experimental/trunk/debian/dh_mono
___________________________________________________________________
Name: svn:executable
   + *

Modified: mono/branches/experimental/trunk/debian/rules
===================================================================
--- mono/branches/experimental/trunk/debian/rules	2004-02-15 05:12:49 UTC (rev 243)
+++ mono/branches/experimental/trunk/debian/rules	2004-02-15 10:52:18 UTC (rev 244)
@@ -88,7 +88,7 @@
 	dh_link -s
 	install -m644 -D debian/lintian debian/mono/usr/share/lintian/overrides/mono
 	# the SONAMEs fix
-	perl -pe 's/-0.dll(.*)\.so/-0.dll$$1.so.0/' -i debian/mono-common/etc/mono/config
+	perl -pe 's/-0.dll(.*)\.so/-0.dll$$1.so.0/; s/libgstreamer-0.6.so/libgstreamer-0.6.so.0/;' -i debian/mono-common/etc/mono/config
 #	cd debian; for s in *.shlibs.in ; do sed -e "s/_VERSION_/$(VERSION)/g" < $$s | tee $${s%%.in} | tee $${s%%.shlibs.in}/DEBIAN/shlibs >> shlibs.local ; done
 #	cd debian; for s in *.shlibs.in ; do sed -e "s/_VERSION_/$(VERSION)/g" < $$s | tee $${s%%.in} >> shlibs.local ; done
 	dh_installchangelogs -s