File: rules

package info (click to toggle)
asm3 3.2-3
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 4,180 kB
  • ctags: 3,898
  • sloc: java: 37,049; xml: 1,814; makefile: 44
file content (55 lines) | stat: -rwxr-xr-x 3,170 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
#!/usr/bin/make -f

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

PACKAGE              := $(DEB_SOURCE_PACKAGE)
VERSION              := $(DEB_UPSTREAM_VERSION)
POM_VERSION          := 3.1
JAVA_HOME            := /usr/lib/jvm/default-java
DEB_JARS             := gnujaxp ant ant-junit junit xalan2 $(JAVA_HOME)/lib/tools.jar
DEB_ANT_BUILD_TARGET := dist
DEB_ANT_BUILDFILE    := build.xml
DEB_ANT_ARGS         := -propertyfile debian/ant.properties -Dproduct.version=$(VERSION)
MAVEN_REPO           := http://repository.sonatype.org/service/local/repositories/central/content

get-orig-pom:
	wget -O debian/poms/asm-parent.pom $(MAVEN_REPO)/asm/asm-parent/$(POM_VERSION)/asm-parent-$(POM_VERSION).pom
	wget -O debian/poms/asm.pom $(MAVEN_REPO)/asm/asm/$(POM_VERSION)/asm-$(POM_VERSION).pom
	wget -O debian/poms/asm-analysis.pom $(MAVEN_REPO)/asm/asm-analysis/$(POM_VERSION)/asm-analysis-$(POM_VERSION).pom
	wget -O debian/poms/asm-commons.pom $(MAVEN_REPO)/asm/asm-commons/$(POM_VERSION)/asm-commons-$(POM_VERSION).pom
	wget -O debian/poms/asm-tree.pom $(MAVEN_REPO)/asm/asm-tree/$(POM_VERSION)/asm-tree-$(POM_VERSION).pom
	wget -O debian/poms/asm-util.pom $(MAVEN_REPO)/asm/asm-util/$(POM_VERSION)/asm-util-$(POM_VERSION).pom
	wget -O debian/poms/asm-xml.pom $(MAVEN_REPO)/asm/asm-xml/$(POM_VERSION)/asm-xml-$(POM_VERSION).pom
	perl -p -i -e 's/<version>$(POM_VERSION)/<version>$(VERSION)/' debian/poms/*.pom

get-orig-source:
		-uscan --download-version $(DEB_UPSTREAM_VERSION) --force-download --rename

binary-post-install/lib$(PACKAGE)-java::
	mh_installpoms -plib$(PACKAGE)-java
	mh_installjar -plib$(PACKAGE)-java -l --usj-name=asm3 debian/poms/asm.pom output/dist/lib/asm-$(VERSION).jar
	mh_installjar -plib$(PACKAGE)-java -l --usj-name=asm3-analysis debian/poms/asm-analysis.pom output/dist/lib/asm-analysis-$(VERSION).jar
	mh_installjar -plib$(PACKAGE)-java -l --usj-name=asm3-commons debian/poms/asm-commons.pom output/dist/lib/asm-commons-$(VERSION).jar
	mh_installjar -plib$(PACKAGE)-java -l --usj-name=asm3-tree debian/poms/asm-tree.pom output/dist/lib/asm-tree-$(VERSION).jar
	mh_installjar -plib$(PACKAGE)-java -l --usj-name=asm3-util debian/poms/asm-util.pom output/dist/lib/asm-util-$(VERSION).jar
	mh_installjar -plib$(PACKAGE)-java -l --usj-name=asm3-xml debian/poms/asm-xml.pom output/dist/lib/asm-xml-$(VERSION).jar
	# make symlinks to the "all" jar
	for FILE in debian/lib$(PACKAGE)-java/usr/share/java/*.jar ; do \
		if [ ! -L "$$FILE" ] ; then \
			rm -f "$$FILE" ; \
			ln -s asm3-all-$(VERSION).jar "$$FILE" ; \
		fi ; \
	done
	# Rename so the versionless link does not cause confusion/conflicts with earlier versions.
	mv output/dist/lib/all/asm-all-$(VERSION).jar output/dist/lib/all/asm3-all-$(VERSION).jar
	jar umf debian/osgi.MF output/dist/lib/all/asm3-all-$(VERSION).jar
	jh_installlibs output/dist/lib/all/asm3-all-$(VERSION).jar

binary-post-install/lib$(PACKAGE)-java-doc::
	dh_install -plib$(PACKAGE)-java-doc output/dist/doc/javadoc/user/* usr/share/doc/libasm3-java-doc/api
	dh_install -plib$(PACKAGE)-java-doc output/dist/examples usr/share/doc/libasm3-java-doc

clean::
	-rm -rf debian/tmp