Skip to content
Commits on Source (2)
eclipse-debian-helper (1.4) unstable; urgency=medium
* Team upload.
* Support other bundle dirrectories than 'bundles' and the base directory
-- Jochen Sprickerhof <jspricke@debian.org> Fri, 19 Oct 2018 13:13:21 +0200
eclipse-debian-helper (1.3) unstable; urgency=medium
* Add a symlink in /usr/lib/eclipse/plugins/ when installing a plugin
......
......@@ -97,7 +97,7 @@
<not><equals arg1="@{shortname}" arg2="" /></not>
<then><var name="shortname.@{name}" value="@{shortname}"/></then>
</if>
<concat destfile="debian/bundles.properties" append="true">@{name} ${bundle.version.@{name}} ${shortname.@{name}} lib${shortname.@{name}}-java ${bundle.depends.@{name}}${line.separator}</concat>
<concat destfile="debian/bundles.properties" append="true">@{name} ${bundle.version.@{name}} ${shortname.@{name}} lib${shortname.@{name}}-java ${bundle.depends.@{name}} @{basedir}${line.separator}</concat>
<!-- Prepare the pom to be installed in the package -->
<copy file="${bundle.dir.@{name}}/pom.xml" todir="${bundle.dir.@{name}}/target"/>
......
......@@ -7,6 +7,7 @@ package Debian::Debhelper::Buildsystem::eclipse_bundles;
use strict;
use warnings;
use File::Basename;
use parent qw(Debian::Debhelper::Buildsystem);
use Debian::Debhelper::Dh_Lib qw(%dh addsubstvar);
......@@ -50,7 +51,9 @@ sub build {
push(@args, "-Dbasedir", ".");
push(@args, "-Dbundledir", $this->{bundledir});
push(@args, "-f", "debian/build.xml");
push(@args, @{$this->{bundles}});
for my $bundle (@{$this->{bundles}}) {
push(@args, basename($bundle));
}
# Set the username to improve the reproducibility
push(@args, "-Duser.name", "debian");
......@@ -72,16 +75,17 @@ sub install {
my $shortname = $fields[2];
my $package = $fields[3];
my $dependencies = $fields[4];
my $basedir = $fields[5];
# Install the Maven artifacts
$this->doit_in_builddir("mh_installpom", "-p$package", "--no-parent", "-e$version", "$this->{bundledir}/$bundle/target/pom.xml");
$this->doit_in_builddir("mh_installjar", "-p$package", "--java-lib", "-e$version", "--usj-name=$shortname", "$this->{bundledir}/$bundle/target/pom.xml", "$this->{bundledir}/$bundle/target/$bundle.jar");
$this->doit_in_builddir("mh_installpom", "-p$package", "--no-parent", "-e$version", "$basedir/$bundle/target/pom.xml");
$this->doit_in_builddir("mh_installjar", "-p$package", "--java-lib", "-e$version", "--usj-name=$shortname", "$basedir/$bundle/target/pom.xml", "$basedir/$bundle/target/$bundle.jar");
# Specify the bundle dependencies in the substvars file
addsubstvar($package, "bundle:Depends", $dependencies);
# Add a symlink in /usr/lib/eclipse/plugins/ for plugins
open(PROJECT_FILE, "$this->{bundledir}/$bundle/.project");
open(PROJECT_FILE, "$basedir/$bundle/.project");
if (grep{/org.eclipse.pde.PluginNature/} <PROJECT_FILE>) {
$this->doit_in_builddir("dh_link", "-p$package", "/usr/share/java/$shortname.jar", "/usr/lib/eclipse/plugins/${bundle}_${version}.jar");
}
......