File: rules

package info (click to toggle)
castor 1.3.2-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 44,968 kB
  • sloc: java: 206,032; xml: 95,088; sql: 14,460; sh: 365; makefile: 43
file content (57 lines) | stat: -rwxr-xr-x 1,935 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
53
54
55
56
57
#!/usr/bin/make -f

export JAVA_HOME=/usr/lib/jvm/default-java
VERSION := $(shell dpkg-parsechangelog | grep '^Version:' | cut -f 2 -d ' ' | sed 's/-[^-]*$$//')

%:
	dh $@ --with javahelper

override_dh_auto_build:
	cd src && ant release -Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5
	tar zxf dist/castor-*-doc.tgz -C target
	rm -f target/doc/*license*

override_dh_install:
	dh_install -Xjavadoc
	# XML module
	mh_installpom -plibcastor-xml-java --no-parent xml/pom.xml
	mh_installjar -plibcastor-xml-java -l xml/pom.xml \
		dist/castor-xml-$(VERSION).jar
	# Core module
	mh_installpom -plibcastor-core-java --no-parent core/pom.xml
	mh_installjar -plibcastor-core-java -l core/pom.xml \
		dist/castor-core-$(VERSION).jar
	# JDO module
	mh_installpom -plibcastor-jdo-java --no-parent cpa/pom.xml
	mh_installjar -plibcastor-jdo-java -l cpa/pom.xml \
		dist/castor-jdo-$(VERSION).jar
	# Codegen module
	mh_installpom -plibcastor-codegen-java --no-parent codegen/pom.xml
	mh_installjar -plibcastor-codegen-java -l codegen/pom.xml \
		dist/castor-codegen-$(VERSION).jar
	# Ant tasks
	mh_installpom -plibcastor-anttasks-java --no-parent anttask/pom.xml
	mh_installjar -plibcastor-anttasks-java -l anttask/pom.xml \
		dist/castor-anttasks-$(VERSION).jar
	# DDLgen module
	mh_installpom -plibcastor-ddlgen-java --no-parent ddlgen/pom.xml
	mh_installjar -plibcastor-ddlgen-java -l ddlgen/pom.xml \
		dist/castor-ddlgen-$(VERSION).jar
	# XML Schema module
	mh_installpom -plibcastor-xml-schema-java --no-parent schema/pom.xml
	mh_installjar -plibcastor-xml-schema-java -l schema/pom.xml \
		dist/castor-xml-schema-$(VERSION).jar

override_dh_auto_clean:
	-cd src && ant distclean
	mh_clean
	cd cpa/target/generated-sources && rm -rf jjtree javacc

get-orig-source:
	cd $(dir $(firstword $(MAKEFILE_LIST)))../ && \
	uscan \
		--verbose \
		--no-symlink \
		--destdir $(CURDIR)      \
		--watchfile debian/watch \
		--force-download