File alizams.spec of Package alizams
#
# spec file for package alizams
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: alizams
Version: @SERVICE@
Release: 0
Summary: DICOM Viewer
License: GPL-3.0-or-later
Group: Productivity/Graphics/Viewers
URL: https://github.com/AlizaMedicalImaging/AlizaMS
Source0: %{name}-%{version}.tar.xz
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: hicolor-icon-theme
BuildRequires: ninja
BuildRequires: pkgconfig
BuildRequires: update-desktop-files
BuildRequires: cmake(GDCM)
BuildRequires: cmake(ITK)
%if 0%{?sle_version} >= 150400
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5OpenGL)
BuildRequires: pkgconfig(Qt5PrintSupport)
BuildRequires: pkgconfig(Qt5Sql)
BuildRequires: pkgconfig(Qt5Svg)
BuildRequires: pkgconfig(Qt5Widgets)
%else
BuildRequires: cmake(Qt6Core)
BuildRequires: cmake(Qt6Core5Compat)
BuildRequires: cmake(Qt6Gui)
BuildRequires: cmake(Qt6OpenGLWidgets)
BuildRequires: cmake(Qt6PrintSupport)
BuildRequires: cmake(Qt6Sql)
BuildRequires: cmake(Qt6Svg)
BuildRequires: cmake(Qt6Widgets)
%endif
BuildRequires: pkgconfig(bullet)
BuildRequires: pkgconfig(charls)
BuildRequires: pkgconfig(eigen3)
BuildRequires: pkgconfig(lcms2)
BuildRequires: pkgconfig(libopenjp2)
#uildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(uuid)
BuildRequires: pkgconfig(xcb)
BuildRequires: pkgconfig(zlib)
%if 0%{?sle_version} >= 150400
BuildRequires: libQt5Svg5
%requires_eq libQt5Svg5
%else
BuildRequires: libQt6Svg6
%requires_eq libQt6Svg6
%endif
Provides: bundled(libmdcmjpeg8)
Provides: bundled(libmdcmjpeg12)
Provides: bundled(libmdcmjpeg16)
%description
A 2D and 3D DICOM viewer with many tools and very fast directory scanner
and DICOMDIR support. It can consistently de-identify DICOM files.
%prep
%autosetup
sed -i "/Exec=/s|%{_bindir}/||" package/archive/usr/share/applications/alizams.desktop
rm -rf alizalcms/
#m -rf b/
rm -rf CG/glew/
rm -rf mdcm/Utilities/{mdcmzlib/,mdcmopenjpeg/,mdcmcharls/,mdcmuuid/,pvrg/}
%build
%if 0%{?sle_version} >= 150400
%define __builder ninja
%cmake \
-DALIZA_QT_VERSION:STRING=5 \
%else
%cmake_qt6 \
-DALIZA_QT_VERSION:STRING=6 \
%endif
-DALIZA_DISABLE_SIMDMATH:BOOL=OFF \
-DALIZA_QT5_6_PLATFORM_XCB:BOOL=ON \
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150500
-DALIZA_USE_SYSTEM_BULLET:BOOL=OFF \
%else
-DALIZA_USE_SYSTEM_BULLET:BOOL=ON \
%endif
-DALIZA_USE_SYSTEM_LCMS2:BOOL=ON \
-DALIZA_MEDIASTORAGE_MODE:BOOL=OFF \
-DMDCM_USE_SYSTEM_ZLIB:BOOL=ON \
-DMDCM_USE_SYSTEM_UUID:BOOL=ON \
-DMDCM_USE_SYSTEM_OPENJPEG:BOOL=ON \
-DMDCM_USE_SYSTEM_CHARLS:BOOL=ON \
-DMDCM_USE_SYSTEM_OPENSSL:BOOL=OFF \
-DMDCM_USE_PVRG:BOOL=OFF \
-DMDCM_USE_SYSTEM_PVRG:BOOL=OFF \
-DITK_DIR:PATH="%{_libdir}/cmake/insighttoolkit/"
%if 0%{?sle_version} >= 150400
%ninja_build
%else
%qt6_build
%endif
%install
%if 0%{?sle_version} >= 150400
%ninja_install -C build
%else
%qt6_install
%endif
%suse_update_desktop_file -r %{name} Science MedicalSoftware
rm -rfv %{buildroot}%{_datadir}/icons/hicolor/42x42/
%files
%doc README.md
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.??g
%{_datadir}/metainfo/%{name}.metainfo.xml
%{_mandir}/man?/%{name}.?%{?ext_man}
%license LICENSE
%changelog