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 7e722c4 commit def645d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 17 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ if (BUILD_PYTHON)
endif ()

if (WIN32)
set (OTROBOPT_PYTHON_MODULE_PATH Lib/site-packages CACHE PATH "site-packages dir")
set (OTROBOPT_PYTHON_MODULE_PATH Lib/site-packages CACHE STRING "site-packages dir")
else ()
set (OTROBOPT_PYTHON_MODULE_PATH ${CMAKE_INSTALL_LIBDIR}/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages CACHE PATH "site-packages dir")
set (OTROBOPT_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.15 release (wip)
= 0.15 release (2024-10-23)

* Maintenance

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/otrobopt \
-DPYTHON_SITE_PACKAGES:PATH="lib/$(PY3VER)/site-packages"
-DOTROBOPT_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/otrobopt.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: otrobopt
Version: 0.15
Expand Down Expand Up @@ -66,8 +60,7 @@ Python textual interface to OTRobOpt uncertainty library
%build
%cmake -DINSTALL_DESTDIR:PATH=%{buildroot} \
-DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON \
-DCMAKE_UNITY_BUILD=ON \
-DUSE_SPHINX=OFF .
-DCMAKE_UNITY_BUILD=ON .
make %{?_smp_mflags}

%install
Expand Down

0 comments on commit def645d

Please sign in to comment.