[SCM] eclipse - Powerful IDE written in java - Debian package. branch, master, updated. 8aeca7c0f6bb42cc53ab63d46403ca4a3b916fcb

Niels Thykier nthykier-guest at alioth.debian.org
Sat Feb 20 23:25:22 UTC 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "eclipse - Powerful IDE written in java - Debian package.".

The branch, master has been updated
       via  8aeca7c0f6bb42cc53ab63d46403ca4a3b916fcb (commit)
      from  797293058cee943ae8507282552ac5d0a79416a2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 8aeca7c0f6bb42cc53ab63d46403ca4a3b916fcb
Author: Niels Thykier <niels at thykier.net>
Date:   Sun Feb 21 00:23:17 2010 +0100

    Created eh_install to install pdebuild plugins/features.
    Updated eclipse.mk to use eh_install
    Moved copy-platform back to eclipse-pde (some of the filenames
     in it are arch-dependent)

-----------------------------------------------------------------------

Summary of changes:
 debian/eclipse-helper.install |    4 +-
 debian/helper/eclipse.mk      |   19 ++++++------
 debian/helper/eh_install      |   62 +++++++++++++++++++++++++++++++++++++++++
 debian/rules                  |   17 ++++++----
 4 files changed, 83 insertions(+), 19 deletions(-)

