Refresh dh_monoaot to work from a manifest file, debian/installmonoaot, into $PREFIX/mono/lib/aot-cache/$ARCH

Former-commit-id: ededb551d3f504a906f74f62b979a0fabe70bf7e
This commit is contained in:
Jo Shields 2015-01-13 16:18:26 +00:00
parent a9e7cd2c07
commit bb95674019
6 changed files with 40 additions and 26 deletions

44
debian/dh_monoaot vendored
View File

@ -47,31 +47,40 @@ init();
foreach my $package (@{$dh{DOPACKAGES}}) { foreach my $package (@{$dh{DOPACKAGES}}) {
my $tmp = tmpdir($package); my $tmp = tmpdir($package);
my @files; my $monoaot = pkgfile($package, "installmonoaot");
# find binaries if ($monoaot ne '') {
find (sub { # sanity check: do all files listed in the installcligac file exist?
return unless -f and /\.(exe|dll)$/; open MONOAOT, "<$monoaot" or
return unless $File::Find::dir =~ m!^$tmp/usr/lib!; die "E: Can't open $monoaot\n";
while (<MONOAOT>)
my $fullfilename = $File::Find::name; {
chomp;
my $filename = $fullfilename; if (! -f "$tmp$_") {
$filename =~ s/^$tmp//; die "E: Can't find file $tmp$_!\n";
}
verbose_print("fullfilename: $fullfilename"); }
verbose_print("filename: $filename"); close MONOAOT;
push(@files, $filename);
}, $tmp);
if (! $dh{NOSCRIPTS}) { if (! $dh{NOSCRIPTS}) {
foreach my $file (@files) { open MONOAOT, "<$monoaot" or
die "E: Can't open $monoaot\n";
while (<MONOAOT>)
{
chomp;
foreach my $file ($_) {
autoscript($package, "postinst", "postinst-monoaot", autoscript($package, "postinst", "postinst-monoaot",
"s!#FILE#!$file!"); "s!#FILE#!$file!g");
autoscript($package, "prerm", "prerm-monoaot", autoscript($package, "prerm", "prerm-monoaot",
"s!#FILE#!$file.so!"); "s!#FILE#!$file.so!");
} }
} }
close MONOAOT;
}
}
} }
=head1 SEE ALSO =head1 SEE ALSO
@ -83,5 +92,6 @@ This program is a part of cli-common-dev.
=head1 AUTHOR =head1 AUTHOR
Mirco 'meebey' Bauer <meebey@meebey.net> Mirco 'meebey' Bauer <meebey@meebey.net>
Jo Shields <jo.shields@xamarin.com>
=cut =cut

View File

@ -0,0 +1 @@
/usr/lib/mono/4.5/mscorlib.dll

1
debian/mono-mcs.installmonoaot vendored Normal file
View File

@ -0,0 +1 @@
/usr/lib/mono/4.5/mcs.exe

View File

@ -1,4 +1,6 @@
if [ "$1" = "configure" ] if [ "$1" = "configure" ]
then then
/usr/bin/mono --aot -O=all,shared #FILE# > /dev/null 2>&1 MONOARCH=`mono --version | grep Architecture | sed 's/.*: //'`
mkdir -p /usr/lib/mono/aot-cache/${MONOARCH}/
/usr/bin/mono --aot=outfile=/usr/lib/mono/aot-cache/${MONOARCH}/`basename #FILE#.so` -O=all,shared #FILE# > /dev/null 2>&1
fi fi

View File

@ -1 +1 @@
rm -f #FILE# rm -f /usr/lib/mono/aot-cache/`mono --version | grep Architecture | sed 's/.*: //'`/`basename #FILE#`

2
debian/rules vendored
View File

@ -230,8 +230,8 @@ binary-indep: build-stamp install-stamp
dh_fixperms -i dh_fixperms -i
debian/dh_clifixperms -i debian/dh_clifixperms -i
DH_AUTOSCRIPTDIR=$(CURDIR)/debian debian/dh_monoaot -i
dh_installdeb -i dh_installdeb -i
#DH_VERBOSE=1 DH_AUTOSCRIPTDIR=$(CURDIR)/debian debian/dh_monoaot -i
debian/dh_makeclilibs -i -m 1.0 $(DH_INTERNAL_MONO_PARAM) debian/dh_makeclilibs -i -m 1.0 $(DH_INTERNAL_MONO_PARAM)
debian/dh_makeclilibs -p libmono2.0-cil -m 3.6.0 $(DH_INTERNAL_MONO_PARAM) debian/dh_makeclilibs -p libmono2.0-cil -m 3.6.0 $(DH_INTERNAL_MONO_PARAM)
debian/dh_makeclilibs -p libmono-cairo2.0-cil -m 3.2.1 $(DH_INTERNAL_MONO_PARAM) debian/dh_makeclilibs -p libmono-cairo2.0-cil -m 3.2.1 $(DH_INTERNAL_MONO_PARAM)