File: rules

package info (click to toggle)
meep-lam4 1.3-2
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 4,540 kB
  • ctags: 7,109
  • sloc: cpp: 64,830; sh: 11,405; lisp: 238; makefile: 205
file content (54 lines) | stat: -rwxr-xr-x 1,664 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# This has to be exported to make some magic below work.
#export DH_OPTIONS

install_file    = /usr/bin/install -p -o root -g root -m 644
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

ifneq ($(wildcard /usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/serial/libhdf5.so),)
  export DEB_CPPFLAGS_MAINT_APPEND := -I/usr/include/hdf5/serial
  export DEB_LDFLAGS_MAINT_APPEND := -Wl,-L/usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/serial
endif

CONFIGURE_FLAGS = --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
	--prefix=/usr --mandir=\$${prefix}/share/man \
	--infodir=\$${prefix}/share/info \
	--with-libctl=/usr/share/libctl3 \
	--with-gcc-arch=no \
	--enable-shared --with-pic --enable-cxx \
	--with-mpi=yes

%:
	dh $@ --with autoreconf

override_dh_auto_configure:
	mv configure org.configure
	cat org.configure | \
		sed "s/PACKAGE_NAME='meep'/PACKAGE_NAME='meep-lam4'/g" |\
		sed "s/PACKAGE='meep'/PACKAGE='meep-lam4'/g" > configure
	chmod 755 configure
	F77=gfortran dh_auto_configure -- $(CONFIGURE_FLAGS)

override_dh_auto_install:
        # cleanup for later builds
	if test -f org.configure; then mv org.configure configure; fi
	dh_installchangelogs NEWS
	dh_auto_install
	mv debian/tmp/usr/include/meep-lam4 debian/tmp/usr/include/meep

override_dh_clean:
	# we do not need this anymore
	rm -f tests/latest_output
	rm -f libctl/meep_mpi
	rm -f meep_mpi.pc
	rm -f src/libmeep_mpi.la
	dh_clean

override_dh_auto_test:
	echo "tests disabled for now"
	#-make check
	#cat tests/test-suite.log