File: rules

package info (click to toggle)
sunflow 0.07.2.svn396%2Bdfsg-14
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 11,164 kB
  • ctags: 4,980
  • sloc: lisp: 168,740; java: 25,216; cpp: 3,265; python: 2,058; ruby: 1,276; xml: 105; sh: 85; makefile: 62
file content (92 lines) | stat: -rwxr-xr-x 3,370 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/usr/bin/make -f

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

NAME    := sunflow
VERSION := $(shell dpkg-parsechangelog| sed -n '/^Version/{s/Version: \(.*\)-[0-9]*$$/\1/;s/+dfsg//p}')
SVNREV  := $(shell echo $(VERSION)|sed -n 's/.*svn\([0-9]*\)/\1/p')
TMPDIR  := $(NAME)-$(VERSION)
TAR     := ../$(NAME)_$(VERSION)+dfsg.orig.tar.gz

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

DEB_JARS  := janino
DEB_ANT_BUILD_TARGET = jars javadoc

UPSTREAM_VERSION = $(shell echo $(DEB_UPSTREAM_VERSION) | sed -e 's/.dfsg$$//')

install/libsunflow-java::
	# If case to avoid build failure when resuming the build
	# at the install step
	if [ ! -f release/sunflow-$(UPSTREAM_VERSION).jar ] ; then \
		mv release/sunflow.jar release/sunflow-$(UPSTREAM_VERSION).jar ; \
	fi
	dh_install -plibsunflow-java release/sunflow-$(UPSTREAM_VERSION).jar usr/share/java
	dh_link -plibsunflow-java usr/share/java/sunflow-$(UPSTREAM_VERSION).jar \
		usr/share/java/sunflow.jar

install/sunflow::
	# If case to avoid build failure when resuming the build
	# at the install step
	if [ ! -f release/sunflowGUI-$(UPSTREAM_VERSION).jar ] ; then \
		mv release/sunflowGUI.jar release/sunflowGUI-$(UPSTREAM_VERSION).jar ; \
	fi
	dh_install -psunflow release/sunflowGUI-$(UPSTREAM_VERSION).jar usr/share/java
	dh_link -psunflow usr/share/java/sunflowGUI-$(UPSTREAM_VERSION).jar usr/share/java/sunflowGUI.jar

	# Executable (wrapper)
	install -d debian/sunflow/usr/bin
	install debian/sunflow.wrapper debian/sunflow/usr/bin/sunflow

	# Default configuration
	install -d debian/sunflow/etc
	install -m 644 debian/sunflow.conf debian/sunflow/etc/sunflowrc

	# Blender export script
	install -d debian/sunflow/usr/share/blender/scripts/sunflow
	install -m 644 exporters/blender/sunflow_export.py \
		debian/sunflow/usr/share/blender/scripts/sunflow

	# Desktop file and icons
	install -d debian/sunflow/usr/share/applications
	install -m 644 debian/sunflow.desktop \
		debian/sunflow/usr/share/applications
	install -d debian/sunflow/usr/share/pixmaps
	install -m 644 debian/sunflow.svg \
		debian/sunflow/usr/share/pixmaps
	install -m 644 debian/sunflow.png \
		debian/sunflow/usr/share/pixmaps
	install -m 644 debian/sunflow.xpm \
		debian/sunflow/usr/share/pixmaps

	# Not using python-distutils.mk, calling manually
	dh_python2 /usr/share/blender/scripts/sunflow

install/libsunflow-java-doc::
	# Javadoc
	mv release/javadoc release/api
	dh_installdocs -plibsunflow-java-doc release/api

build/sunflow::
	pod2man --center='SUNFLOW DOCUMENTATION' \
		--release=$(UPSTREAM_VERSION) \
		debian/sunflow.pod -o debian/sunflow.1

	# Render icons
	convert -background "rgba(255,255,255,0)" -geometry 48x48 debian/sunflow.svg +set date:create +set date:modify -define png:exclude-chunk=time debian/sunflow.png
	convert -background "rgba(255,255,255,0)" -geometry 32x32 debian/sunflow.svg debian/sunflow.xpm

clean::
	rm -f debian/sunflow.1
	rm -f debian/sunflow.png debian/sunflow.xpm

get-orig-source:
	mkdir $(TMPDIR)
	-rm $(TAR)
	svn export --force -r $(SVNREV) https://$(NAME).svn.sourceforge.net/svnroot/$(NAME)/trunk $(TMPDIR)
	echo "The following files will not be included in Debian tarball:"
	cd $(TMPDIR) && find . \( -name '*.class' -o -name '*.jar' \) -print
	ZIP=--best tar --exclude-vcs --exclude *.jar --exclude *.class -zcf $(TAR) $(TMPDIR)
	rm -rf $(TMPDIR)