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

54
debian/dh_monoaot vendored
View File

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

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
debian/dh_clifixperms -i
DH_AUTOSCRIPTDIR=$(CURDIR)/debian debian/dh_monoaot -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 -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)