File: rules

package info (click to toggle)
eigensoft 7.2.1+dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,696 kB
  • sloc: ansic: 32,354; perl: 470; makefile: 107; sh: 10
file content (49 lines) | stat: -rwxr-xr-x 1,629 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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow

include /usr/share/dpkg/default.mk

WRAPPERS=evec2pca-ped \
         evec2pca \
         smarteigenstrat \
         smartpca

%:
	dh $@ 

override_dh_auto_build:
	$(MAKE) DEBUG_OPTIONS=-g -C src all
	cd src && make install

override_dh_clean:
	dh_clean
	$(MAKE) -C src clobber

override_dh_install:
	dh_install
	find debian/eigensoft/usr/share/ -type f -empty -delete
	# file consists only from single line with wrong interpreter
	find debian/eigensoft/usr/share/ -type f -name HGDP.X.perl -delete
	# Fix wrappers and drop *.perl extension in /usr/bin while keeping
	# the original name in /usr/lib/debian-med/bin
	mkdir -p debian/$(DEB_SOURCE)/usr/lib/debian-med/bin
	for pl in $(WRAPPERS) ; do \
	    rm debian/$(DEB_SOURCE)/usr/bin/$${pl} ; \
	    sed -i \
	        -e "s?\(command[[:space:]]*=[[:space:]]*\"\)\($${pl}\)?\1/usr/lib/$(DEB_SOURCE)/\2?" \
                -e "s?\(cmd[[:space:]]*=[[:space:]]*\"\)\($${pl}\)?\1/usr/lib/$(DEB_SOURCE)/\2?" \
                -e "s?\(cmd[[:space:]]*=[[:space:]]*\"\)\(evec2pca.*\)\.perl?\1?" \
                -e "s?\($${pl}\)\.perl?\1?" \
	        debian/$(DEB_SOURCE)/usr/bin/$${pl}.perl ; \
	    cp -a debian/$(DEB_SOURCE)/usr/bin/$${pl}.perl debian/$(DEB_SOURCE)/usr/bin/$${pl} ; \
	    mv debian/$(DEB_SOURCE)/usr/bin/$${pl}.perl debian/$(DEB_SOURCE)/usr/lib/debian-med/bin ; \
	done
	rm debian/$(DEB_SOURCE)/usr/bin/gc.perl

override_dh_fixperms:
	dh_fixperms
	find debian/*/usr/share/eigensoft -type f -name "*.perl" -exec chmod +x \{\} \;