summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2012-07-02 23:30:20 +0000
committerIgor Pashev <pashev.igor@gmail.com>2012-07-02 23:30:20 +0000
commitb10e03a2848742fc8e2e5b5abaa97839a661067f (patch)
tree835ddd15f0875b19c6fd7932c9e384607aeb78ff
parentbd17df9c406f91ae1a1f629590cd558410aca125 (diff)
downloaddh-illumos-b10e03a2848742fc8e2e5b5abaa97839a661067f.tar.gz
Disable lint, set MACH and BUILD_TOOLS, fix bldenv.sh to respect CTF* variables
-rwxr-xr-xdh_illumos_gate31
1 files changed, 22 insertions, 9 deletions
diff --git a/dh_illumos_gate b/dh_illumos_gate
index 3b09921..decb6de 100755
--- a/dh_illumos_gate
+++ b/dh_illumos_gate
@@ -82,7 +82,7 @@ if (defined($dh{'EXCLUDE'}) && $dh{'EXCLUDE'}) {
}
}
-doit('tar', '-x', '-f', $tarball, @tar_X);
+#doit('tar', '-x', '-f', $tarball, @tar_X);
=item Saving original files
@@ -153,16 +153,11 @@ if ( -e $Makefile_lib) {
);
}
-=item Create F<illumos-gate/illumos.sh>
+=item Create F<illumos-gate/env.sh>
-Copy F<illumos-gate/usr/src/tools/env/illumos.sh> to F<illumos-gate/illumos.sh>
-and make this changes:
+Set C<CODEMGR_WS> to be C<current_dir/illumos-gate>.
-Set empty C<NIGHTLY_OPTIONS>, options are controlled by L<dh_illumos_make(1)>.
-
-Adjust C<CODEMGR_WS> to be C<current_dir/illumos-gate>.
-
-Set C<VERSION> to be C<source_version> by parsing F<debian/chnagelog>.
+Set C<VERSION> to be C<source_version> by parsing F<./debian/chnagelog>.
For example it can be C<uts_5.11.0-15>.
Set C<LD_ALTEXEC=/usr/bin/ld-gnu-to-sun> to call L<sunld(1)>
@@ -170,6 +165,11 @@ instead of GNU L<ld(1)>. Default system GCC is build to use GNU L<ld(1)>,
but L<sunld(1)> is required to build most illumos components.
See L<ld-gnu-to-sun(1)>.
+Set proto area to be F<./debian/tmp>.
+
+Disable C<lint> libraries by replacing C<LINT> with L<true(1)>.
+So it will do nothing. Successfully.
+
=cut
@@ -179,6 +179,7 @@ my $version = $changelog->{'Source'} . '_' . $changelog->{'Version'};
my $cwd = getcwd();
my $env = 'illumos-gate/env.sh';
+my $mach = `uname -p`; chomp $mach;
if (open (ENV, '>', $env)) {
print ENV "export VERSION='$version'\n";
print ENV "export CODEMGR_WS='$cwd/illumos-gate'\n";
@@ -188,6 +189,9 @@ if (open (ENV, '>', $env)) {
print ENV "export __GNUC=''\n";
print ENV "export CW_NO_SHADOW=1\n";
print ENV "export LD_ALTEXEC='/usr/bin/ld-gnu-to-sun'\n";
+ print ENV "export BUILD_TOOLS='/opt'\n";
+ print ENV "export MACH='$mach'\n";
+ print ENV "export LINT='true'\n";
close(ENV);
} else {
error("Failed to write `$env': $!");
@@ -198,6 +202,11 @@ if (open (ENV, '>', $env)) {
Copy F<illumos-gate/usr/src/tools/scripts/bldenv.sh>
to F<illumos-gate/bldenv.sh>.
+Fix definition of C<CTF*> variables, so this script will
+not override them if they are already defined. These variables
+can be set to C<true>, when executing L<dh_illumos_make(1)>
+with option C<--without-ctf>.
+
=cut
my $bldenv_sh = 'illumos-gate/usr/src/tools/scripts/bldenv.sh';
@@ -205,6 +214,10 @@ if (! -f $bldenv_sh) {
error("Could not find `$bldenv_sh'. Is it accidently excluded via -X option?");
}
doit('cp', '-f', $bldenv_sh, 'illumos-gate/bldenv.sh');
+doit('sed', '-r', '-i', '
+ s,export +(CTF.+)="(.+)",export \1="${\1:-\2}",;
+ ', 'illumos-gate/bldenv.sh'
+);
=back