File: rules

package info (click to toggle)
checkstyle 4.4%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 6,440 kB
  • ctags: 7,629
  • sloc: java: 47,540; xml: 15,957; makefile: 32; sh: 4
file content (45 lines) | stat: -rwxr-xr-x 1,935 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
#!/usr/bin/make -f
# debian/rules for checkstyle (uses CDBS)

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

export CLASSPATH=./target/checkstyle/

include /usr/share/cdbs/1/rules/simple-patchsys.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/ant.mk

JAVA_HOME	     := /usr/lib/jvm/default-java/
ANT_HOME             := /usr/share/ant
DEB_JARS             := junit commons-beanutils commons-collections commons-logging regexp antlr commons-cli $(ANT_HOME)/lib/ant-nodeps.jar velocity jdom1 xercesImpl logkit log4j-1.2
VERSION              := $(shell echo $(DEB_UPSTREAM_VERSION) | sed 's/+.*//')
DOWNLOAD             := http://heanet.dl.sourceforge.net/sourceforge/checkstyle/checkstyle-src-$(VERSION).tar.gz
#DEB_ANT_ARGS := -verbose
DEB_ANT_BUILD_TARGET := build.bindist #compile.checkstyle #javadoc
PACKAGE              := $(DEB_SOURCE_PACKAGE)

get-orig-source:
	echo "Getting $(DOWNLOAD)"
	mkdir orig_tmp
	cd orig_tmp && \
	wget -O - $(DOWNLOAD) | tar xzf - && \
	rm -rf */lib/* && \
	tar czf ../../$(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_VERSION).orig.tar.gz .
	rm -rf orig_tmp

makebuilddir/checkstyle::
	fromdos build.xml

clean::
	todos build.xml

binary-post-install/checkstyle::
	dh_install target/dist/$(PACKAGE)-$(VERSION)/$(PACKAGE)-$(VERSION).jar usr/share/java
	dh_install target/dist/$(PACKAGE)-$(VERSION)/$(PACKAGE)-optional-$(VERSION).jar usr/share/java
	dh_link usr/share/java/$(PACKAGE)-$(VERSION).jar usr/share/java/$(PACKAGE).jar
	dh_link usr/share/java/$(PACKAGE)-optional-$(VERSION).jar usr/share/java/$(PACKAGE)-optional.jar
	find target/checkstyle -name '*.dtd' -exec dh_install {} usr/share/checkstyle/dtd \;
	find target/dist -name '*.xsl' -exec dh_install {} usr/share/checkstyle/xsl \;
	dh_install target/dist/$(PACKAGE)-$(VERSION)/sun_checks.xml usr/share/checkstyle
	dh_install target/dist/$(PACKAGE)-$(VERSION)/checkstyle_checks.xml usr/share/checkstyle