File: rules

package info (click to toggle)
voxbo 1.8.5~svn1246-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 9,416 kB
  • ctags: 8,918
  • sloc: cpp: 111,063; makefile: 1,465; sh: 1,058; python: 190
file content (50 lines) | stat: -rwxr-xr-x 1,506 bytes parent folder | download | duplicates (3)
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
#!/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 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