debian swirl logo

Back to the packages list glassfish

#!/usr/bin/make -f

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

JAVA_HOME               := /usr/lib/jvm/default-java
DEB_ANT_BUILDFILE	:= debian/build.xml
DEB_DESTDIR		:= $(CURDIR)/debian/tmp
DEB_JARS                := jaxrpc

ALL_JARS := $(wildcard publish/glassfish/lib/*.jar)
ALL_JARS += $(wildcard */build/release/*.jar)
DEST_DIR = $(DEB_DESTDIR)/usr/share/java

clean::
		$(RM) -r debian/poms

# The first invokation of ant fails sometimes
# http://ant.apache.org/manual/Tasks/jar.html
# "Please note that ZIP files store file modification times with
# a granularity of two seconds. If a file is less than two seconds
# newer than the entry in the archive, Ant will not consider it newer."
debian/stamp-ant-build:
		$(DEB_ANT_INVOKE) $(DEB_ANT_BUILD_TARGET) || \
		  $(DEB_ANT_INVOKE) $(DEB_ANT_BUILD_TARGET)
		touch debian/stamp-ant-build

common-install-prehook-indep::
		for jar in $(ALL_JARS); do                         \
	  BASENAME= glassfish-`basename $$jar .jar`;        \
	  FULLNAME= $$BASENAME-$(DEB_UPSTREAM_VERSION).jar; \
		  install -m 644 -D $$jar $(DEST_DIR)/$$FULLNAME;  \
		  ln -sf $$FULLNAME $(DEST_DIR)/$$BASENAME.jar;     \
		done

install/glassfish-mail::
		mh_installpom -pglassfish-mail debian/poms/mail.xml
		mh_installjar -pglassfish-mail debian/poms/mail.xml \
		  publish/glassfish/lib/mail.jar /usr/share/java/glassfish-mail.jar

install/glassfish-javaee::
		mh_installpom -pglassfish-javaee debian/poms/ejb-api.xml
		mh_installjar -pglassfish-javaee debian/poms/ejb-api.xml \
		  ejb-api/build/release/ejb-api.jar \
		  /usr/share/java/glassfish-ejb-api.jar
		mh_installpom -pglassfish-javaee debian/poms/jstl.xml
		mh_installjar -pglassfish-javaee debian/poms/jstl.xml \
		  publish/glassfish/lib/appserv-jstl.jar \
		  /usr/share/java/glassfish-appserv-jstl.jar
		mh_installpom -pglassfish-javaee debian/poms/jta.xml
		mh_installjar -pglassfish-javaee debian/poms/jta.xml \
		  transaction-api/build/release/jta.jar \
		  /usr/share/java/glassfish-jta.jar
		mh_installpom -pglassfish-javaee debian/poms/jpa.xml
		mh_installjar -pglassfish-javaee debian/poms/jpa.xml \
		  persistence-api/build/release/persistence-api.jar \
		  /usr/share/java/glassfish-jpa.jar
		cd jms-api/build && jar cf jms.jar javax
		mh_installpom -pglassfish-javaee debian/jms.pom
		mh_installjar -pglassfish-javaee debian/jms.pom \
		  jms-api/build/jms.jar /usr/share/java/glassfish-jms.jar
		mh_installpom -pglassfish-javaee debian/jee.pom
		mh_installjar -pglassfish-javaee debian/jee.pom \
		  publish/glassfish/lib/javaee.jar /usr/share/java/glassfish-javaee.jar

install/glassfish-activation::
		mh_installpom -pglassfish-activation debian/poms/activation.xml
		mh_installjar -pglassfish-activation debian/poms/activation.xml \
		  publish/glassfish/lib/activation.jar \
		  /usr/share/java/glassfish-activation.jar

install/glassfish-jmac-api::
		mh_installpom -pglassfish-jmac-api debian/jmac-api.pom
		mh_installjar -pglassfish-jmac-api debian/jmac-api.pom \
          publish/glassfish/lib/jmac-api.jar /usr/share/java/glassfish-jmac-api.jar

install/glassfish-toplink-essentials::
		mh_installpom -pglassfish-toplink-essentials debian/poms/toplink.xml
		mh_installjar -pglassfish-toplink-essentials debian/poms/toplink.xml \
		  entity-persistence/build/release/toplink-essentials.jar \
		  /usr/share/java/glassfish-toplink-essentials.jar
		mh_installpom -pglassfish-toplink-essentials debian/poms/toplink-agent.xml
		mh_installjar -pglassfish-toplink-essentials debian/poms/toplink-agent.xml \
		  entity-persistence/build/release/toplink-essentials-agent.jar \
		  /usr/share/java/glassfish-toplink-essentials-agent.jar

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

Builds:

glassfish-activation
open source java ee 5 application server
glassfish-appserv
open source java ee 5 application server
glassfish-javaee
open source java ee 5 application server
glassfish-jmac-api
open source java ee 5 application server
glassfish-mail
open source java ee 5 application server
glassfish-toplink-essentials
open source java ee 5 application server