File: rules

package info (click to toggle)
mina 1.1.7.dfsg-9
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 2,540 kB
  • ctags: 4,121
  • sloc: java: 21,820; xml: 618; makefile: 42; sh: 11
file content (65 lines) | stat: -rwxr-xr-x 2,337 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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

PACKAGE   := $(shell dpkg-parsechangelog | grep '^Source:' | cut -f 2 -d ' ')
VERSION   := $(shell dpkg-parsechangelog | grep '^Version:' | cut -f 2 -d ' ' | sed -r 's/\.dfsg//')

JAVA_HOME := /usr/lib/jvm/default-java
# We need to export JAVA_HOME for jh_build
export JAVA_HOME

# Force compilation of 1.5 .class format
JAVA_OPTS := -source 1.5 -target 1.5

CORE_JAR  := $(PACKAGE)-core.jar
CORE_SRC  := core/src/main/java/
CORE_CP   := /usr/share/java/slf4j-api.jar

ZLIB_JAR  := $(PACKAGE)-filter-compression.jar
ZLIB_SRC  := filter-compression/src/main/java/
ZLIB_CP   := $(CORE_JAR):/usr/share/java/slf4j-api.jar:/usr/share/java/jzlib.jar

SSL_JAR   := $(PACKAGE)-filter-ssl.jar
SSL_SRC   := filter-ssl/src/main/java/
SSL_CP    := $(CORE_JAR):/usr/share/java/slf4j-api.jar

JMX_JAR   := $(PACKAGE)-integration-jmx.jar
JMX_SRC   := integration-jmx/src/main/java/
JMX_CP    := $(CORE_JAR):/usr/share/java/slf4j-api.jar:/usr/share/java/mx4j.jar

SPRING_JAR := $(PACKAGE)-integration-spring.jar
SPRING_SRC := integration-spring/src/main/java/
SPRING_CP  := $(CORE_JAR):/usr/share/java/slf4j-api.jar:/usr/share/java/spring-core.jar:/usr/share/java/spring-beans.jar

ALL_JARS = $(wildcard *.jar)

%:
	dh $@ --with javahelper

override_dh_auto_build:
	# Build the packages
	( CLASSPATH=${CORE_CP} jh_build -J -o"$(JAVA_OPTS)" $(CORE_JAR) $(CORE_SRC)  )
	( CLASSPATH=${ZLIB_CP} jh_build -J -o"$(JAVA_OPTS)" $(ZLIB_JAR) $(ZLIB_SRC) )
	( CLASSPATH=${SSL_CP} jh_build -J -o"$(JAVA_OPTS)" $(SSL_JAR) $(SSL_SRC) )
	( CLASSPATH=${JMX_CP} jh_build -J -o"$(JAVA_OPTS)" $(JMX_JAR) $(JMX_SRC) )
	( CLASSPATH=${SPRING_CP} jh_build -J -o"$(JAVA_OPTS)" $(SPRING_JAR) $(SPRING_SRC) )

override_dh_auto_clean:
	rm -f $(CORE_JAR) $(ZLIB_JAR) $(SSL_JAR) $(JMX_JAR) $(SPRING_JAR)

override_dh_installexamples:
	# Don't include META-INF or LICENSE files from examples
	dh_installexamples -plibmina-java-doc -i -X"META-INF" -X"LICENSE"

override_dh_auto_install:
	for MYJAR in $(ALL_JARS); do \
		BASENAME=`basename $$MYJAR .jar`; \
		SUBPATH=`echo $$BASENAME | sed -e 's/mina\-//'`; \
		mh_installpom -plibmina-java -o $$SUBPATH/pom.xml ; \
		mh_installjar -plibmina-java -n$$BASENAME -l $$SUBPATH/pom.xml $$MYJAR ; \
	done

get-orig-source:
	uscan --force-download --rename