File: rules

package info (click to toggle)
modello 1.0-alpha-8-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,644 kB
  • ctags: 1,749
  • sloc: java: 13,530; xml: 755; makefile: 31
file content (37 lines) | stat: -rwxr-xr-x 2,020 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
#!/usr/bin/make -f

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

PACKAGE              := $(shell dpkg-parsechangelog | egrep '^Source:' | cut -f2 -d' ')
VERSION              := $(shell dpkg-parsechangelog | egrep '^Version:' | sed "s,Version: \(.*\)-.*,\1,g")
JAVA_HOME            := /usr/lib/jvm/java-gcj
ANT_HOME             := /usr/share/ant
DEB_JARS             := $(ANT_HOME)/lib/ant-launcher.jar $(ANT_HOME)/lib/ant-trax.jar /usr/share/java/junit.jar
DEB_ANT_BUILD_TARGET := package javadoc
DEB_ANT_BUILDFILE    := ./debian/build.xml
DEB_ANT_ARGS         := -Dpackage=$(PACKAGE) -Dversion=$(VERSION)
API_DOCS             := build/api
SVN                  := https://svn.codehaus.org/modello/tags/modello-$(VERSION)

get-orig-source:
	echo "Getting version $(VERSION) from $(SVN)"
	rm -rf orig_tmp
	mkdir orig_tmp
	cd orig_tmp && \
		svn export -q $(SVN) $(PACKAGE) && \
		rm -rf modello/modello-maven-plugin modello/modello-plugins-sandbox modello/modello-site && \
		tar czf ../../$(PACKAGE)_$(VERSION).orig.tar.gz $(PACKAGE)
	rm -rf orig_tmp

binary-post-install/lib$(PACKAGE)-java::
	dh_install -plib$(PACKAGE)-java modello-core/build/$(PACKAGE)-core-$(VERSION).jar usr/share/java
	dh_link -plib$(PACKAGE)-java usr/share/java/$(PACKAGE)-core-$(VERSION).jar usr/share/java/$(PACKAGE)-core.jar
	dh_install -plib$(PACKAGE)-java modello-plugins/modello-plugin-xml/build/$(PACKAGE)-plugin-xml-$(VERSION).jar usr/share/java
	dh_link -plib$(PACKAGE)-java usr/share/java/$(PACKAGE)-plugin-xml-$(VERSION).jar usr/share/java/$(PACKAGE)-plugin-xml.jar
	dh_install -plib$(PACKAGE)-java modello-plugins/modello-plugin-xpp3/build/$(PACKAGE)-plugin-xpp3-$(VERSION).jar usr/share/java
	dh_link -plib$(PACKAGE)-java usr/share/java/$(PACKAGE)-plugin-xpp3-$(VERSION).jar usr/share/java/$(PACKAGE)-plugin-xpp3.jar

binary-post-install/lib$(PACKAGE)-java-doc::
	dh_install -plib$(PACKAGE)-java-doc build/api usr/share/doc/lib$(PACKAGE)-java