File: rules

package info (click to toggle)
scala-parser-combinators 1.0.3-3
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 364 kB
  • ctags: 9
  • sloc: xml: 59; sh: 21; makefile: 19
file content (28 lines) | stat: -rwxr-xr-x 1,056 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
#!/usr/bin/make -f

%:
	dh $@ --with maven_repo_helper

PACKAGE=$(shell dpkg-parsechangelog --show-field Source)

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)
VERSION=$(shell dpkg-parsechangelog | sed -rne 's/^Version: ([0-9.]+)[-+].*$$/\1/p')

override_dh_auto_build:
	mkdir -p target/classes
	scalac -d target/classes $(shell find src/main/scala -name *.scala)
	
	echo "scala.version.number=$(SCALA_VERSION)"               >> target/classes/$(PACKAGE).properties
	echo "scala.binary.version.number=$(SCALA_BINARY_VERSION)" >> target/classes/$(PACKAGE).properties
	echo "version.number=$(VERSION)"                           >> target/classes/$(PACKAGE).properties
	
	jar cfm target/$(PACKAGE).jar debian/manifest -C target/classes .

override_dh_auto_clean:
	rm -Rf target

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