File: rules

package info (click to toggle)
tomcat8 8.5.39-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 35,876 kB
  • sloc: java: 323,004; xml: 54,118; jsp: 3,440; sh: 1,463; perl: 315; makefile: 33
file content (47 lines) | stat: -rwxr-xr-x 1,834 bytes parent folder | download | duplicates (2)
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

include /usr/share/dpkg/pkg-info.mk

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

ANT       := ant -propertyfile debian/ant.properties \
             -Dyear=$(shell date --date='@$(SOURCE_DATE_EPOCH)' --utc +'%Y') \
             -Dtoday='$(shell LC_ALL=C date --date='@$(SOURCE_DATE_EPOCH)' --utc +'%b %-d %Y')' \
             -Dtoday-iso-8601=$(shell date --date='@$(SOURCE_DATE_EPOCH)' --utc +'%F') \
             -Dtstamp=$(shell date --date='@$(SOURCE_DATE_EPOCH)' --utc +%H:%M:%S) \
             -Ddistribution.name=$(shell lsb_release -si)

%:
	dh $@ --with maven-repo-helper --with javahelper

override_dh_auto_build:
	$(ANT) extras-jmx-remote deploy embed-jars

	# Prepare the Maven artifacts
	mkdir -p debian/poms
	cp res/maven/*.pom debian/poms
	perl -p -i -e 's/\@MAVEN.DEPLOY.VERSION\@/$(DEB_VERSION_UPSTREAM)/' debian/poms/*.pom

override_dh_auto_test:
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
	mkdir -p webapps/examples/WEB-INF/lib
	cp /usr/share/java/taglibs-standard-spec.jar webapps/examples/WEB-INF/lib/taglibs-standard-spec-1.2.5.jar
	cp /usr/share/java/taglibs-standard-impl.jar webapps/examples/WEB-INF/lib/taglibs-standard-impl-1.2.5.jar
	$(ANT) test -Dtest.apr.loc=/usr/lib/$(shell dpkg-architecture --query DEB_BUILD_MULTIARCH) -Dtest.verbose=false
endif

override_dh_installchangelogs:
	cp debian/tomcat8.NEWS debian/tomcat8-user.NEWS
	dh_installchangelogs

override_dh_install-indep:
	dh_install -i --exclude=.bat --exclude=Thumbs.db

	# update the checksum for the root webapp
	unset rwmd5sum \
		&& rwmd5sum=`cat debian/default_root/index.html debian/default_root/META-INF/context.xml | md5sum - 2>/dev/null | cut -d " " -f1` \
		&& sed "s/\@ROOT_WEBAPP_MD5SUM\@/$$rwmd5sum/" debian/tomcat8.postrm.in > debian/tomcat8.postrm

override_dh_auto_clean:
	dh_auto_clean
	-$(ANT) clean