mirror of
https://github.com/OpenCMT/uLib.git
synced 2025-12-06 07:21:31 +01:00
Massive reorganization of CMake files
This commit is contained in:
@@ -1,116 +0,0 @@
|
||||
Summary: Cosmic Muon Tomography core libraries
|
||||
Name: cmt-ulib
|
||||
Version: @PKGVERSION@
|
||||
Release: @PKGRELEASE@%{?dist}
|
||||
License: EUROPEAN UNION PUBLIC LICENCE v. 1.2
|
||||
Vendor: INFN
|
||||
URL: https://github.com/OpenCMT/uLib
|
||||
Group: Development/Libraries
|
||||
BuildArch: %{_arch}
|
||||
%if %{?rhel}%{!?rhel:0} >= 8
|
||||
BuildRequires: cmake
|
||||
%else
|
||||
BuildRequires: cmake3
|
||||
%endif
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: boost-devel
|
||||
BuildRequires: eigen3-devel
|
||||
BuildRequires: vtk-devel
|
||||
BuildRequires: readline-devel
|
||||
BuildRequires: pcl-devel
|
||||
BuildRequires: root-geom
|
||||
BuildRequires: root-genvector
|
||||
BuildRequires: root-smatrix
|
||||
BuildRequires: root-montecarlo-eg
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
AutoReqProv: yes
|
||||
Source: %{name}-%{version}.tar.gz
|
||||
|
||||
%description
|
||||
This package contains the base toolkit library for Cosmic Muon Tomography reconstruction,
|
||||
analysis and imaging software Developed by University of Padova and INFN Sezione di Padova Italy
|
||||
|
||||
%global _ulibpkgname mutom
|
||||
%global _ulibcmakedir %{_libdir}/cmake/%{_ulibpkgname}
|
||||
|
||||
%prep
|
||||
%setup -c
|
||||
rm -rf %{buildroot}
|
||||
mkdir -p %{buildroot}
|
||||
|
||||
%build
|
||||
mkdir %{_builddir}/%{name}-%{version}/build
|
||||
cd %{_builddir}/%{name}-%{version}/build
|
||||
%cmake -DCMAKE_INSTALL_PREFIX=%{buildroot}%{_prefix} \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DPACKAGE_NAME=%{_ulibpkgname} \
|
||||
-DPACKAGE_INSTALL_LIB_DIR=%{buildroot}%{_libdir} \
|
||||
-DPACKAGE_INSTALL_INC_DIR=%{buildroot}%{_includedir}/%{_ulibpkgname} \
|
||||
-DPACKAGE_INSTALL_CMAKE_DIR=%{buildroot}%{_ulibcmakedir} \
|
||||
-DNODOXYGEN=ON \
|
||||
%{_builddir}/%{name}-%{version}
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
cd %{_builddir}/%{name}-%{version}/build
|
||||
make install
|
||||
sed -i 's|%{buildroot}/usr|%{_prefix}|g' %{buildroot}%{_ulibcmakedir}/uLibTargets.cmake
|
||||
sed -i 's|%{buildroot}/usr|%{_prefix}|g' %{buildroot}%{_ulibcmakedir}/uLibTargets-relwithdebinfo.cmake
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/libmutom*.so.0.2
|
||||
%{_libdir}/uLibRootDict_rdict.pcm
|
||||
|
||||
%package devel
|
||||
Summary: Cosmic Muon Tomography core libraries, development files
|
||||
Requires: %{name}
|
||||
Requires: boost-devel
|
||||
Requires: eigen3-devel
|
||||
Requires: vtk-devel
|
||||
Requires: readline-devel
|
||||
Requires: pcl-devel
|
||||
Requires: root-geom
|
||||
Requires: root-genvector
|
||||
Requires: root-smatrix
|
||||
Requires: root-montecarlo-eg
|
||||
|
||||
|
||||
%description devel
|
||||
This package contains the base toolkit library for Cosmic Muon Tomography reconstruction,
|
||||
analysis and imaging software Developed by University of Padova and INFN Sezione di Padova Italy
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%dir %{_ulibcmakedir}
|
||||
/usr/bin/uLib_config
|
||||
%{_libdir}/libmutom*.so
|
||||
%{_ulibcmakedir}/*.cmake
|
||||
%dir %{_includedir}/%{_ulibpkgname}
|
||||
%dir %{_includedir}/%{_ulibpkgname}/Core
|
||||
%dir %{_includedir}/%{_ulibpkgname}/Math
|
||||
%dir %{_includedir}/%{_ulibpkgname}/Root
|
||||
%dir %{_includedir}/%{_ulibpkgname}/Detectors
|
||||
%dir %{_includedir}/%{_ulibpkgname}/Vtk
|
||||
%{_includedir}/%{_ulibpkgname}/*.h
|
||||
%{_includedir}/%{_ulibpkgname}/Core/*.h
|
||||
%{_includedir}/%{_ulibpkgname}/Math/*.h
|
||||
%{_includedir}/%{_ulibpkgname}/Math/*.hpp
|
||||
%{_includedir}/%{_ulibpkgname}/Root/*.h
|
||||
%{_includedir}/%{_ulibpkgname}/Detectors/*.h
|
||||
%{_includedir}/%{_ulibpkgname}/Vtk/*.h
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Dec 04 2018 Paolo Andreetto <paolo.andreetto@pd.infn.it> - 0.2.1-1
|
||||
- Repackaging for CentOS 7
|
||||
|
||||
@@ -13,7 +13,7 @@ set(Boost_USE_STATIC_LIBS OFF)
|
||||
set(Boost_USE_MULTITHREADED ON)
|
||||
set(Boost_USE_STATIC_RUNTIME OFF)
|
||||
|
||||
find_package(Boost 1.45.0 COMPONENTS serialization signals program_options REQUIRED)
|
||||
find_package(Boost 1.45.0 COMPONENTS program_options REQUIRED)
|
||||
if(Boost_FOUND)
|
||||
set(HAVE_BOOST true)
|
||||
endif(Boost_FOUND)
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
# Target for RPMs creation
|
||||
|
||||
set(PKGREL 1 CACHE STRING "Package build number")
|
||||
set(ITEMS_FOR_SOURCE AUTHORS
|
||||
CMakeConfig.in.h
|
||||
CMakePkgConfig.pc.in
|
||||
test.cpp
|
||||
uLibConfig.cmake.in
|
||||
uLib.creator
|
||||
ulib.h
|
||||
vtk_test.cpp
|
||||
CMake
|
||||
CMakeLists.txt
|
||||
Jenkinsfile
|
||||
src
|
||||
uLib.config
|
||||
uLibConfigVersion.cmake.in
|
||||
uLib.files
|
||||
uLib.includes)
|
||||
|
||||
add_custom_target(rpm
|
||||
COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/rpmbuild/BUILD
|
||||
${CMAKE_CURRENT_BINARY_DIR}/rpmbuild/RPMS
|
||||
${CMAKE_CURRENT_BINARY_DIR}/rpmbuild/SOURCES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/rpmbuild/SPECS
|
||||
${CMAKE_CURRENT_BINARY_DIR}/rpmbuild/SRPMS
|
||||
COMMAND tar -zcf ${CMAKE_CURRENT_BINARY_DIR}/rpmbuild/SOURCES/cmt-ulib-${PACKAGE_VERSION}.tar.gz ${ITEMS_FOR_SOURCE}
|
||||
COMMAND sed -e 's|@PKGVERSION@|${PACKAGE_VERSION}|g'
|
||||
-e 's|@PKGRELEASE@|${PKGREL}|g'
|
||||
CMake/cmt-ulib.spec.in > ${CMAKE_CURRENT_BINARY_DIR}/rpmbuild/SPECS/cmt-ulib.spec
|
||||
COMMAND QA_SKIP_BUILD_ROOT=1 rpmbuild -ba --define '_topdir ${CMAKE_CURRENT_BINARY_DIR}/rpmbuild'
|
||||
${CMAKE_CURRENT_BINARY_DIR}/rpmbuild/SPECS/cmt-ulib.spec
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
Reference in New Issue
Block a user