File: rules

package info (click to toggle)
mricron 0.20140804.1~dfsg.1-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 13,508 kB
  • sloc: pascal: 114,876; sh: 49; makefile: 35
file content (56 lines) | stat: -rwxr-xr-x 1,735 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
#!/usr/bin/make -f
# -*- makefile -*-

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# one ring to rule them all ...
%:
	dh $@


override_dh_auto_build:
	# first the non-gui parts
	cp common/notgui.inc common/isgui.inc
	lazbuild --build-all --pcp=/etc/lazarus dcm2nii/dcm2nii.lpi
	# intermediate clean
	find $(CURDIR)/dcm2nii -name '*.o' -delete -o -name '*.ppu' -delete
	# and now the gui parts
	cp common/gui.inc common/isgui.inc
	lazbuild --build-all --ws=gtk2 --pcp=/etc/lazarus mricron.lpi
	lazbuild --build-all --ws=gtk2 --pcp=/etc/lazarus dcm2nii/dcm2niigui.lpi
	lazbuild --build-all --ws=gtk2 --pcp=/etc/lazarus npm/npm.lpi
	# rename npm to prevent conflict with npm package
	mv npm/npm npm/mricron-npm
	# build icon
	convert iconfinal.ico -resize 32x32 iconfinal.xpm
	mv iconfinal-0.xpm mricron.xpm || mv iconfinal.xpm mricron.xpm

# we want immediately useable docs and example data, they are in a dedicated
# package already
override_dh_compress:
	dh_compress -X.voi
	-find debian/mricron-data/usr/share/mricron/ -type f -exec chmod -x {} \;
	-find debian/mricron-doc/usr/share/doc/mricron-doc/examples -type f -exec chmod -x {} \;

override_dh_dwz:
	echo "Lazarus code does not export debug symbols"

override_dh_clean:
	find . -name '*.o' -delete -o -name '*.ppu' -delete -o -name '*.a' -delete
	find . -name '*.compiled' -delete
	find . -name '*.or' -delete
	-rm mricron.rc mricron.lrs mricron
	-rm dcm2nii/dcm2nii
	-rm dcm2nii/dcm2niigui
	-rm npm/mricron-npm
	-rm iconfinal*.xpm mricron.xpm
	-rm text.lrs
	dh_clean


# there is no way to get previous versions
get-orig-source: get-latest-source
get-latest-source:
	wget http://www.mccauslandcenter.sc.edu/CRNL/sw/mricron/source.zip
	bash debian/repack.sh source.zip