File: rules

package info (click to toggle)
coinor-ipopt 3.14.17-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,792 kB
  • sloc: cpp: 97,149; sh: 4,802; ansic: 2,537; java: 1,277; makefile: 817; fortran: 224; xml: 210
file content (54 lines) | stat: -rwxr-xr-x 1,703 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
#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk

# Hardening
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# Using HAVE_CSTDDEF to include the stddef header (see patch add_missing_cstddef.patch)
export DEB_CPPFLAGS_MAINT_APPEND = -DHAVE_CSTDDEF
export DEB_CXXFLAGS_MAINT_APPEND = $(shell pkgconf mpi --cflags)
export DEB_LDFLAGS_MAINT_APPEND = $(shell pkgconf mpi --libs-only-L)
export LIBS += $(shell pkgconf mpi --libs-only-l)

%:
	dh $@ --without autoreconf

override_dh_auto_configure:
	dh_auto_configure -- --prefix=/usr --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
		--build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) \
		--enable-static --with-mumps-lflags='-ldmumps' \
		--with-mumps-cflags='-I/usr/include/mumps' \
		--with-asl-cflags='-I/usr/include/ampl-netlib-solvers' \
		--with-asl-lflags='-lamplsolver' \
		--with-lapack-lflags='-llapack -lblas'

override_dh_auto_build-arch:
	make V=1

override_dh_auto_build-indep:
	make doc

# No tests for the doc package.
override_dh_auto_test-indep:

execute_before_dh_installexamples:
	# copy sIPOPT examples
	mkdir -p examples/sIPOPT
	cp -r contrib/sIPOPT/examples/* examples/sIPOPT/
	# Remove full build path from example Makefiles
	for F in $$(find examples -name "Makefile"); do \
	    sed -i -e "s,prefix-map=$(CURDIR),prefix-map=BUILDPATH,g" $$F; \
	done
	# remove not supported languages
	rm -rf examples/*_java

execute_after_dh_installdocs:
	for F in $$(find debian/ -name "*.html"); do\
		sed -i 's|<script.*mathjax.*/script>||g' $$F;\
	done

execute_before_dh_link:
	# Removing the installed jquery.js file, a symlink will be created by dh_link
	# from the libjs-jquery package
	find debian/ -name "jquery.js" -delete