#!/usr/bin/make -f # -*- makefile -*- srcpkg = $(shell LC_ALL=C dpkg-parsechangelog | grep '^Source:' | cut -d ' ' -f 2,2) debver = $(shell LC_ALL=C dpkg-parsechangelog | grep '^Version:' | cut -d ' ' -f 2,2 ) uver = $(shell echo $(debver) | cut -d '-' -f 1,1 ) DEB_HOST_ARCH=$(shell dpkg-architecture -qDEB_HOST_ARCH) do_parallel=$(shell echo $(DEB_HOST_ARCH) | grep -q mips && echo '' || echo '--parallel') do_help=$(shell echo $(DEB_HOST_ARCH) | grep -q -E '(mipsel|m68k|sh4)' && echo 'OFF' || echo 'ON') export http_proxy=http://127.0.0.1:9/ export https_proxy=http://127.0.0.1:9/ # export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) export CFLAGS += -O0 else export CFLAGS += -O2 endif export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed export DEB_CFLAGS_MAINT_APPEND = -DNDEBUG export DEB_CXXFLAGS_MAINT_APPEND = -DNDEBUG # Uncomment this to turn on verbose mode. export DH_VERBOSE=1 # Default mega-rule %: dh $@ $(do_parallel) --sourcedirectory=src override_dh_clean: cat src/debian/copyright debian/copyright.debian >| debian/copyright # Bring shipped version back [ -e src/FtglFont.aside ] && mv src/FtglFont.aside src/FtglFont || : dh_clean override_dh_auto_configure: # Just to make sure we are not using shipped version [ -e src/FtglFont ] && mv src/FtglFont src/FtglFont.aside || [ -e src/FtglFont.aside ] OSMESA_DIR=/usr \ dh_auto_configure -- \ -DWORKBENCH_MESA_DIR=/usr \ -DCMAKE_SKIP_RPATH:BOOL=OFF \ -DWORKBENCH_USE_QT5_QOPENGL_WIDGET:BOOL=ON \ -DWORKBENCH_INCLUDE_HELP_HTML_RESOURCES:BOOL=$(do_help) #-DBUILD_SHARED_LIBS:BOOL=ON override_dh_auto_install: dh_auto_install : # Sloppy man pages for now. Improve with templates mkdir -p debian/tmp/usr/share/man/man1 help2man --no-info --help-option=-help --version-string=$(uver) \ -n "visualization and discovery tool used to map neuroimaging data" \ debian/tmp/usr/bin/wb_view \ >| debian/tmp/usr/share/man/man1/wb_view.1 help2man --no-info --help-option=-all-commands-help --version-string=$(uver) \ -n "command-line program for performing a variety of algorithmic tasks using volume, surface, and grayordinate data" \ debian/tmp/usr/bin/wb_command \ >| debian/tmp/usr/share/man/man1/wb_command.1 override_dh_install: dh_install install -D -m 0644 icons/linux/workbench_128x128x32.png debian/connectome-workbench/usr/share/pixmaps/connectome-workbench.png override_dh_strip: dh_strip --dbg-package=connectome-workbench-dbg