File: rules

package info (click to toggle)
scala 2.11.12-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid
  • size: 62,828 kB
  • sloc: javascript: 28,808; java: 13,415; xml: 3,250; sh: 1,620; python: 756; makefile: 38; awk: 36; ansic: 6
file content (52 lines) | stat: -rwxr-xr-x 2,535 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

#export DH_VERBOSE=1

include $(CURDIR)/build.number
BUNDLE_VERSION="$(version.major).$(version.minor).$(version.patch)"

%:
	dh $@ --with javahelper --with maven_repo_helper

override_dh_auto_build:
	# Build Scala
	ANT_OPTS="-Xmx1024M -Xss64M" \
	ant -Dversion.number=$(BUNDLE_VERSION) \
	    -Dgit.commit.sha=unknown \
	    -Dgit.commit.date=unknown \
	    -Dscaladoc.url=https://github.com/scala/scala/tree/v$(BUNDLE_VERSION)/src \
	    -Djunit.version=4.x \
	    -Dextra.repo.url=file:///usr/share/maven-repo \
	    -Djline.version=2.x \
	    -Dstarr.version=2.11.x \
	    -Dscala-parser-combinators.version.number=debian \
	    -Dscala-xml.version.number=debian \
	    -Dscala-asm.version.number=debian \
	    -Duser.home=debian/tmp \
	    fastdist-opt docs

	for file in scala-library scala-compiler scala-reflect scala-actors; do \
		sed "s/@VERSION@/$(BUNDLE_VERSION)/" debian/poms/$${file}.pom.xml.in > debian/poms/$${file}.pom.xml; \
	done

override_dh_auto_clean:
	rm -rf build dists buildcharacter.properties debian/poms/*.pom.xml
	rm -Rf test/files/jvm/*.log test/files/res/*.log test/files/run/*.log test/files/presentation/*.log

override_dh_compress:
	# rename the versionless links to avoid conflicts with other versions of Scala
	mv debian/scala/usr/share/java/scalap.jar debian/scala/usr/share/java/scalap-2.11.jar
	mv debian/scala/usr/share/java/scala-compiler.jar debian/scala/usr/share/java/scala-compiler-2.11.jar
	mv debian/scala-library/usr/share/java/scala-library.jar debian/scala-library/usr/share/java/scala-library-2.11.jar
	mv debian/scala-library/usr/share/java/scala-reflect.jar debian/scala-library/usr/share/java/scala-reflect-2.11.jar
	mv debian/scala-library/usr/share/java/scala-actors.jar debian/scala-library/usr/share/java/scala-actors-2.11.jar

	# ...but keep compatibility links until a separate scala-2.11 package is created
	cp -a debian/scala/usr/share/java/scalap-2.11.jar debian/scala/usr/share/java/scalap.jar
	cp -a debian/scala/usr/share/java/scala-compiler-2.11.jar debian/scala/usr/share/java/scala-compiler.jar
	cp -a debian/scala-library/usr/share/java/scala-library-2.11.jar debian/scala-library/usr/share/java/scala-library.jar
	cp -a debian/scala-library/usr/share/java/scala-reflect-2.11.jar debian/scala-library/usr/share/java/scala-reflect.jar
	cp -a debian/scala-library/usr/share/java/scala-actors-2.11.jar debian/scala-library/usr/share/java/scala-actors.jar

	dh_compress -X.js -X.scala
	gzip --best -n debian/scala/usr/share/scala-2.11/man/man1/*.1