File: rules

package info (click to toggle)
ecflow 5.15.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 51,868 kB
  • sloc: cpp: 269,341; python: 22,756; sh: 3,609; perl: 770; xml: 333; f90: 204; ansic: 141; makefile: 70
file content (80 lines) | stat: -rwxr-xr-x 2,975 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
78
79
80
#!/usr/bin/make -f

export DH_VERBOSE=1

# The magic debhelper  rule
%:
	dh $@  --with-buildsystem=ecbuild 


DESTDIR:=$(CURDIR)/debian/tmp/
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
LIBDIR:=/usr/lib/$(DEB_HOST_MULTIARCH)
TARGET_ARCH ?= $(shell dpkg-architecture -qDEB_TARGET_ARCH_CPU)

# Needed by dh_python
export DEB_HOST_ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH)

PY3VERSIONS:=$(shell py3versions -r)

FPIC_ARCH:= hppa x32 i386 armel armhf
FPIC:=  $(if $(filter $(DEB_TARGET_ARCH), $(FPIC_ARCH)),  -fPIC,  )

CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) $(FPIC) $(CPPFLAGS)  -DNO_REGEXP
LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) $(FPIC)
CXXFLAGS:= $(shell dpkg-buildflags --get CXXFLAGS) $(FPIC) # -std=c++11

CMAKE_COMMON_FLAGS = \
		-DBOOST_INCLUDEDIR=/usr/include \
		-DBoost_DATE_TIME_LIBRARY_RELEASE=$(LIBDIR)/libboost_date_time.so  \
		-DBoost_TIMER_LIBRARY_RELEASE=$(LIBDIR)/libboost_timer.so \
		-DBoost_CHRONO_LIBRARY_RELEASE=$(LIBDIR)/libboost_chrono.so \
		-DBoost_UNIT_TEST_FRAMEWORK_LIBRARY_RELEASE=$(LIBDIR)/libboost_unit_test_framework.so \
		-DBoost_FILESYSTEM_LIBRARY_RELEASE=$(LIBDIR)/libboost_filesystem.so  \
		-DBoost_PROGRAM_OPTIONS_LIBRARY_RELEASE=$(LIBDIR)/libboost_program_options.so  \
		-DBoost_REGEX_LIBRARY_RELEASE=$(LIBDIR)/libboost_regex.so  \
		-DBoost_SERIALIZATION_LIBRARY_RELEASE=$(LIBDIR)/libboost_serialization.so  \
		-DBoost_SYSTEM_LIBRARY_RELEASE=$(LIBDIR)/libboost_system.so \
		-DBoost_THREAD_LIBRARY_RELEASE=$(LIBDIR)/libboost_thread.so  \
		-DBOOSTROOT=$(LIBDIR)	\
		-DENABLE_STATIC_BOOST_LIBS=OFF \
		-DENABLE_SSL=ON \
		-DCMAKE_C_CFLAGS="${CFLAGS} ${LDFLAGS}"  

override_dh_auto_clean:
	dh_auto_clean
	rm -rf debian/build-* share/ecbuild
	rm -f Doc/online/conf.py Pyext/setup.py
	find . -name '*.pyc' -delete
	find . -name '*.job*' -delete

# For the moment set ENABLE_SSL=OFF. Enabling it fails tests

override_dh_auto_configure:
	ln -s /usr/share/ecbuild share/ecbuild
	for p in ${PY3VERSIONS} ; do \
		set -e; \
		PY3AB=`echo $$p | sed -e 's/python3\./python3/' `  ; \
		PY3VER=`echo $$p | sed -e 's/python//' `; \
		PY3UPPER=`echo $${PY3AB} | tr '[:lower:]' '[:upper:]' `  ; \
		dh_auto_configure --builddirectory=debian/build-$$p -- \
			${CMAKE_COMMON_FLAGS} \
			-DPython3_EXECUTABLE=/usr/bin/$$p \
			-DBoost_$${PY3UPPER}_LIBRARY_RELEASE=$(LIBDIR)/libboost_$${PY3AB}.so  ; \
		done

override_dh_auto_build:
	for p in ${PY3VERSIONS} ; do \
		set -e; \
		dh_auto_build  --builddirectory=debian/build-$$p ; done

override_dh_auto_install:
	for p in ${PY3VERSIONS} ; do \
		set -e; \
		dh_auto_install --builddirectory=debian/build-$$p ; \
		done
	#	Drop the suffixes on scripts ...
	mv $(DESTDIR)/usr/bin/ecflow_logserver.sh $(DESTDIR)/usr/bin/ecflow_logserver
	mv $(DESTDIR)/usr/bin/ecflow_start.sh 	$(DESTDIR)/usr/bin/ecflow_start
	mv $(DESTDIR)/usr/bin/ecflow_stop.sh 	$(DESTDIR)/usr/bin/ecflow_stop
	mv $(DESTDIR)/usr/bin/ecflow_logsvr.pl	$(DESTDIR)/usr/bin/ecflow_logsvr