File: rules

package info (click to toggle)
iraf 2.16.1%2B2018.11.01-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 101,500 kB
  • sloc: ansic: 231,772; fortran: 75,819; lisp: 18,448; yacc: 9,575; xml: 8,401; sh: 7,269; csh: 2,425; makefile: 636; lex: 596; asm: 220; sed: 4
file content (77 lines) | stat: -rwxr-xr-x 2,539 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
66
67
68
69
70
71
72
73
74
75
76
77
#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

%:
	dh $@

export iraf=$(CURDIR)/
export host=$(iraf)unix/
BUILD_TMP=$(CURDIR)/irafbuild
export HOME=$(BUILD_TMP)
export IRAFARCH=$(shell ./unix/hlib/irafarch.sh)
PATH:=$(BUILD_TMP)/bin:$(PATH)

override_dh_auto_configure:
	mkdir -p $(BUILD_TMP) $(BUILD_TMP)/bin
	sed "s/__VERSION__/$(DEB_VERSION)/" -i unix/hlib/zzsetenv.def
	sed "s/__DATE__/$(shell date -uRd @$(SOURCE_DATE_EPOCH))/" -i unix/hlib/zzsetenv.def
	./install --term xterm \
                  --bindir $(BUILD_TMP)/bin \
	          --cache $(BUILD_TMP)/cache \
                  --imdir $(BUILD_TMP)/imdir \
	          --root $(iraf) < /dev/null || true
	cp unix/f2c/libf2c/f2c.h include/
	./util/mkarch $(IRAFARCH)

override_dh_auto_build:
	bin=$(iraf)bin/ noaobin=$(iraf)/noao/bin/ $(MAKE) sysgen
	bin=$(iraf)bin/ noaobin=$(iraf)/noao/bin/ bin/cl.e -f debian/precompile.cl

override_dh_auto_install:
	for f in $(shell find . -name \*.hlp \
            -o -name \*.hd \
            -o -name \*.men \
            -o -name \*.cl \
            -o -name \*.par \
            -o -name \*.key \
            -o -name \*.def \
            -o -name \*.dat \
            -o -name \*.gui \
            -o -name \*.pkg \
            -o -name \*.mip \
            -o -name \*.fits \
	    -o -path ./dev/\* | \
	    fgrep -v ./.pc/ | \
	    fgrep -v ./doc/ | \
	    fgrep -v ./debian/ | \
	    cut -c3-) \
	    unix/hlib/motd* \
	    lib/syserrmsg lib/syshelpdir lib/scr/help.html ; do \
	  install -p -D -m 644 $$f debian/tmp/usr/lib/iraf/$$f ; \
	done
	mkdir -p debian/tmp/usr/lib/iraf/extern/
	> debian/tmp/usr/lib/iraf/extern/.zzsetenv.def
	mkdir -p debian/tmp/etc/iraf
	mv debian/tmp/usr/lib/iraf/unix/hlib/login.cl debian/tmp/etc/iraf/
	mv debian/tmp/usr/lib/iraf/unix/hlib/motd.etc debian/tmp/etc/iraf/motd
	mv debian/tmp/usr/lib/iraf/unix/hlib/extern.pkg debian/tmp/etc/iraf/
	mv debian/tmp/usr/lib/iraf/dev/irafhosts debian/tmp/etc/iraf/
	rm -f debian/tmp/usr/lib/iraf/dev/hosts debian/tmp/usr/lib/iraf/dev/uhosts
	rm -rf debian/tmp/usr/lib/iraf/unix/f2c
	echo '# HOSTS -- IRAF local network host table.' > debian/tmp/etc/iraf/hosts
	for f in unix/hlib/util.sh \
	         unix/hlib/mkiraf.sh unix/hlib/mkmlist.sh \
	         unix/hlib/irafarch.sh ; do \
	  install -p -D -m 755 $$f debian/tmp/usr/lib/iraf/$$f ; \
	done

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
override_dh_auto_test:
	PATH=$(BUILD_TMP)/.iraf/bin:$(PATH) tmp=/tmp/ ./test/run_tests
endif

override_dh_clean:
	make src
	dh_clean
	rm -rf $(BUILD_TMP)