File: rules

package info (click to toggle)
tycho 0.25.0-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 104,880 kB
  • ctags: 165,013
  • sloc: java: 994,151; ansic: 92,109; xml: 35,919; cpp: 15,327; sh: 1,100; makefile: 207
file content (142 lines) | stat: -rwxr-xr-x 7,062 bytes parent folder | download
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
#!/usr/bin/make -f

PKG=tycho
VER=0.25.0
DTYPE=

UVER=0.25.0
UURL=http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/snapshot/org.eclipse.tycho-tycho-$(UVER).tar.xz

FUURL=https://github.com/rgrunber/fedoraproject-p2

AGGREGATOR_PATH=git://git.eclipse.org/gitroot/platform/eclipse.platform.releng.aggregator.git
TAG=S4_6_0_M6

BINPKG=libtycho-java

%:
	dh $@ --buildsystem=maven

override_dh_auto_configure:
	./debian/eclipse-bootstrap.sh $(CURDIR)
	dh_auto_configure

override_dh_auto_build:
	dh_auto_build -- package -Dmaven.test.skip=true

override_dh_auto_test:

override_dh_auto_install:
	dh_auto_install
	#patch eclipse-application packaging
	cp tycho-bundles/tycho-bundles-external/target/tycho-bundles-external.zip debian/$(BINPKG)/usr/share/maven-repo/org/eclipse/tycho/tycho-bundles-external/$(VER)/tycho-bundles-external-$(VER).zip
	ln -s ../$(VER)/tycho-bundles-external-$(VER).zip debian/$(BINPKG)/usr/share/maven-repo/org/eclipse/tycho/tycho-bundles-external/debian/tycho-bundles-external-debian.zip


