File: rules

package info (click to toggle)
jfractionlab 0.92-1
  • links: PTS
  • area: main
  • in suites: buster, sid
  • size: 5,460 kB
  • sloc: java: 10,103; sh: 182; makefile: 75
file content (96 lines) | stat: -rwxr-xr-x 3,010 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#!/usr/bin/make -f
# -*- makefile -*-

JAVA_HOME=/usr/lib/jvm/default-java
UNOIL_PATH1= $(shell dpkg -L libreoffice-java-common | grep share | grep unoil.jar|head -1)
UNOIL_PATH2= $(shell dpkg -L openoffice-java-common | grep share | grep unoil.jar|head -1)
UNOIL_PATH=$(UNOIL_PATH1)$(UNOIL_PATH2)
CLASSPATH=src:/usr/share/java/tablelayout.jar:/usr/share/java/java_uno.jar:/usr/share/java/juh.jar:/usr/share/java/jurt.jar:/usr/share/java/ridl.jar:/usr/share/java/unoloader.jar:$(UNOIL_PATH)
#export VERSION = $(shell head -1 debian/changelog | cut -f2 -d\( | cut -f1 -d\) | cut -f1 -d\-)

build: build-arch build-indep
build-arch: build-stamp

build-indep: build-stamp

JAVA_ARGS=-source 1.8 -target 1.8 -encoding ISO-8859-1

build-stamp:
	dh_testdir
	#compile java sources
	find src/jfractionlab -name *.java -and -type f -print0 | xargs -0 /usr/bin/javac -client ${JAVA_ARGS} -cp ${CLASSPATH}
	find src/lang -name *.java -and -type f -print0 | xargs -0 /usr/bin/javac -client ${JAVA_ARGS} -cp ${CLASSPATH}
	#create help jars:
	/usr/bin/jar cf Help_de.jar -C doc/help_de/ .
	/usr/bin/jar cf Help_en.jar -C doc/help_en/ .
	/usr/bin/jar cf Help_es.jar -C doc/help_es/ .
	/usr/bin/jar cf Help_fr.jar -C doc/help_fr/ .
	/usr/bin/jar cf Help_pt.jar -C doc/help_pt/ .
	#move stuff to do the main jar:
	mkdir -p build/jfractionlab/displays
	mkdir -p build/jfractionlab/exerciseDialogs
	mkdir -p build/jfractionlab/exerciseGenerator
	mkdir -p build/jfractionlab/jflDialogs
	mkdir -p build/jfractionlab/logtable
	mkdir -p build/jfractionlab/officeMachine
	mkdir -p build/lang	
	mv src/jfractionlab/displays/*class build/jfractionlab/displays
	mv src/jfractionlab/exerciseDialogs/*class build/jfractionlab/exerciseDialogs
	mv src/jfractionlab/exerciseGenerator/*class build/jfractionlab/exerciseGenerator
	mv src/jfractionlab/jflDialogs/*class build/jfractionlab/jflDialogs
	mv src/jfractionlab/logtable/*class build/jfractionlab/logtable
	mv src/jfractionlab/officeMachine/*class build/jfractionlab/officeMachine
	mv src/jfractionlab/*class build/jfractionlab
	mv src/lang/*class build/lang
	cp src/lang/*properties build/lang
	mv Help_*.jar build/
	cp -a icons build
	cp debian/myManifest build/
	#make application jar:
	/usr/bin/jar cmf debian/myManifest JFractionLab.jar -C build/ .
	
	touch $@

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp
	find . -name "*.jar" -delete
	find . -name "*.class" -delete
	chmod 644 icons/*
	rm -f src/myManifest
	rm -Rf build
	dh_clean 

install: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs
	dh_lintian


binary-arch: build install


# Build architecture-dependent files here.
binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs
	dh_installdocs
	dh_installexamples
	dh_install 
	dh_installmenu
	dh_installman debian/*.1
	dh_link
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build-indep build-arch build clean binary-indep binary-arch binary install