Skip to content

Commit

Permalink
Update Linux packages
Browse files Browse the repository at this point in the history
  • Loading branch information
jschueller committed Oct 23, 2024
1 parent bf388bc commit a12fddd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 20 deletions.
7 changes: 2 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ endif()

find_package (OpenTURNS CONFIG REQUIRED)
message (STATUS "Found OpenTURNS: ${OPENTURNS_ROOT_DIR} (found version \"${OPENTURNS_VERSION_STRING}\")")
if (NOT DEFINED OPENTURNS_PYTHON_MODULE_PATH)
set (OPENTURNS_PYTHON_MODULE_PATH ${OPENTURNS_PYTHON3_MODULE_PATH})
endif ()

if (NOT BUILD_SHARED_LIBS)
list ( APPEND OTMORRIS_DEFINITIONS "-DOTMORRIS_STATIC" )
Expand Down Expand Up @@ -84,9 +81,9 @@ if (BUILD_PYTHON)
endif ()

if (WIN32)
set (OTMORRIS_PYTHON_MODULE_PATH Lib/site-packages CACHE PATH "site-packages dir")
set (OTMORRIS_PYTHON_MODULE_PATH Lib/site-packages CACHE STRING "site-packages dir")
else ()
set (OTMORRIS_PYTHON_MODULE_PATH ${CMAKE_INSTALL_LIBDIR}/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages CACHE PATH "site-packages dir")
set (OTMORRIS_PYTHON_MODULE_PATH ${CMAKE_INSTALL_LIBDIR}/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages CACHE STRING "site-packages dir")
endif ()
endif ()
endif ()
Expand Down
2 changes: 1 addition & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
= 0.17 release (wip)
= 0.17 release (2024-10-23)

* Make bounds argument last to disambiguate constructors

Expand Down
8 changes: 3 additions & 5 deletions distro/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,17 @@ CXXFLAGS+=$(CPPFLAGS)
DPKG_EXPORT_BUILDFLAGS = 1
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

PY3VER = $(shell py3versions -d)

%:
dh $@ --buildsystem=cmake --with python3

override_dh_auto_configure:
dh_auto_configure -Bbuild -- \
-DUSE_SPHINX=OFF \
-DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON \
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
-DCMAKE_INSTALL_LIBDIR:PATH="lib/$(DEB_HOST_MULTIARCH)" \
-DCMAKE_INSTALL_LIBDIR:PATH=lib/$(DEB_HOST_MULTIARCH) \
-DINSTALL_DESTDIR:PATH=$(CURDIR)/debian/otmorris \
-DPYTHON_SITE_PACKAGES:PATH="lib/$(PY3VER)/site-packages"
-DOTMORRIS_PYTHON_MODULE_PATH=lib/python3/dist-packages \
-DCMAKE_UNITY_BUILD=ON

override_dh_auto_build:
$(MAKE) -C build -j4
Expand Down
11 changes: 2 additions & 9 deletions distro/rpm/otmorris.spec
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,11 @@
%endif

%define __cmake %{_bindir}/cmake
%define _cmake_lib_suffix64 -DLIB_SUFFIX=64
%define cmake \
CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \
%__cmake \\\
-DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \\\
%if "%{?_lib}" == "lib64" \
%{?_cmake_lib_suffix64} \\\
%endif \
-DBUILD_SHARED_LIBS:BOOL=ON
%__cmake -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix}

Name: otmorris
Version: 0.17
Expand Down Expand Up @@ -66,11 +60,10 @@ Python textual interface to OTMORRIS uncertainty library
%build
%cmake -DINSTALL_DESTDIR:PATH=%{buildroot} \
-DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON \
-DUSE_SPHINX=OFF .
-DCMAKE_UNITY_BUILD=ON .
make %{?_smp_mflags}

%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}

%check
Expand Down

0 comments on commit a12fddd

Please sign in to comment.