Skip to content

Commit

Permalink
rpm: use %cmake macros
Browse files Browse the repository at this point in the history
Documentation about these macros is available in Fedora project
packaging guidelines:
https://docs.fedoraproject.org/en-US/packaging-guidelines/CMake/

One notable advantage of these macros is that they transparently define
compiler and linker flags with distribution defaults.

Signed-off-by: Rémi Palancher <[email protected]>
  • Loading branch information
rezib committed Nov 8, 2023
1 parent fac50e0 commit 3c4a013
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions mpifileutils.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,12 @@ File utilities designed for scalability and performance.
%setup -q

%build
#topdir=`pwd`
#installdir=$topdir/install

cmake ./ -DWITH_DTCMP_PREFIX=${installdir} -DWITH_LibCircle_PREFIX=${installdir} -DCMAKE_INSTALL_PREFIX=%{buildroot} -DENABLE_LUSTRE=ON -DENABLE_XATTRS=ON
make
%{cmake} ./ -DWITH_DTCMP_PREFIX=${installdir} -DWITH_LibCircle_PREFIX=${installdir} -DCMAKE_INSTALL_PREFIX=%{buildroot} -DENABLE_LUSTRE=ON -DENABLE_XATTRS=ON
%{cmake_build}

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


%files
Expand Down

0 comments on commit 3c4a013

Please sign in to comment.