File: rules

package info (click to toggle)
ecflow 5.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 28,788 kB
  • sloc: cpp: 215,064; python: 17,891; sh: 2,807; perl: 607; xml: 333; f90: 195; makefile: 164; ansic: 103
file content (77 lines) | stat: -rwxr-xr-x 3,156 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

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)

PY3VERSIONS:=$(shell py3versions -s)

FPIC_ARCH:= hppa x32 i386
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
	find . -name '*.pyc' -delete
	find . -name '*.job*' -delete

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

override_dh_auto_configure:
	for p in ${PY3VERSIONS} ; do \
		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 \
		dh_auto_build  --builddirectory=debian/build-$$p ; done

override_dh_auto_install:
	for p in ${PY3VERSIONS} ; do \
		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_ui_create_jira_issue.sh $(DESTDIR)/usr/bin/ecflow_ui_create_jira_issue
	mv $(DESTDIR)/usr/bin/ecflow_ui_node_state_diag.sh $(DESTDIR)/usr/bin/ecflow_ui_node_state_diag
	mv $(DESTDIR)/usr/bin/ecflow_ui_transfer_file.sh $(DESTDIR)/usr/bin/ecflow_ui_transfer_file
	mv $(DESTDIR)/usr/bin/ecflow_test_ui.sh 	$(DESTDIR)/usr/bin/ecflow_test_ui
	mv $(DESTDIR)/usr/bin/ecflow_fuse.py	$(DESTDIR)/usr/bin/ecflow_fuse
	mv $(DESTDIR)/usr/bin/ecflow_logsvr.pl	$(DESTDIR)/usr/bin/ecflow_logsvr