Debian Codegraph @

debian/rules

raw symbols SCIP
1 #!/usr/bin/make -f
2
3 SOVERSIONscip-debian debian highs 1.14.0+ds-1 highs/rules/SOVERSION.=1
4 FULLVERSIONscip-debian debian highs 1.14.0+ds-1 highs/rules/FULLVERSION.=1.14.0
5
6 export DEB_BUILD_MAINT_OPTIONSscip-debian debian highs 1.14.0+ds-1 highs/rules/DEB_BUILD_MAINT_OPTIONS. = hardening=+all
7
8 include /usr/share/dpkg/buildflags.mk
9 include /usr/share/dpkg/pkg-info.mk
10
11 # these files are to be moved out of python3-highspy package after built
12 # they are intentionally not started with '/', because cmake is run by skbuild
13 # and we have no control over it (i.e. cannot pass CURDIR or DESTDIR)
14 TARGET_PREFIXscip-debian debian highs 1.14.0+ds-1 highs/rules/TARGET_PREFIX. = usr
15 LIBDIRscip-debian debian highs 1.14.0+ds-1 highs/rules/LIBDIR. = lib/$(DEB_HOST_MULTIARCHscip-debian debian highs 1.14.0+ds-1 highs/rules/DEB_HOST_MULTIARCH.)
16 TARGET_LIBDIRscip-debian debian highs 1.14.0+ds-1 highs/rules/TARGET_LIBDIR. = $(TARGET_PREFIXscip-debian debian highs 1.14.0+ds-1 highs/rules/TARGET_PREFIX.)/$(LIBDIRscip-debian debian highs 1.14.0+ds-1 highs/rules/LIBDIR.)
17
18 # we need a hardcoded path to find in dh_auto_test
19 BUILDDIRscip-debian debian highs 1.14.0+ds-1 highs/rules/BUILDDIR. = /tmp/highs-build
20 BUILD_LIBDIRscip-debian debian highs 1.14.0+ds-1 highs/rules/BUILD_LIBDIR. = $(BUILDDIRscip-debian debian highs 1.14.0+ds-1 highs/rules/BUILDDIR.)/$(LIBDIRscip-debian debian highs 1.14.0+ds-1 highs/rules/LIBDIR.)
21
22 CMAKE_TESTSscip-debian debian highs 1.14.0+ds-1 highs/rules/CMAKE_TESTS. = OFF
23 ifeq (,$(filterscip-debian debian highs 1.14.0+ds-1 highs/rules/filter. nocheck,$(DEB_BUILD_OPTIONSscip-debian debian highs 1.14.0+ds-1 highs/rules/DEB_BUILD_OPTIONS.)))
24 # some c++ tests use regex to match FP numbers precisely,
25 # thus are only reproducible on amd64 ISAs
26 ifeq ($(DEB_HOST_ARCH_CPUscip-debian debian highs 1.14.0+ds-1 highs/rules/DEB_HOST_ARCH_CPU.),amd64)
27 CMAKE_TESTSscip-debian debian highs 1.14.0+ds-1 highs/rules/CMAKE_TESTS. = ON
28 endif
29 endif
30
31 SKBUILD_ARGSscip-debian debian highs 1.14.0+ds-1 highs/rules/SKBUILD_ARGS. = \
32 -C skbuild.build-dir=$(BUILDDIRscip-debian debian highs 1.14.0+ds-1 highs/rules/BUILDDIR.) \
33 -C skbuild.ninja.version=">=1.5" \
34 -C skbuild.build.verbose=true \
35 -C skbuild.install.strip=false \
36 -C skbuild.cmake.build-type=None \
37 -C skbuild.cmake.args=-DCMAKE_C_FLAGS="$(CFLAGS) $(CPPFLAGS)" \
38 -C skbuild.cmake.args=-DCMAKE_CXX_FLAGS="$(CXXFLAGS) $(CPPFLAGS)" \
39 -C skbuild.cmake.args=-DCMAKE_EXE_LINKER_FLAGS="$(LDFLAGS)" \
40 -C skbuild.cmake.args=-DPYTHON_BUILD_SETUP=ON \
41 -C skbuild.cmake.args=-DFAST_BUILD=ON \
42 -C skbuild.cmake.args=-DBUILD_SHARED_LIBS=ON \
43 -C skbuild.cmake.args=-DCMAKE_INSTALL_PREFIX=$(TARGET_PREFIXscip-debian debian highs 1.14.0+ds-1 highs/rules/TARGET_PREFIX.) \
44 -C skbuild.cmake.args=-DCMAKE_INSTALL_LIBDIR=$(LIBDIRscip-debian debian highs 1.14.0+ds-1 highs/rules/LIBDIR.) \
45 -C skbuild.cmake.args=-DCMAKE_INSTALL_INCLUDEDIR=include
46
47 ifeq ($(CMAKE_TESTSscip-debian debian highs 1.14.0+ds-1 highs/rules/CMAKE_TESTS.),ON)
48 SKBUILD_ARGS += -C skbuild.cmake.args=-DALL_TESTS=ON
49 endif
50
51 # config pybuild and skbuild
52 export PYBUILD_NAMEscip-debian debian highs 1.14.0+ds-1 highs/rules/PYBUILD_NAME. = highspy
53 export PYBUILD_SYSTEMscip-debian debian highs 1.14.0+ds-1 highs/rules/PYBUILD_SYSTEM. = pyproject
54 export PYBUILD_BUILD_ARGS_scip-debian debian highs 1.14.0+ds-1 highs/rules/PYBUILD_BUILD_ARGS_.$(shellscip-debian debian highs 1.14.0+ds-1 highs/rules/shell(). py3versionsscip-debian debian highs 1.14.0+ds-1 highs/rules/py3versions(). -dscip-debian debian highs 1.14.0+ds-1 highs/rules/-d().) = $(scip-debian debian highs 1.14.0+ds-1 highs/rules/`$(SKBUILD_ARGS)`().SKBUILD_ARGSscip-debian debian highs 1.14.0+ds-1 highs/rules/SKBUILD_ARGS.)scip-debian debian highs 1.14.0+ds-1 highs/rules/`$(SKBUILD_ARGS)`().
55
56 PY_DEST_DIRscip-debian debian highs 1.14.0+ds-1 highs/rules/PY_DEST_DIR.=debian/python3-highspy/usr/lib/$(shellscip-debian debian highs 1.14.0+ds-1 highs/rules/shell. py3versions -d)/dist-packages
57
58 %scip-debian debian highs 1.14.0+ds-1 highs/rules/`%`().:
59 dh $@ --with python3 --buildsystem=pybuild
60
61 override_dh_auto_testscip-debian debian highs 1.14.0+ds-1 highs/rules/override_dh_auto_test().:
62 ifeq (,$(filterscip-debian debian highs 1.14.0+ds-1 highs/rules/filter. nocheck,$(DEB_BUILD_OPTIONSscip-debian debian highs 1.14.0+ds-1 highs/rules/DEB_BUILD_OPTIONS.)))
63 ifeq ($(CMAKE_TESTSscip-debian debian highs 1.14.0+ds-1 highs/rules/CMAKE_TESTS.),ON)
64 cd $(BUILDDIR) && ctest --output-on-failure
65 endif # filter cmake tests
66 # run only python tests on non-amd64 arch
67 # may be flaky on hurd (issues in numpy?)
68 ifneq (,$(filterscip-debian debian highs 1.14.0+ds-1 highs/rules/filter. $(DEB_HOST_ARCH_OSscip-debian debian highs 1.14.0+ds-1 highs/rules/DEB_HOST_ARCH_OS.),linux))
69 # set LD_LIBRARY_PATH to find compiled _core.so and libhighs.so
70 LD_LIBRARY_PATH=$(shell realpath $(BUILD_LIBDIR)) dh_auto_test
71 endif # filter linux
72 endif # nocheck
73
74 execute_after_dh_auto_installscip-debian debian highs 1.14.0+ds-1 highs/rules/execute_after_dh_auto_install().:
75 # move files out of python3-highspy package
76 mkdir -p $(TARGET_PREFIXscip-debian debian highs 1.14.0+ds-1 highs/rules/TARGET_PREFIX.)
77 mv $(PY_DEST_DIRscip-debian debian highs 1.14.0+ds-1 highs/rules/PY_DEST_DIR.)/lib $(PY_DEST_DIRscip-debian debian highs 1.14.0+ds-1 highs/rules/PY_DEST_DIR.)/bin $(PY_DEST_DIRscip-debian debian highs 1.14.0+ds-1 highs/rules/PY_DEST_DIR.)/include $(TARGET_PREFIXscip-debian debian highs 1.14.0+ds-1 highs/rules/TARGET_PREFIX.)/
78 # clean up dist-packages
79 rm -rf $(PY_DEST_DIRscip-debian debian highs 1.14.0+ds-1 highs/rules/PY_DEST_DIR.)/debian
80 # remove hardcoded build path
81 sed -i 's|#define HIGHS_DIR .*|#define HIGHS_DIR "/usr"|' $(TARGET_PREFIXscip-debian debian highs 1.14.0+ds-1 highs/rules/TARGET_PREFIX.)/include/highs/HConfig.h
82 # generate manpage from help
83 LD_LIBRARY_PATH=$(TARGET_LIBDIRscip-debian debian highs 1.14.0+ds-1 highs/rules/TARGET_LIBDIR.) help2man --version-string=$(DEB_VERSION_UPSTREAMscip-debian debian highs 1.14.0+ds-1 highs/rules/DEB_VERSION_UPSTREAM.) --name="HiGHS -- High performance linear optimization software" -N -o highs.1 $(TARGET_PREFIXscip-debian debian highs 1.14.0+ds-1 highs/rules/TARGET_PREFIX.)/bin/highs
84 # remove build path prefix from generated pkgconf file
85 sed -i "s|$(CURDIRscip-debian debian highs 1.14.0+ds-1 highs/rules/CURDIR.)||g" $(TARGET_LIBDIRscip-debian debian highs 1.14.0+ds-1 highs/rules/TARGET_LIBDIR.)/pkgconfig/highs.pc
86
87 execute_after_dh_installscip-debian debian highs 1.14.0+ds-1 highs/rules/execute_after_dh_install().:
88 # replace duplicated .so files (copied when building wheels) with symlinks
89 dh_linkscip-debian debian debhelper . dh_link(). -p libhighs$(SOVERSIONscip-debian debian highs 1.14.0+ds-1 highs/rules/SOVERSION.) $(TARGET_LIBDIRscip-debian debian highs 1.14.0+ds-1 highs/rules/TARGET_LIBDIR.)/libhighs.so.$(FULLVERSIONscip-debian debian highs 1.14.0+ds-1 highs/rules/FULLVERSION.) $(TARGET_LIBDIRscip-debian debian highs 1.14.0+ds-1 highs/rules/TARGET_LIBDIR.)/libhighs.so.$(SOVERSIONscip-debian debian highs 1.14.0+ds-1 highs/rules/SOVERSION.)
90 dh_linkscip-debian debian debhelper . dh_link(). -p libhighs-dev $(TARGET_LIBDIRscip-debian debian highs 1.14.0+ds-1 highs/rules/TARGET_LIBDIR.)/libhighs.so.$(SOVERSIONscip-debian debian highs 1.14.0+ds-1 highs/rules/SOVERSION.) $(TARGET_LIBDIRscip-debian debian highs 1.14.0+ds-1 highs/rules/TARGET_LIBDIR.)/libhighs.so