Skip to content

Commit

Permalink
Sync
Browse files Browse the repository at this point in the history
  • Loading branch information
jschueller committed Oct 23, 2024
1 parent 724e082 commit 799c4cd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 16 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 (OTTEMPLATE_PYTHON_MODULE_PATH Lib/site-packages CACHE PATH "site-packages dir")
set (OTTEMPLATE_PYTHON_MODULE_PATH Lib/site-packages CACHE STRING "site-packages dir")
else ()
set (OTTEMPLATE_PYTHON_MODULE_PATH ${CMAKE_INSTALL_LIBDIR}/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages CACHE PATH "site-packages dir")
set (OTTEMPLATE_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
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/ottemplate \
-DCMAKE_UNITY_BUILD=ON -DCMAKE_UNITY_BUILD_BATCH_SIZE=32
-DOTTEMPLATE_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/ottemplate.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: ottemplate
Version: 0.0
Expand Down Expand Up @@ -65,8 +59,7 @@ Python textual interface to OTTemplate 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 799c4cd

Please sign in to comment.