5
jh_setupenvironment - Prepares a build environment to compile an eclipse feature.
10
use Debian::Debhelper::Dh_Lib;
14
B<jh_setupenvironment> [S<I<debhelper options>>] [B<--pde-build-dir=>I<dir>] [S<I<copy [...]>>]
18
jh_setupenvironment is a javahelper program that handles creating
19
an environment for building an eclipse feature. It does not setup
20
an orbit dir (use jh_generateorbitdir for that). It will copy files
21
specified in debian/eclipse.environment as well as those given on
22
command line into the environment dir. If no files are given per
23
command line and the environment file is not present (or is empty),
24
it will default to "org.eclipse.*"
30
=item debian/eclipse.environment
32
List of file- and directory glob patterns to copy into the build
41
=item B<--pde-build-dir=dir>
43
Specifies where the environment should be or is placed.
47
If passed, jh_setupenvironment will clean up the build environment.
48
When cleaning jh_setupenvironment will not record itself in the
49
debhelper log to avoid confusing dh, when it has to use the log
50
to trace where it was.
57
my $me = basename($0);
61
"pde-build-dir=s" => \$builddir,
62
"clean" => sub { $clean = 1 },
65
$clean = 0 unless(defined($clean) and $clean ne '');
66
$builddir = 'debian/.eclipse-build' unless(defined($builddir));
68
# do not write to the log if we are cleaning.
69
inhibit_log() if($clean);
72
doit("rm", "-fr", $builddir);
73
# clean up after jh_generateorbitdeps - dh_clean tend to miss this file
74
# because it does not "belong" to a package.
75
doit("rm", "-f", "orbitdeps.debhelper");
77
my $bfile = "debian/eclipse.environment";
79
push(@ARGV, filearray($bfile));
81
push(@ARGV, "org.eclipse.*") unless(scalar(@ARGV) > 0);
82
doit("mkdir", "-p", $builddir);
83
complex_doit("cp -far " . join(" ", @ARGV) . " $builddir");
90
jh_setupenvironment org.eclipse.* debian/*.properties
92
Will clone all files and folders starting with "org.eclipse." and all
93
property files in the debian-folder and put them into the environment.
99
This program is a part of javahelper and uses debhelper as backend. There are
100
also tutorials in /usr/share/javahelper.
104
Niels Thykier <niels@thykier.net>
106
=head1 COPYRIGHT AND LICENSE
108
Copyright 2010 by Niels Thykier
110
This tool is free software; you may redistribute it and/or modify
111
it under the terms of GNU GPL 2.