1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
|
#!/usr/bin/make -f
export JAVA_HOME=/usr/lib/jvm/default-java
%:
dh $@
override_dh_auto_build:
dh_auto_build -- provision.cvs
override_dh_auto_clean:
ant distclean
mh_clean
rm -rf bootstrap/configuration/org.eclipse.update \
bootstrap/environment/ee.minimum.jar
override_dh_auto_install:
ant installSDKinDropins -Dprefix=/usr -DdestDir=$(CURDIR)/debian/tmp
DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
CFG_OSGI_BUNDLES_PATH = debian/eclipse-rcp/usr/lib/eclipse/configuration/org.eclipse.osgi/bundles
JNI_SO_PATH := $(CFG_OSGI_BUNDLES_PATH)/*/1/.cp
LAUNCHER_LIB = debian/eclipse-rcp/usr/lib/eclipse/plugins/org.eclipse.equinox.launcher.*/eclipse_*.so
# 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/tmp$(COPY_PLATFORM)
PDEBUILD_INSTALL:=debian/tmp/usr/lib/eclipse/buildscripts/pde-build
PDEBUILDVERSION = $(shell ls debian/tmp/usr/lib/eclipse/dropins/sdk/plugins | grep org.eclipse.pde.build_ | sed 's/org.eclipse.pde.build_//')
override_dh_install:
# move jdt from /usr/lib to /usr/share
cd debian/tmp/usr && mkdir -p share/eclipse/dropins && mv lib/eclipse/dropins/jdt share/eclipse/dropins
# move images from /usr/lib to /usr/share
cd debian/tmp/usr && find lib/ -type f \( -name '*.bmp' -o -name '*.gif' -o -name '*.jpg' -o -name '*.png' \) | perl ../../../debian/extra/imagemv.pl
# remove extra licence file
rm -f debian/tmp/usr/lib/eclipse/plugins/org.apache.ant_*/about_files/LICENSE* \
debian/tmp/usr/lib/eclipse/epl-v10.html \
debian/tmp/usr/lib/eclipse/about_files/lgpl-v21.txt \
debian/tmp/usr/lib/eclipse/about_files/mpl-v11.txt \
debian/tmp/usr/lib/eclipse/about_files/webkit-bsd.txt \
debian/tmp/usr/lib/eclipse/about_files/pixman-licenses.txt \
debian/tmp/usr/lib/eclipse/about_files/about_cairo.html
# Remove symlink and some cruft installed by the upstream install
rm -fr debian/tmp/usr/bin/*
# install the wrapper script
cp debian/extra/eclipse debian/tmp/usr/bin/
chmod 755 debian/tmp/usr/bin/eclipse
# Correct the profile in config.ini - else eclipse will refuse to open the update/install menus.
sed -i 's/SDKProfile/PlatformProfile/' debian/tmp/usr/lib/eclipse/configuration/config.ini
# Set a saner default file limit than "unlimited".
echo 'osgi.bundlefile.limit=100' >> debian/tmp/usr/lib/eclipse/configuration/config.ini
# Remove the unnecessary configuration data (taken from Fedora spec)
find debian/tmp/usr/lib/eclipse -depth -type d -empty -delete
# fix permissions of scripts
### FIXME - update to the new dropins layout (steal from fedora-spec file)
chmod +x debian/tmp/usr/lib/eclipse/dropins/sdk/plugins/org.eclipse.pde.build_*/templates/package-build/*.sh
@echo "*** generate-pdebuild-scripts ***"
mkdir -p `dirname $(COPY_PLATFORM_INSTALL)` `dirname $(PDEBUILD_INSTALL)`
install -m 755 pdebuild/eclipse-copy-platform.sh $(COPY_PLATFORM_INSTALL)
( \
cd debian/tmp/usr/lib/eclipse; \
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_INSTALL)
( \
cd debian/tmp/usr/lib/eclipse; \
for p in $$(ls -d dropins/sdk/plugins/*) ; do \
plugin=$$(basename $$p); \
echo $$p | sed -e"s,^\(.*\),[ ! -e plugins/$$plugin ] \&\& ln -s \$$eclipse/\1 plugins/$$plugin,"; \
done \
) >> $(COPY_PLATFORM_INSTALL)
( \
cd debian/tmp/usr/share/eclipse; \
for p in $$(ls -d dropins/jdt/plugins/*) ; do \
plugin=$$(basename $$p); \
echo $$p | sed -e"s,^\(.*\),[ ! -e plugins/$$plugin ] \&\& ln -s \$$datadir/\1 plugins/$$plugin,"; \
done \
) >> $(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)
dh_install --list-missing
$(if $(wildcard debian/tmp/usr/lib/eclipse/plugins/org.eclipse.core.net.linux.*.jar),dh_install -peclipse-platform debian/tmp/usr/lib/eclipse/plugins/org.eclipse.core.net.linux.*.jar /usr/lib/eclipse/plugins)
$(if $(wildcard debian/tmp/usr/lib/eclipse/plugins/org.eclipse.update.core.linux*.jar),dh_install -peclipse-platform debian/tmp/usr/lib/eclipse/plugins/org.eclipse.update.core.linux*.jar /usr/lib/eclipse/plugins)
dh_install -peclipse-platform build/*/plugins/org.eclipse.core.net/fragments/*/libgnomeproxy*.so \
usr/lib/$(DEB_HOST_MULTIARCH)/jni
find $(CFG_OSGI_BUNDLES_PATH) -depth -type d -a -empty -delete
# Check if we are doing a -B build
[ ! -d debian/eclipse-platform-data ] || debian/rules override_dh_install_indep
chmod 0644 debian/eclipse-rcp/usr/lib/eclipse/about_files/IJG_README
# Operations on arch: all packages - not invoked if building with -B
override_dh_install_indep:
# mv arch-indep plugins from lib to share
cd debian/eclipse-platform-data/usr && find lib/ -type f -path '*lib/eclipse/*' | perl ../../../debian/extra/imagemv.pl
# Expose osgi jars
mkdir -p debian/libequinox-osgi-java/usr/share/java
cd debian/libequinox-osgi-java/usr/share/java && \
for FILE in ../../lib/eclipse/plugins/* ; do \
ln -s $$FILE ; \
ln -s $$FILE `basename $$FILE | sed 's/_.*$$//g'`.jar ; \
done
# Install poms and jars into Maven repo
for pom in $(wildcard debian/poms/*.xml); do \
mh_installpom -v -plibequinox-osgi-java $$pom; \
SUFFIX=`basename $$pom .xml | sed 's/pom-equinox-//'`; \
mh_installjar -v -plibequinox-osgi-java $$pom debian/libequinox-osgi-java/usr/share/java/org.eclipse.$$SUFFIX.jar; \
done
override_dh_md5sums:
# If we are using GCJ, let the build fail at this point.
# We want to check the build log, but not to use the created packages.
! ($(JAVA_HOME)/bin/java -version 2>&1 | grep gcj >/dev/null) || \
(echo "GCJ detected, exiting build now..." && exit 1)
dh_md5sums
|