File: rules

package info (click to toggle)
jruby 1.7.26-1%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 84,572 kB
  • sloc: ruby: 669,910; java: 253,056; xml: 35,152; ansic: 9,187; yacc: 7,267; cpp: 5,244; sh: 1,036; makefile: 345; jsp: 48; tcl: 40
file content (79 lines) | stat: -rwxr-xr-x 2,734 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
#!/usr/bin/make -f

include /usr/share/dpkg/default.mk

export JAVA_HOME=/usr/lib/jvm/default-java
export LC_ALL=en_US.UTF-8

%:
	dh $@ --buildsystem=maven

override_dh_auto_clean:
	dh_auto_clean
	rm -f lib/jruby.jar bin/jruby
	rm -rf -- ./rubyspec_temp/
	cd lib/ruby/shared/ && rm -rf *openssl* ./org

override_dh_auto_build:
	mkdir -p lib/jni
	dh_auto_build -- -Pcomplete
	dh_auto_build -- -Pdist package

# this got ugly fast
# there must be a better way to do this
override_dh_prep:
	dh_prep
	mkdir -p target/package
	tar zxf ./maven/jruby-dist/target/jruby-dist-$(DEB_VERSION_UPSTREAM)-bin.tar.gz \
	  -C target/package --strip-components=1
	cd target/package/bin && mv jruby.bash jruby
	cd target/package/bin && chmod 0755 *
	rm target/package/lib/ruby/2.0/rdoc/generator/template/darkfish/js/jquery.js
	mkdir -p target/package/lib/ruby/gems/shared/
	cd target/package/lib/ruby/gems/shared/ && mkdir -p cache gems specifications
	rm -rf target/package/tool/nailgun/*
	for platform in i386-Linux x86_64-Linux arm-Linux; do \
		mkdir -p target/package/lib/jni/$$platform ; \
	done

override_dh_auto_install:
	mh_installpom -pjruby --no-parent core/pom.xml
	mh_installjar -pjruby --java-lib  core/pom.xml core/target/jruby-core-$(DEB_VERSION_UPSTREAM).jar
	for subp in noasm stdlib complete; do \
		mh_installpom -pjruby --no-parent maven/jruby-$$subp/pom.xml ; \
	done
	mh_installjar -pjruby maven/jruby-stdlib/pom.xml maven/jruby-stdlib/target/jruby-stdlib-$(DEB_VERSION_UPSTREAM).jar
	mh_installjar -pjruby maven/jruby-complete/pom.xml maven/jruby-complete/target/jruby-complete-$(DEB_VERSION_UPSTREAM).jar

override_dh_install:
	dh_install
	dh_install core/target/jruby-core-$(DEB_VERSION_UPSTREAM)-noasm.jar \
		usr/share/maven-repo/org/jruby/jruby-core/$(DEB_VERSION_UPSTREAM)

override_dh_link:
	dh_link
	dh_link usr/share/maven-repo/org/jruby/jruby-core/$(DEB_VERSION_UPSTREAM)/jruby-core-$(DEB_VERSION_UPSTREAM)-noasm.jar \
		usr/share/maven-repo/org/jruby/jruby-core/debian/jruby-core-debian-noasm.jar

override_dh_auto_test:
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
	# setup links to jruby-openssl library, so tests relying on that can work
	for file in /usr/share/jruby/lib/ruby/shared/*ssl* \
	/usr/share/jruby/lib/ruby/shared/*org*; do \
		ln -s $$file ./lib/ruby/shared ; \
	done

	dh_auto_test -- -Ptest test
	./bin/jruby spec/mspec/bin/mspec ci
	./bin/jruby -S ./bin/rake spec:ruby:fast
	# many tests are broken in test:extended, help is needed to debug them
	#./bin/jruby -S ./bin/rake test:extended

	# remove links to jruby-openssl library
	for file in ./lib/ruby/shared/*ssl* ./lib/ruby/shared/*org*; do \
		unlink $$file ; \
	done
endif

get-orig-source:
	uscan --verbose --download-current-version