From 3edad49a3a7fd3c717b95f51641f32a19774f224 Mon Sep 17 00:00:00 2001 From: Oliver Keeble Date: Aug 24 2020 13:02:50 +0000 Subject: python fixes, %cmake macro --- diff --git a/dmlite.spec b/dmlite.spec index 3e623fe..857b7ab 100644 --- a/dmlite.spec +++ b/dmlite.spec @@ -1,6 +1,3 @@ -%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")} -%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib(1))")} - %{!?dmlite_test: %global dmlite_tests 0} # systemd definition, to do the right thing if we need to restart daemons @@ -767,11 +764,11 @@ This package provides the modules for the DPM configuration via puppet %cmake3 . -DCMAKE_INSTALL_PREFIX=/ -DRUN_ONLY_STANDALONE_TESTS=ON -DOVERWRITE_CONFIGFILES=ON %endif -make %{?_smp_mflags} -make doc +%{cmake_build} %{?_smp_mflags} +make -C %{_vpath_builddir} doc %check -pushd tests +pushd %{_vpath_builddir}/tests LD_LIBRARY_PATH=~+/../src/ ctest -V if [ $? -ne 0 ]; then exit 1 @@ -779,6 +776,8 @@ fi popd %install +pushd %{_vpath_builddir} + rm -rf %{buildroot} mkdir -p %{buildroot}%{_libdir} @@ -796,6 +795,8 @@ make install DESTDIR=%{buildroot} rm -rf %{buildroot}/%{_libdir}/dmlite/test %endif +popd + %define basefolder %{buildroot}/%{_prefix}/share/dmlite/puppet/modules mkdir -p %{basefolder} cp -R src/puppet/dmlite %{basefolder} @@ -821,6 +822,7 @@ tar zxvf src/puppet/puppetlabs-stdlib-*.tar.gz -C %{basefolder}/stdlib --strip-c mkdir -p %{basefolder}/concat tar zxvf src/puppet/puppetlabs-concat-*.tar.gz -C %{basefolder}/concat/ --strip-components 1 + ## for dpm-xrootd ln -s libXrdDPMFinder-4.so %{buildroot}%{_libdir}/libXrdDPMFinder.so-4.3 ln -s libXrdDPMDiskAcc-4.so %{buildroot}%{_libdir}/libXrdDPMDiskAcc.so-4.3