#!/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/icons/hicolor/scalable/apps install -m 644 debian/sunflow.svg \ debian/sunflow/usr/share/icons/hicolor/scalable/apps # 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 clean:: rm -f debian/sunflow.1 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)