%global debug_package %{nil} %global source_date_epoch_from_changelog %{nil} Name: ndmspc Version: 1.1.0 Release: 0.1.rc13%{?dist} Summary: NDMSPC Group: System Environment/Libraries License: LGPL v3+ Source0: %{name}-%{version}.tar.gz %if 0%{?rhel} == 10 || 0%{?almalinux} == 10 %global with_numcal 0 %global with_parquet 0 %else %if 0%{?rhel} == 9 || 0%{?almalinux} == 9 %global with_numcal 1 %global with_parquet 0 %else %global with_numcal 1 %global with_parquet 1 %endif %endif BuildRequires: systemd-rpm-macros BuildRequires: gcc-c++, cmake BuildRequires: doxygen BuildRequires: openssl-devel, libcurl-devel, libwebsockets-devel # BuildRequires: protobuf-devel BuildRequires: json-devel %if %{with_parquet} BuildRequires: parquet-libs-devel %endif BuildRequires: root, root-net-http, root-net-httpsniff %if %{with_numcal} BuildRequires: ginac-devel, cuba-devel %endif Requires: root, root-netx, xrootd-client Requires: libwebsockets-devel, json-devel %description NDMSPC %package doc Summary: Documentation Group: Documentation Requires: %{name} = %{version}-%{release}, pkgconfig %description doc This package contains ndmspc documentation. %if %{with_numcal} %package numcal Summary: Numcal support for ndmspc Group: Additional Packages Requires: %{name} = %{version}-%{release}, pkgconfig Requires: ginac, cuba %description numcal This package contains numcal support for ndmspc. %endif %package server Summary: Server for ndmspc Group: Additional Packages Requires: %{name} = %{version}-%{release}, pkgconfig Requires: root-net-http, root-net-httpsniff %description server This package contains server part for ndmspc. %package jupyroot Summary: Jupyroot bindings for ndmspc Group: Additional Packages Requires: %{name} = %{version}-%{release}, pkgconfig Requires: python3-jupyroot, root-gui-browserv7-v7 %description jupyroot This package contains Jupyroot bindings for ndmspc. %prep %setup -q %build mkdir build cd build cmake ../ \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_DOCUMENTATION=on \ -DWITH_TEST=OFF \ %if %{with_parquet} -DWITH_PARQUET=ON \ %else -DWITH_PARQUET=OFF \ %endif %if %{with_numcal} -DWITH_NUMCAL=ON %else -DWITH_NUMCAL=OFF %endif make %{?_smp_mflags} cd ../ %install rm -rf %{buildroot} cd build make install DESTDIR=%{buildroot} %post server %systemd_post ndmspc-http@*.service %preun server %systemd_preun ndmspc-http@*.service %postun server %systemd_postun ndmspc-http@*.service %preun jupyroot %systemd_preun ndmspc-notebook@*.service %postun jupyroot %systemd_postun ndmspc-notebook@*.service %post jupyroot %systemd_post ndmspc-notebook@*.service %files %exclude %{_libdir}/libNdmspcNumcal* %exclude %{_includedir}/ndmspc/NNumcalManager.h %{_libdir}/* %{_bindir}/ndmspc-run %{_datadir}/%{name}/* %{_sysconfdir}/ndmspc/* %{_sysconfdir}/profile.d/* %{_includedir}/* %files doc %doc /usr/share/doc/%{name}/ %if %{with_numcal} %files numcal %{_libdir}/libNdmspcNumcal* %{_includedir}/ndmspc/NNumcalManager.h %endif %files server %{_bindir}/ndmspc-server %{_unitdir}/ndmspc-http@.service %{_sysconfdir}/systemd/user/ndmspc-http@.service %files jupyroot %{_unitdir}/ndmspc-notebook@.service %{_sysconfdir}/systemd/user/ndmspc-notebook@.service %changelog