summaryrefslogtreecommitdiffstats
path: root/debian/rules
blob: da12112ca0c58e74001b60005cd994d9cb46e256 (plain)
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
#!/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