File: rules

package info (click to toggle)
jxplorer 3.3.2%2Bdfsg-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,152 kB
  • sloc: java: 47,008; javascript: 5,013; xml: 922; perl: 403; sh: 91; makefile: 55; haskell: 27
file content (69 lines) | stat: -rwxr-xr-x 2,257 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/usr/bin/make -f

export JAVA_HOME=/usr/lib/jvm/default-java
JAVA := $(JAVA_HOME)/bin/java

CLASSPATH := /usr/share/java/jhall.jar:/usr/share/java/junit.jar
CLASSPATH := $(CLASSPATH):./jxplorer.jar:./jxplorer_help.jar
export CLASSPATH

VERSION := $(shell dpkg-parsechangelog|sed -n '/^Version/{s/Version: \(.*\)-[0-9]*$$/\1/;s/+dfsg//p}')
USRSHARE:= debian/jxplorer/usr/share
ICONS := $(USRSHARE)/icons/hicolor
TEMPDIR := .tmp-orig-source

%:
	dh $@ --with javahelper

override_dh_auto_build:
	# regenerate JH db
	cd help && jhindexer -db SearchData .
	# recreate JH jar
	-mkdir jars
	cd help && jar cf ../jars/jxplorer_help.jar *
	# build jxplorer
	jh_build --javacopts="-source 8 -target 8" --no-javadoc jxplorer.jar src
	# tests
	$(JAVA) com.ca.directory.jxplorer.viewer.tableviewer.TableViewerTestSuite
	$(JAVA) com.ca.commons.naming.NamingTestSuite
	$(JAVA) com.ca.commons.jndi.JndiTestSuite
	$(JAVA) com.ca.jndiproviders.dsml.DsmlTestSuite

override_dh_auto_clean:
	jh_build --clean
	dh_clean
	rm -f jars/jxplorer_help.jar
	rm -f build-stamp jxplorer.jar
	rm -rf help/SearchData

override_dh_install:
	dh_install
	for i in 16 22 48; do \
		mkdir -p $(ICONS)/$${i}x$${i}/apps; \
		convert images/logo_64.png -colorspace RGB \
			-resize $${i}x$${i} -colorspace sRGB \
			+set date:create +set date:modify -define png:exclude-chunk=time \
			$(ICONS)/$${i}x$${i}/apps/jxplorer.png; \
	done
	install -d -m 755 $(USRSHARE)/pixmaps
	convert images/logo_64.png -colorspace RGB \
		-resize 32x32 -colorspace sRGB \
		$(USRSHARE)/pixmaps/jxplorer.xpm
	install -d -m 755 $(USRSHARE)/applications
	install -m 644 debian/jxplorer.desktop \
		$(USRSHARE)/applications
	install -d -m 755 $(USRSHARE)/jxplorer/plugins
	dh_installchangelogs README.*.TXT
	# fix perl path in scripts for translation
	sed -i '1s/local\///' $(USRSHARE)/jxplorer/language/*pl

NAME=jxplorer
PROZIP=../$(NAME)-$(VERSION)-project.zip
ORGXZ=../../$(NAME)_$(VERSION)+dfsg.orig.tar.xz
get-orig-source:
	uscan --verbose --force-download --no-symlink --download-version $(VERSION)
	-mkdir -p $(TEMPDIR)/$(NAME)/help
	unzip $(PROZIP) -d $(TEMPDIR)
	cd $(TEMPDIR) && unzip $(NAME)/jars/help.jar -d $(NAME)/help
	cd $(TEMPDIR) && tar --exclude *.jar -Jcf $(ORGXZ) *
	rm -rf $(TEMPDIR) $(PROZIP)