.PHONY: get-orig-source
# upstream is http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/snapshot/org.eclipse.tycho-tycho-0.25.0.tar.xz
# plus
# https://github.com/rgrunber/fedoraproject-p2
# plus
# some of eclipse sources
get-orig-source:
	$(if $(wildcard $(PKG)-$(VER)),$(error $(PKG)-$(VER) exist, aborting.))
	mkdir $(PKG)-$(VER)

	@echo "# Downloading Tycho..."
	wget $(UURL)
	tar x -C $(PKG)-$(VER) -f org.eclipse.tycho-tycho-$(UVER).tar.xz
	find $(PKG)-$(VER)/org.eclipse.tycho-tycho-$(UVER) -name '*.jar' -delete
	find $(PKG)-$(VER)/org.eclipse.tycho-tycho-$(UVER) -name '.git*' -delete
	mv $(PKG)-$(VER)/org.eclipse.tycho-tycho-$(UVER)/* $(PKG)-$(VER)
	rmdir $(PKG)-$(VER)/org.eclipse.tycho-tycho-$(UVER)	#should be empty
	$(RM) org.eclipse.tycho-tycho-$(UVER).tar.xz

	@echo "# Downloading Fedora project P2..."
	cd $(PKG)-$(VER) && git clone $(FUURL)
	cd $(PKG)-$(VER)/fedoraproject-p2 && git checkout && $(RM) -r .git .git*

	@echo "# Downloading Eclipse (this may take a long time)..."
	cd $(PKG)-$(VER) && git clone --depth 1 --branch $(TAG)  $(AGGREGATOR_PATH) eclipse-aggregator
	cd $(PKG)-$(VER)/eclipse-aggregator \
	&& git submodule init eclipse.jdt eclipse.jdt.core eclipse.platform.runtime eclipse.platform.team \
	eclipse.platform.swt eclipse.platform.text eclipse.platform.ui eclipse.platform.resources \
	rt.equinox.p2 rt.equinox.bundles rt.equinox.framework \
	&& git submodule update

	@echo "# We keep only Eclipse bundles required by Tycho"
	$(eval SRC:=$(PKG)-$(VER)/eclipse-aggregator)
	$(eval DEST:=$(PKG)-$(VER)/eclipse-bundles)
	mkdir -p $(DEST)

	rsync -r $(SRC)/eclipse.platform.runtime/bundles/org.eclipse.core.runtime $(DEST)
	rsync -r $(SRC)/eclipse.platform.runtime/bundles/org.eclipse.core.contenttype $(DEST)
	rsync -r $(SRC)/eclipse.platform.runtime/bundles/org.eclipse.core.jobs $(DEST)
	rsync -r $(SRC)/rt.equinox.p2/bundles/org.eclipse.equinox.p2.core $(DEST)
	rsync -r $(SRC)/rt.equinox.p2/bundles/org.eclipse.equinox.p2.metadata $(DEST)
	rsync -r $(SRC)/rt.equinox.p2/bundles/org.eclipse.equinox.p2.publisher $(DEST)
	rsync -r $(SRC)/rt.equinox.p2/bundles/org.eclipse.equinox.p2.publisher.eclipse $(DEST)
	rsync -r $(SRC)/rt.equinox.p2/bundles/org.eclipse.equinox.p2.repository $(DEST)
	rsync -r $(SRC)/rt.equinox.p2/bundles/org.eclipse.equinox.p2.metadata.repository $(DEST)
	rsync -r $(SRC)/rt.equinox.p2/bundles/org.eclipse.equinox.p2.artifact.repository $(DEST)
	rsync -r $(SRC)/rt.equinox.p2/bundles/org.eclipse.equinox.p2.jarprocessor $(DEST)
	rsync -r $(SRC)/rt.equinox.p2/bundles/org.eclipse.equinox.simpleconfigurator $(DEST)
	rsync -r $(SRC)/rt.equinox.p2/bundles/org.eclipse.equinox.simpleconfigurator.manipulator $(DEST)
	rsync -r $(SRC)/rt.equinox.p2/bundles/org.eclipse.equinox.frameworkadmin $(DEST)
	rsync -r $(SRC)/rt.equinox.p2/bundles/org.eclipse.equinox.frameworkadmin.equinox $(DEST)
	rsync -r $(SRC)/rt.equinox.framework/bundles/org.eclipse.osgi.util $(DEST)
	rsync -r $(SRC)/rt.equinox.bundles/bundles/org.eclipse.equinox.preferences $(DEST)
	rsync -r $(SRC)/rt.equinox.bundles/bundles/org.eclipse.equinox.preferences $(DEST)
	rsync -r $(SRC)/rt.equinox.bundles/bundles/org.eclipse.equinox.common $(DEST)
	rsync -r $(SRC)/rt.equinox.bundles/bundles/org.eclipse.equinox.security $(DEST)
	rsync -r $(SRC)/rt.equinox.bundles/bundles/org.eclipse.equinox.app $(DEST)
	rsync -r $(SRC)/rt.equinox.bundles/bundles/org.eclipse.equinox.registry $(DEST)
	#here can compile
	rsync -r $(SRC)/rt.equinox.framework/bundles/org.eclipse.osgi.compatibility.state $(DEST)
	rsync -r $(SRC)/rt.equinox.framework/bundles/org.eclipse.osgi $(DEST)
	rsync -r $(SRC)/rt.equinox.p2/bundles/org.eclipse.equinox.p2.repository.tools $(DEST)
	rsync -r $(SRC)/rt.equinox.bundles/bundles/org.eclipse.equinox.app $(DEST)
	rsync -r $(SRC)/rt.equinox.framework/bundles/org.eclipse.osgi.services $(DEST)
	rsync -r $(SRC)/rt.equinox.p2/bundles/org.eclipse.equinox.p2.director $(DEST)
	rsync -r $(SRC)/rt.equinox.p2/bundles/org.eclipse.equinox.p2.engine $(DEST)
	rsync -r $(SRC)/rt.equinox.p2/bundles/org.eclipse.equinox.p2.jarprocessor $(DEST)
	#here can compile
	#need SteppedTimeoutLexicoHelper from sat4j 2.3.4
	rsync -r $(SRC)/rt.equinox.p2/bundles/org.eclipse.equinox.p2.touchpoint.eclipse $(DEST)
	rsync -r $(SRC)/rt.equinox.p2/bundles/org.eclipse.equinox.p2.garbagecollector $(DEST)
	rsync -r $(SRC)/rt.equinox.p2/bundles/org.eclipse.equinox.p2.updatesite $(DEST)
	rsync -r $(SRC)/rt.equinox.p2/bundles/org.eclipse.equinox.p2.director.app $(DEST)
	rsync -r $(SRC)/eclipse.platform.team/bundles/org.eclipse.core.net $(DEST)
	#here can compile
	rsync -r $(SRC)/eclipse.platform.swt/bundles/org.eclipse.swt $(DEST)
	#here can compile
	rsync -r $(SRC)/eclipse.jdt.core/org.eclipse.jdt.core $(DEST)
	rsync -r $(SRC)/eclipse.jdt.core/org.eclipse.jdt.compiler.apt $(DEST)
	rsync -r $(SRC)/eclipse.platform.text/org.eclipse.text $(DEST)
	rsync -r $(SRC)/eclipse.platform.text/org.eclipse.jface.text $(DEST)
	rsync -r $(SRC)/eclipse.platform.ui/bundles/org.eclipse.core.commands $(DEST)
	rsync -r $(SRC)/eclipse.platform.ui/bundles/org.eclipse.jface $(DEST)
	rsync -r $(SRC)/eclipse.platform.runtime/bundles/org.eclipse.core.expressions $(DEST)
	rsync -r $(SRC)/rt.equinox.bundles/bundles/org.eclipse.equinox.bidi $(DEST)
	rsync -r $(SRC)/eclipse.platform.resources/bundles/org.eclipse.core.resources $(DEST)
	rsync -r $(SRC)/eclipse.platform.resources/bundles/org.eclipse.core.filesystem $(DEST)

	$(RM) -rf $(SRC)

	find $(DEST) -type d -name ".git" | xargs rm -rf
	find $(DEST) -type f -name *.jar -delete
	find $(DEST) -type f -name *.class -delete
	find $(DEST) -type f -name *.so -delete
	find $(DEST) -type f -name *.dll -delete
	find $(DEST) -type f -name *.jnilib -delete
	find $(DEST) -type f -name *.exe -delete

	@echo "# Packing..."
	$(RM) -rf $(PKG)_$(VER)$(DTYPE).orig.tar.xz
	find -L "$(PKG)-$(VER)" -xdev -type f -print | LC_ALL=C sort \
	| XZ_OPT="-6v" tar -caf "$(PKG)_$(VER)$(DTYPE).orig.tar.xz" -T- --owner=root --group=root --mode=a+rX

	@echo "# Cleaning up..."
	$(RM) -rf $(PKG)-$(VER)