diff --git a/debian/eclipse-helper.install b/debian/eclipse-helper.install
index 37d19fa..fdd9086 100644
--- a/debian/eclipse-helper.install
+++ b/debian/eclipse-helper.install
@@ -1,2 +1,2 @@
-debian/helper/eclipse-vars.mk usr/share/eclipse-helper/
-debian/helper/eclipse.mk usr/share/eclipse-helper/
+debian/helper/*.mk usr/share/eclipse-helper/
+debian/helper/eh_install usr/bin/
diff --git a/debian/helper/eclipse.mk b/debian/helper/eclipse.mk
index 9d53745..8298265 100644
--- a/debian/helper/eclipse.mk
+++ b/debian/helper/eclipse.mk
@@ -1,8 +1,6 @@
-# Define eclipse / pdebuild related rules.
+ # Define eclipse / pdebuild related rules.
 
-_cdbs_scripts_path ?= /usr/lib/cdbs
 _cdbs_rules_path ?= /usr/share/cdbs/1/rules
-_cdbs_class_path ?= /usr/share/cdbs/1/class
 _eclipse_vars_path ?= /usr/share/eclipse-helper
 
 ifndef _cdbs_class_eclipse
@@ -11,19 +9,14 @@ _cdbs_class_eclipse = 1
 include $(_cdbs_rules_path)/buildcore.mk$(_cdbs_makefile_suffix)
 include $(_eclipse_vars_path)/eclipse-vars.mk
 
-DEB_PHONY_RULES += eclipse-sanity-check
-
 common-build-arch common-build-indep:: debian/stamp-eclipse-build
 
-eclipse-sanity-check:
+# Build rule
+debian/stamp-eclipse-build:
 	@if test "x" = "x$(ECLIPSE_PDEBUILD_DIR)" ; then \
 		echo "You must specify something to build in ECLIPSE_PDEBUILD_DIR" >&2 ;\
 		exit 1 ;\
 	fi
-
-# Build rule
-debian/stamp-eclipse-build: eclipse-sanity-check
-	(test -e $(ECLIPSE_PDEBUILD_DIR) && rm -fr $(ECLIPSE_PDEBUILD_DIR)) || true
 	mkdir -p $(ECLIPSE_PDEBUILD_DIR)
 	cp -a $(ECLIPSE_PDEBUILD_BUILD_INCLUDE) $(ECLIPSE_PDEBUILD_DIR)
 	for tobuild in $(ECLIPSE_BUILD_LIST) ; do \
@@ -31,6 +24,12 @@ debian/stamp-eclipse-build: eclipse-sanity-check
 	done
 	touch debian/stamp-eclipse-build
 
+common-install-arch:: $(patsubst %,eclipse-install/%,$(DEB_ARCH_PACKAGES))
+common-install-indep:: $(patsubst %,eclipse-install/%,$(DEB_INDEP_PACKAGES))
+
+$(patsubst %,eclipse-install/%,$(DEB_ALL_PACKAGES)) ::
+	eh_install -p$(cdbs_curpkg) --pdebuild-build-dir $(ECLIPSE_PDEBUILD_DIR)
+
 clean::
 	rm -f debian/stamp-eclipse-build
 	rm -fr $(ECLIPSE_PDEBUILD_DIR)
diff --git a/debian/helper/eh_install b/debian/helper/eh_install
new file mode 100755
index 0000000..083e7e6
--- /dev/null
+++ b/debian/helper/eh_install
@@ -0,0 +1,62 @@
+#!/usr/bin/perl
+
+use strict;
+use Debian::Debhelper::Dh_Lib;
+
+my %archpackages;
+my $pdebdir = 'debian/.eclipse-build';
+init(options => {
+    "pdebuild-build-dir=s" => \$pdebdir
+});
+inhibit_log();
+
+$pdebdir =~ s@/*$@@;
+$pdebdir = "$pdebdir/build/rpmBuild";
+
+foreach my $arch (getpackages("arch")){
+    $archpackages{$arch} = 1;
+}
+
+foreach my $package (@{$dh{DOPACKAGES}}) {
+    my $installfile = pkgfile($package, "eh-install");
+    my $dropins;
+    my $lineno = 0;
+    my $defdname = undef;
+    next if($installfile eq '');
+    $defdname = $1 if($package =~ m/^eclipse-(.+)/o);
+    $dropins = getDropinsPath($package);
+    open(EH_INSTALL, "<", $installfile) or error("$installfile: $!");
+    while( my $line = <EH_INSTALL> ) {
+	my ($zip, $dname);
+	$line = trim($line);
+	$lineno++;
+	next if($line eq '');
+	($zip, $dname) = split(/\s+/o, $line, 2);
+	$dname = $defdname unless(defined($dname) && length($dname) > 0);
+	error("Syntax error in $installfile at line $lineno") unless(defined($dname) && length($dname) > 0 && length($zip) > 0);
+	error("Cannot find $pdebdir/$zip") unless( -e "$pdebdir/$zip");
+	print "Extacting $pdebdir/$zip into $dropins/$dname\n";
+	doit("mkdir", "-p", "$dropins/$dname");
+	doit("unzip", "-qq", "-n", "-d", "$dropins/$dname", "$pdebdir/$zip");
+    }
+    close(EH_INSTALL);
+}
+
+exit(0);
+
+sub getDropinsPath{
+    my $package = shift;
+    my $prefix = tmpdir($package) . "/usr/"; 
+    $prefix .= exists($archpackages{$package})?"lib":"share";
+    return "$prefix/eclipse/dropins";
+}
+
+sub trim{
+    my $text = shift;
+    chomp($text);
+    $text =~ s/^\s++//o;
+    $text =~ s/\s+$//o;
+    $text =~ s/#.*+$//o;
+    return $text;
+}
+
diff --git a/debian/rules b/debian/rules
index 4092365..fabe2c2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -175,17 +175,20 @@ debian-install-stamp:
 	ln -sf /etc/eclipse.ini $(DEB_DESTDIR)usr/lib/eclipse/eclipse.ini
 	touch $@
 
-COPY_PLATFORM:=debian/eclipse-helper/usr/share/eclipse-helper/copy-platform
-PDEBUILD:=debian/eclipse-helper/usr/share/eclipse-helper/pdebuild
+# This has to go in an arch package, as some of the version numbers
+# depend on which arch it was build one.
+COPY_PLATFORM:=/usr/lib/eclipse/buildscripts/copy-platform
+COPY_PLATFORM_INSTALL:=debian/eclipse-pde$(COPY_PLATFORM)
+PDEBUILD_INSTALL:=debian/eclipse-helper/usr/share/eclipse-helper/pdebuild
 
 generate-pdebuild-scripts: debian-install-stamp
 	@echo "*** generate-pdebuild-scripts ***"
-	mkdir -p `dirname $(COPY_PLATFORM)`
-	cp pdebuild/eclipse-copy-platform.sh $(COPY_PLATFORM)
+	mkdir -p `dirname $(COPY_PLATFORM_INSTALL)` `dirname $(PDEBUILD_INSTALL)`
+	cp pdebuild/eclipse-copy-platform.sh $(COPY_PLATFORM_INSTALL)
 	( \
 	  cd $(DEBIAN_PACK_LIBDIR) ; \
 	  ls -d * | egrep -v '^(plugins|features|about_files|dropins|buildscripts)$$' ; \
 	  ls -d * plugins/* features/* ; \
-	) | sed -e's,^\(.*\),[ ! -e \1 ] \&\& ln -s $$eclipse/\1 \1,' >> $(COPY_PLATFORM)
-	sed -e "s/@PDEBUILDVERSION@/$(PDEBUILDVERSION)/g" -e "s/@COPY_PLATFORM@/$(COPY_PLATFORM)/g" < pdebuild/eclipse-pdebuild.sh > $(PDEBUILD)
-	chmod a+x $(PDEBUILD)
+	) | sed -e's,^\(.*\),[ ! -e \1 ] \&\& ln -s $$eclipse/\1 \1,' >> $(COPY_PLATFORM_INSTALL)
+	sed -e "s/@PDEBUILDVERSION@/$(PDEBUILDVERSION)/g" -e "s/@COPY_PLATFORM@/$(COPY_PLATFORM)/g" < pdebuild/eclipse-pdebuild.sh > $(PDEBUILD_INSTALL)
+	chmod a+x $(PDEBUILD_INSTALL)


hooks/post-receive
-- 
eclipse - Powerful IDE written in java - Debian package.



More information about the pkg-java-commits mailing list