File: rules

package info (click to toggle)
maven-debian-helper 2.1.3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,384 kB
  • ctags: 588
  • sloc: java: 3,830; xml: 1,711; sh: 542; perl: 109; makefile: 69
file content (65 lines) | stat: -rwxr-xr-x 2,390 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/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              := $(shell echo ${DEB_UPSTREAM_VERSION} | sed -r 's/([0-9\.]+).*/\1/')
JAVA_HOME            := /usr/lib/jvm/default-java
DEB_JARS             := ant-junit junit commons-io plexus-classworlds maven-core maven-artifact maven-artifact-manager maven-core-3.x maven-model \
 maven-embedder maven3-plugin-api maven-plugin-annotations maven-scm-api velocity file-management plexus-utils eclipse-aether-api eclipse-aether-util \
 plexus-container-default-alpha maven-repo-helper
DEB_ANT_BUILD_TARGET := package #javadoc
DEB_ANT_BUILDFILE    := debian/build.xml
DEB_ANT_ARGS         := -Dpackage=$(PACKAGE) -Dbin.package=$(PACKAGE)
API_DOCS             := target/api

debian/.mh:
	mkdir -p debian/.mh

debian/.mh/bin: debian/.mh
	cp -R bin debian/.mh/

debian/.mh/etc: debian/.mh
	cp -R etc debian/.mh/

debian/.mh/share: debian/.mh
	cp -R share debian/.mh/

makebuilddir/$(PACKAGE):: debian/.mh/bin debian/.mh/etc debian/.mh/share

# Generation of man pages
SCRIPTS       := $(wildcard bin/mh_*)
MAN_PAGES     := $(addprefix debian/.mh/doc/,$(addsuffix .1, $(notdir $(SCRIPTS))))
debian/.mh/mh_% : bin/mh_%
	mkdir -p debian/.mh
	cp $< $@
	chmod +x $@
debian/.mh/doc/mh_%.1 : debian/.mh/mh_% 
	mkdir -p debian/.mh/doc
	help2man -N -o $@ $<
man-pages: $(MAN_PAGES)
build/$(PACKAGE):: man-pages

install/$(PACKAGE)::
	mh_install -p$(PACKAGE)
	pod2man -c 'Maven for Debian GNU/Linux' \
	  -r maven-debian-helper-$(DEB_UPSTREAM_VERSION) \
	  man/mvn-debian.pod > man/mvn-debian.1
	dh_installman $(MAN_PAGES) man/mvn-debian.1
	install -D share/perl/maven.pm debian/tmp/$$(perl -MConfig -e 'print $$Config{vendorlib}')/Debian/Debhelper/Buildsystem/maven.pm

cleanbuilddir::
	mh_unpatchpoms -p$(PACKAGE)

clean::
	-$(RM) man/mvn-debian.1
	mh_clean

# Helper target, to use when updating the version of this package
update-package-version:
	perl -p -i -e "s/^    <version>([0-9\.]+<)/    <version>${VERSION}</" pom.xml
	perl -p -i -e "s/^        <version>([0-9\.]+<)/        <version>${VERSION}</" maven-debian-helper/pom.xml debian-maven-plugin/pom.xml
	perl -p -i -e "s/maven-debian-helper \(>= ([0-9\.]+)\)/maven-debian-helper \(>= ${VERSION})/" share/cdbs/1/class/maven-vars.mk maven-packager-utils/src/main/resources/control.vm