File: rules

package info (click to toggle)
jawn 0.11.1%2Breally0.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, sid
  • size: 3,304 kB
  • sloc: python: 107; makefile: 19
file content (63 lines) | stat: -rwxr-xr-x 3,492 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
#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

SCALA_VERSION=$(shell scala -version 2>&1 | cut -f 5 -d ' ')
SCALA_MAJOR=$(shell scala -version 2>&1 | cut -f 5 -d ' ' | cut -f 1 -d '.')
SCALA_MINOR=$(shell scala -version 2>&1 | cut -f 5 -d ' ' | cut -f 2 -d '.')
SCALA_BINARY_VERSION=$(SCALA_MAJOR).$(SCALA_MINOR)

%:
	dh $@ --with maven-repo-helper

override_dh_auto_build:
	# parser
	mkdir -p parser/target/classes
	scalac -d parser/target/classes $(shell find parser/src/main/scala -name *.scala)
	cp -R parser/src/main/resources/* parser/target/classes
	jar cf parser/target/jawn-parser.jar -C parser/target/classes .

	# util
	#mkdir -p util/target/classes
	#scalac -d util/target/classes $(shell find util/src/main/scala -name *.scala)
	#jar cf util/target/jawn-util.jar -C util/target/classes .

	# ast
	#mkdir -p ast/target/classes
	#scalac -d ast/target/classes -cp parser/target/jawn-parser.jar:util/target/jawn-util.jar $(shell find ast/src/main/scala -name *.scala)
	#jar cf ast/target/jawn-ast.jar -C ast/target/classes .

	# support/argonaut (requires io.argonaut:argonaut)
	#mkdir -p support/argonaut/target/classes; \
	#scalac -d support/argonaut/target/classes -cp parser/target/jawn-parser.jar:util/target/jawn-util.jar $(shell find support/argonaut/src/main/scala -name *.scala); \
	#jar cf support/argonaut/target/jawn-argonaut.jar -C support/argonaut/target/classes . ; \

	# support/json4s
	mkdir -p support/json4s/target/classes; \
	scalac -d support/json4s/target/classes -cp parser/target/jawn-parser.jar:util/target/jawn-util.jar:/usr/share/java/json4s-core.jar:/usr/share/java/json4s-ast.jar $(shell find support/json4s/src/main/scala -name *.scala); \
	jar cf support/json4s/target/jawn-json4s.jar -C support/json4s/target/classes . ; \

	# support/play (requires com.typesafe.play:play-json)
	#mkdir -p support/play/target/classes; \
	#scalac -d support/play/target/classes -cp parser/target/jawn-parser.jar:util/target/jawn-util.jar $(shell find support/play/src/main/scala -name *.scala); \
	#jar cf support/play/target/jawn-play.jar -C support/play/target/classes . ; \

	# support/rojoma (requires com.rojoma:rojoma-json)
	#mkdir -p support/rojoma/target/classes; \
	#scalac -d support/rojoma/target/classes -cp parser/target/jawn-parser.jar:util/target/jawn-util.jar $(shell find support/rojoma/src/main/scala -name *.scala); \
	#jar cf support/rojoma/target/jawn-rojoma.jar -C support/rojoma/target/classes . ; \

	# support/rojoma-v3 (requires com.rojoma:rojoma-json-v3)
	#mkdir -p support/rojoma-v3/target/classes; \
	#scalac -d support/rojoma-v3/target/classes -cp parser/target/jawn-parser.jar:util/target/jawn-util.jar $(shell find support/rojoma-v3/src/main/scala -name *.scala); \
	#jar cf support/rojoma-v3/target/jawn-rojoma-v3.jar -C support/rojoma-v3/target/classes . ; \

	# support/spray (requires io.spray:spray-json)
	#mkdir -p support/spray/target/classes; \
	#scalac -d support/spray/target/classes -cp parser/target/jawn-parser.jar:util/target/jawn-util.jar $(shell find support/spray/src/main/scala -name *.scala); \
	#jar cf support/spray/target/jawn-spray.jar -C support/spray/target/classes . ; \

get-orig-poms:
	for MODULE in argonaut ast json4s parser play rojoma rojoma-v3 spray util; do \
	    wget https://repo1.maven.org/maven2/org/spire-math/jawn-$${MODULE}_$(SCALA_BINARY_VERSION)/$(DEB_VERSION_UPSTREAM)/jawn-$${MODULE}_$(SCALA_BINARY_VERSION)-$(DEB_VERSION_UPSTREAM).pom -O debian/poms/jawn-$${MODULE}.pom; \
	done