File: rules

package info (click to toggle)
junit 3.8.2-9
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 1,704 kB
  • sloc: java: 1,762; sh: 43; makefile: 34; xml: 26
file content (47 lines) | stat: -rwxr-xr-x 1,524 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
#!/usr/bin/make -f

JAVA_HOME	:= /usr/lib/jvm/default-java

JAVAC 		= $(JAVA_HOME)/bin/javac
JAR		= $(JAVA_HOME)/bin/jar
CLASSPATH 	= .
JAVADOC		= $(JAVA_HOME)/bin/javadoc
JARNAME		= junit.jar

DEB_UPSTREAM_VERSION := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2 | cut -d- -f1)
UPSTREAM_VERSION     := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2 | cut -d- -f1 | cut -d~ -f2)

%:
	dh $@ --with maven_repo_helper

override_dh_auto_configure:
	(mkdir src; cd src; ${JAR} xvf ../src.jar)

override_dh_auto_build:
	mkdir -p classes
	(cd src;${JAVAC} -source 1.7 -target 1.7 -classpath ${CLASSPATH} -d ../classes junit/*/*.java)
	cp -r src/junit/swingui/icons classes/junit/swingui
	cp src/junit/runner/*.gif classes/junit/runner
	cp src/junit/runner/excluded.properties classes/junit/runner
	(${JAR} cvmf debian/MANIFEST.MF ${JARNAME} -C classes junit)
	mkdir -p doc/api
	(cd src;${JAVADOC} -d ../doc/api junit.framework junit.awtui junit.swingui junit.runner junit.textui junit.extensions)

override_dh_install:
	-rm -f javadoc/package-list
	install -m 755 debian/junit.sh debian/junit/usr/bin/junit

override_dh_clean:
	dh_clean
	-rm -rf classes doc ${JARNAME}
	-rm -f `find . -name "*~"`
	-rm -rf src
	-rm -rf debian/tmp

get-orig-pom:
	wget -O debian/pom.xml http://repository.sonatype.org/service/local/repositories/central/content/junit/junit/${UPSTREAM_VERSION}/junit-${UPSTREAM_VERSION}.pom

get-orig-source:
	-uscan --download-version ${DEB_UPSTREAM_VERSION} --force-download --rename