File: rules

package info (click to toggle)
oasis3 3.mct+dfsg.121022-9
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 61,652 kB
  • ctags: 2,932
  • sloc: f90: 40,319; fortran: 5,859; ansic: 2,780; sh: 728; makefile: 701; perl: 552; xml: 278; awk: 25; csh: 7
file content (55 lines) | stat: -rwxr-xr-x 1,684 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
#!/usr/bin/make -f

# The magic rule ...
%:
	dh $@

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
LIBDIR:=/usr/lib/${DEB_HOST_MULTIARCH}
LIBDIR_ESC:=\/usr\/lib\/${DEB_HOST_MULTIARCH}
VERSION:= 3+mct+dfsg.121022
CHAN := MPI1

TOP:=$(shell pwd)/
FULLMAKE:=  $(MAKE) -C $(TOP)util/make_dir -f TopMakefileOasis3 \
	ARCH=debian TOP=$(TOP)

override_dh_auto_build:
	$(FULLMAKE) CHAN=${CHAN} default
	# Create pkgconfig files.
	for p in mct.pc  psmile.pc  scrip.pc ; do \
		sed -e  's/@VERSION@/${VERSION}/' -e 's/@LIBDIR@/${LIBDIR_ESC}/' \
		  < debian/$${p}.in > debian/$${p}; \
		done
	# And docs
	$(MAKE) -C  lib/mct/doc 
	cd lib/mct/doc && dvipdf mct_APIs.dvi

override_dh_auto_install:
	mkdir -p debian/tmp/${LIBDIR}
	cp build/lib/libpsmile.${CHAN}.so debian/tmp/${LIBDIR}/libpsmile.${CHAN}.so.0d
	cp build/lib/libscrip.so debian/tmp/${LIBDIR}/libscrip.so.0d
	cp build/lib/*.a debian/tmp/${LIBDIR}
	dh_install -p liboasis3-dev debian/*.pc     ${LIBDIR}/pkgconfig

override_dh_link:
	dh_link -p liboasis3-dev ${LIBDIR}/libscrip.so.0d ${LIBDIR}/libscrip.so
	dh_link -p liboasis3-dev ${LIBDIR}/libpsmile.${CHAN}.a       ${LIBDIR}/libpsmile.a
	dh_link -p liboasis3-dev ${LIBDIR}/libpsmile.${CHAN}.so.0d   ${LIBDIR}/libpsmile.so
	dh_link -p liboasis3-dev /usr/include/psmile.${CHAN}        /usr/include/psmile

override_dh_shlibdeps:
	dh_shlibdeps -l$(TOP)/build/lib/shared

override_dh_fixperms:
	dh_fixperms

override_dh_clean:
	dh_clean
	$(MAKE) -C lib/mct/doc clean
	find . -name '.svn' -exec rm -rf {} \; || echo "Deleting .svn directories"
	rm -rf lib/mct/doc/*.pdf build
	$(FULLMAKE) realclean ARCH=debian || echo "realclean done already"


pkgconfig-files: