summaryrefslogtreecommitdiffstats
path: root/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules63
1 files changed, 63 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..da12112
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,63 @@
+#!/usr/bin/make -f
+
+SHELL := sh -e
+
+PACKAGE := $(shell dh_listpackages)
+RELEASE := $(word 1, $(subst -0+progress, ,$(shell dpkg-parsechangelog -SVersion)))
+FEATURE := $(word 2, $(subst -$(RELEASE)-, ,$(PACKAGE)))
+PRIORITY := $(subst -,,$(RELEASE))
+
+%:
+ dh ${@}
+
+override_dh_auto_clean:
+ dh_auto_clean
+
+ # debian
+ rm -f debian/$(PACKAGE).desktop debian/$(PACKAGE).lintian-overrides debian/$(PACKAGE).postinst debian/$(PACKAGE).prerm
+
+ # upstream
+ rm -rf eclipse
+
+override_dh_auto_build:
+ dh_auto_build
+
+ # debian
+ for FILE in desktop lintian-overrides postinst prerm; \
+ do \
+ sed -e "s|@PACKAGE@|$(PACKAGE)|g" \
+ -e "s|@RELEASE@|$(RELEASE)|g" \
+ -e "s|@FEATURE@|$(FEATURE)|g" \
+ -e "s|@PRIORITY@|$(PRIORITY)|g" \
+ debian/local/eclipse-ide.$${FILE}.in > debian/$(PACKAGE).$${FILE}; \
+ done
+
+ # upstream
+ tar xf eclipse*.tar.gz
+
+override_dh_auto_install:
+ # upstream
+ mkdir -p debian/$(PACKAGE)/usr/lib
+ mv eclipse debian/$(PACKAGE)/usr/lib/$(PACKAGE)
+
+ # bin
+ mkdir -p debian/$(PACKAGE)/usr/bin
+ sed -e "s|@PACKAGE@|$(PACKAGE)|g" \
+ -e "s|@RELEASE@|$(RELEASE)|g" \
+ -e "s|@FEATURE@|$(FEATURE)|g" \
+ debian/local/eclipse-ide.in > debian/$(PACKAGE)/usr/bin/${PACKAGE}
+
+ # icon
+ cp debian/$(PACKAGE)/usr/lib/$(PACKAGE)/plugins/org.eclipse.platform_*/eclipse256.png debian/$(PACKAGE)/usr/lib/$(PACKAGE)/icon.png
+
+override_dh_dwz:
+ # disabled
+
+override_dh_shlibdeps:
+ # disabled
+
+override_dh_strip:
+ # disabled
+
+override_dh_strip_nondeterminism:
+ # disabled