File: rules

package info (click to toggle)
dicomscope 3.6.0-20
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 6,252 kB
  • sloc: java: 22,911; cpp: 5,957; sh: 266; makefile: 44
file content (65 lines) | stat: -rwxr-xr-x 2,070 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
57
58
59
60
61
62
63
64
65
#!/usr/bin/make -f
#export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed 

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
export JAVA_HOME=/usr/lib/jvm/default-java

CMAKE_EXTRA_FLAGS = -DCMAKE_BUILD_TYPE:STRING="" \
	-DDICOMSCOPE_INSTALL_LIB_DIR:STRING=lib/$(DEB_HOST_MULTIARCH)/jni

%:
	dh $@ --buildsystem=cmake --with javahelper

override_dh_auto_configure-arch:
	dh_auto_configure -- $(CMAKE_EXTRA_FLAGS)

override_dh_install:
	# fix exe bit before install
	chmod 755 debian/tmp/usr/share/dicomscope/tcl/dcmpsdmp.tcl
	chmod 755 debian/tmp/usr/share/dicomscope/tcl/dcmpschk.tcl
	dh_install
	find debian/tmp/usr -name "*.jar" -exec zip -d \{\} docs/*.pdf \;

override_dh_clean:
	dh_clean
	find DICOMscope -name *.class -delete

override_dh_compress:
	dh_compress -X.pdf

VER_MAJOR = 3
VER_MINOR = 6
VER_PATCH = 0
VER_FULL = $(VER_MAJOR).$(VER_MINOR).$(VER_PATCH)
VER_FULL_UPSTREAM = $(VER_MAJOR)$(VER_MINOR)$(VER_PATCH)

UPSTREAM_SRC = dsgui$(VER_FULL_UPSTREAM)
DEBIAN_SRC_DIR = dicomscope-$(VER_FULL)
DEBIAN_SRC_TAR = dicomscope_$(VER_FULL).orig.tar.gz


$(UPSTREAM_SRC).zip:
	wget -c ftp://dicom.offis.de/pub/dicom/offis/software/dscope/dscope$(VER_FULL_UPSTREAM)/$@

get-orig-source: $(UPSTREAM_SRC).zip
	rm -rf $(DEBIAN_SRC_DIR)
	unzip -q $(UPSTREAM_SRC).zip -d $(DEBIAN_SRC_DIR)
	# Need tofrodos in order to prepare the patch, since quilt
	# does not support mixture of dos/unix EOL
	find $(DEBIAN_SRC_DIR) -name *.java -exec dos2unix {} \;
	find $(DEBIAN_SRC_DIR) -name *.html -exec dos2unix {} \;
	find $(DEBIAN_SRC_DIR) -name *.h -exec dos2unix {} \;
	find $(DEBIAN_SRC_DIR) -name *.cpp -exec dos2unix {} \;
	find $(DEBIAN_SRC_DIR) -name *.txt -exec dos2unix {} \;
	find $(DEBIAN_SRC_DIR) -name *.MF -exec dos2unix {} \;
	GZIP="--best --no-name" tar czf $(DEBIAN_SRC_TAR) $(DEBIAN_SRC_DIR)
	rm -rf $(DEBIAN_SRC_DIR)
	rm $(UPSTREAM_SRC).zip
	#
	# put orig.tar in ../tarballs (-> default location for svn-buildpackage)
	mkdir -p ../tarballs
	mv *.orig.tar.gz ../tarballs