#!/usr/bin/make -f # -*- makefile -*- srcpkg = $(shell LC_ALL=C dpkg-parsechangelog | grep '^Source:' | cut -d ' ' -f 2,2) upstreamver = $(shell LC_ALL=C dpkg-parsechangelog | grep '^Version:' | cut -d ' ' -f 2,2 | cut -d '-' -f 1,1 ) export CXXFLAGS += -Wall export CXXFLAGS += -fpermissive export LDFLAGS += -Wl,--no-undefined -Wl,-rpath=/usr/lib/voxbo/lib # one ring to rule them all ... %: dh $@ override_dh_auto_configure: ./configure.py -s -p neurodebian override_dh_auto_build: $(MAKE) QTDIR=/usr \ QTBASEINCDIR=/usr/include/qt4 \ MOC=/usr/bin/moc-qt4 \ VB_SHARED=1 override_dh_auto_install: $(MAKE) install VB_PREFIX=$(CURDIR)/debian/voxbo/usr/lib/voxbo install -d $(CURDIR)/debian/voxbo/usr/lib/voxbo/lib install -t $(CURDIR)/debian/voxbo/usr/lib/voxbo/lib $(shell find . -name '*.so') # cleanup -rm $(CURDIR)/debian/voxbo/usr/lib/voxbo/bin/vbinstall # perm fixes chmod +x $(CURDIR)/debian/voxbo/usr/lib/voxbo/bin/spm8* override_dh_clean: $(MAKE) distclean dh_clean override_dh_shlibdeps: dh_shlibdeps -l $(CURDIR)/debian/voxbo/usr/lib/voxbo/lib override_dh_install: dh_install # remove obsolete license file (voxbo doesn't ship this template) but it # comes from the mni-colin27-nifti package -rm debian/voxbo/usr/lib/voxbo/elements/templates/ch2_license.txt # make orig tarball from repository content get-orig-source: # orig tarball, turn directory into something nicer git archive --format=tar --prefix=$(srcpkg)-$(upstreamver)/ HEAD | \ gzip -9 > $(srcpkg)_$(upstreamver).orig.tar.gz