forked from pool/orthanc
6f87c821a3
- version 1.10.1 * for detailed changelog see NEWS - Test for SharedLibrary.Basic disabled (fails with new glibc) - Version 1.9.7 * New configuration option "DicomAlwaysAllowMove" to disable verification of the remote modality in C-MOVE SCP * API version upgraded to 15 * Added "Level" option to POST /tools/bulk-modify * Added missing OpenAPI documentation of "KeepSource" in ".../modify" and ".../anonymize" * Added file CITATION.cff * Linux Standard Base (LSB) builds of Orthanc can load non-LSB builds of plugins * Fix upload of ZIP archives containing a DICOMDIR file * Fix computation of the estimated time of arrival in jobs * Support detection of windowing and rescale in Philips multiframe images - version 1.9.6 * In lookup and query/retrieve, possibility to provide a specific study date * Clicking on "Send to remote modality" displays the job information to monitor progress * Fix orphaned attachments if bad revision number is provided - Remove executable bits from Python scripts when creating the source tree for the -source package to stop it requiring /usr/bin/python - version 1.9.5 * Anonymization is applied recursively to nested tags * API version upgraded to 14 * Added "Short", "Simplify" and/or "Full" options to control the format of DICOM tags in: - POST /modalities/{id}/find-worklist - POST /queries/{id}/answers/{index}/retrieve - POST /queries/{id}/retrieve * Fix broken "Do lookup" button in Orthanc Explorer * Error code and description of jobs are now saved into the Orthanc database - version 1.9.4 * Orthanc now anonymizes according to Basic Profile of PS 3.15-2021b Table E.1-1 * New configuration options: - "ExternalDictionaries" to load external DICOM dictionaries (useful for DICONDE) - "SynchronousZipStream" to disable streaming of ZIP * Orthanc Explorer supports the DICONDE dictionary * API version upgraded to 13 * New routes to handle groups of multiple, unrelated DICOM resources at once: - "/tools/bulk-anonymize" to anonymize a set of resources - "/tools/bulk-content" to get the content of a set of resources - "/tools/bulk-delete" to delete a set of resources - "/tools/bulk-modify" to modify a set of resources * ZIP archive/media generated in synchronous mode are now streamed by default * "Replace" tags in "/modify" and "/anonymize" now supports value representation AT * "/jobs/..." has new field "ErrorDetails" to help identify the cause of an error * "Replace", "Keep" and "Remove" in "/modify" and "/anonymize" accept paths to subsequences using the syntax of the dcmodify command-line tool (wildcards are supported as well) * Added "short", "simplify" and/or "full" options to control the format of DICOM tags in: - GET /patients, GET /studies, GET /series, GET /instances (together with "&expand") - GET /patients/{id}, GET /studies/{id}, GET /series/{id}, GET /instances/{id} - GET /patients/{id}/studies, GET /patients/{id}/series, GET /patients/{id}/instances - GET /studies/{id}/patient, GET /studies/{id}/series, GET /studies/{id}/instances - GET /series/{id}/patient, GET /series/{id}/study, GET /series/{id}/instances - GET /instances/{id}/patient, GET /instances/{id}/study, GET /instances/{id}/series - GET /patients/{id}/instances-tags, GET /patients/{id}/shared-tags - GET /studies/{id}/instances-tags, GET /series/{id}/shared-tags - GET /series/{id}/instances-tags, GET /studies/{id}/shared-tags - GET /patients/{id}/module, GET /patients/{id}/patient-module - GET /series/{id}/module, GET /studies/{id}/module, GET /instances/{id}/module - POST /tools/find * "/studies/{id}/split" accepts "Instances" parameter to split instances instead of series * "/studies/{id}/merge" accepts instances inside its "Resources" parameter * Full support of hierarchical relationships in tags whose VR is UI during anonymization * C-MOVE SCP: added possible DIMSE status "Sub-operations Complete - One or more Failures" * Fix issue #146 (Update Anonyization to 2019c) - was actually updated to 2021b * Upgraded dependencies for static builds (notably on Windows): - curl 7.77.0 - Version 1.9.3 * New configuration option: "DicomTlsRemoteCertificateRequired" to allow secure DICOM TLS connections without certificate * "ETag" headers for metadata and attachments now allow strong comparison (MD5 is included) * New CMake option: "ORTHANC_LUA_VERSION" to use a specific version of system-wide Lua * Fix the lifetime of temporary files associated with jobs that create ZIP archive/media: - In synchronous mode, their number could grow up to "JobsHistorySize" in Orthanc <= 1.9.2 - In asynchronous mode, the temporary files are removed as soon as their job gets canceled * Fix regression in the handling of "DicomCheckModalityHost" configuration option introduced by changeset 4182 in Orthanc 1.7.4 * Reduced memory consumption of "OrthancPluginHttpClient()", "OrthancPluginHttpClient2()" and "OrthancPluginCallPeerApi()" on POST/PUT if chunked transfer is disabled * Fix issue #195 (No need for BulkDataURI when Data Element is empty) - from version 1.9.2: * New configuration options related to multiple readers/writers: - "DatabaseServerIdentifier" identifies the server in the DB among a pool of Orthanc servers - "CheckRevisions" to protect against concurrent modifications of metadata and attachments * API version upgraded to 12 * "/system" reports the value of the "CheckRevisions" global option * "/.../{id}/metadata/{name}" and "/.../{id}/attachments/{name}/..." URIs handle the HTTP headers "If-Match", "If-None-Match" and "ETag" to cope with revisions * New function in the SDK: OrthancPluginCallRestApi() * Full refactoring of the database plugin SDK to handle multiple readers/writers, which notably implies the handling of retries in the case of collisions * Use the local timezone for query/retrieve in the Orthanc Explorer interface (was UTC before) * Fix "OrthancServer/Resources/Samples/Python/Replicate.py" for Python 3.x * Fix issue #83 (ServerIndex shall implement retries for DB temporary errors) * Upgraded dependencies for static builds (notably on Windows and LSB): - civetweb 1.14 - openssl 1.1.1k - version 1.9.1 * The "dicom-as-json" attachments are not explicitly stored anymore to improve performance * If the storage area doesn't support range reading, or if "StorageCompression" is enabled, a new type of attachment "dicom-until-pixel-data" is generated * New metadata automatically computed at the instance level: "PixelDataOffset" * New configuration option related to networking: - "Timeout" in "DicomModalities" to set DICOM SCU timeout on a per-modality basis - "Timeout" in "OrthancPeers" to set HTTP client timeout on a per-peer basis * API version upgraded to 11 * BREAKING CHANGES: - External applications should not call "/instances/.../attachments/dicom-as-json" anymore, and should use "/instances/.../tags" instead - "/instances/.../tags" route does not report the tags after "Pixel Data" (7fe0,0010) anymore * "/peers/{id}/store-straight": Synchronously send the DICOM instance in POST body to the peer * New arguments in the REST API: - "Timeout" in "/modalities/.../query" - "Timeout" in "/modalities/.../storage-commitment" - "Timeout" in "/queries/.../answers/.../query-{studies|series|instances}" * New value in enumeration: OrthancPluginDicomToJsonFlags_StopAfterPixelData * New value in enumeration: OrthancPluginDicomToJsonFlags_SkipGroupLengths * Improved precision of floating-point numbers in DICOM-as-JSON and DICOM summary * Optimization in C-STORE SCP by avoiding an unnecessary DICOM parsing * Fix build on big-endian architectures * Handle public tags with "UN" value representation and containing a string (cf. DICOM CP 246) * The numbering of sequences in Orthanc Explorer now uses the DICOM convention (starts at 1) * Possibility to generate a static library containing the Orthanc Framework - Version 1.9.0 * Support of DICOM TLS * New configuration options related to DICOM networking: - "DicomTlsEnabled" to enable DICOM TLS in Orthanc SCP - "DicomTlsCertificate" to provide the TLS certificate to be used in both Orthanc SCU and SCP - "DicomTlsPrivateKey" to provide the private key of the TLS certificate - "DicomTlsTrustedCertificates" to provide the list of TLS certificates to be trusted by Orthanc - "UseDicomTls" in "DicomModalities" to enable DICOM TLS in outgoing SCU on a per-modality basis - "MaximumPduLength" to tune the maximum PDU length (Protocol Data Unit) - "LocalAet" in "DicomModalities" to overwrite global "DicomAet" for SCU on a per-modality basis - "AcceptedTransferSyntaxes" to set the transfer syntax UIDs accepted by Orthanc C-STORE SCP - "H265TransferSyntaxAccepted" to enable/disable all the transfer syntaxes related to H.265 - "DicomAlwaysAllowFind" to disable verification of the remote modality in C-FIND SCP - "DicomAlwaysAllowGet" to disable verification of the remote modality in C-GET SCP * New configuration option: "DicomScuPreferredTransferSyntax" to control transcoding in C-STORE SCU * New command-line option: "--openapi" to write the OpenAPI documentation of the REST API to a file * New metadata automatically computed at the series level: "RemoteAET" * The DICOM meta-header and the transfer syntax are displayed at the "Instance" level * API version upgraded to 10 * "/tools/accepted-transfer-syntaxes": Get/set transfer syntaxes accepted by Orthanc C-STORE SCP * "/tools/unknown-sop-class-accepted": Get/set whether C-STORE SCP accepts unknown SOP class UID * "/modalities/{...}/query": New string argument "LocalAet" * "/tools/create-dicom": New flag "Force" to bypass consistency checks for the DICOM tags * BREAKING CHANGE: All the Lua callbacks "IsXXXTransferSyntaxAccepted()" and "IsUnknownSopClassAccepted()" have been removed * New functions in the SDK: - OrthancPluginCreateMemoryBuffer64() - OrthancPluginRegisterStorageArea2() - OrthancPluginCreateDicom2() * Refactoring and improvements to the cache of DICOM files (it can now hold many files) * New Prometheus metrics "orthanc_dicom_cache_count" and "orthanc_dicom_cache_size" * Fix upload of multiple DICOM files using one single POST call to "multipart/form-data" Could be the final resolution of issue #21 (DICOM files missing after uploading with Firefox) * Partial fix of issue #48 (Windows service not stopped properly), cf. comments 4 and 5 * Explicitly use little-endian to encode uncompressed file size with zlib compression * Upgraded dependencies for static builds (notably on Windows): - dcmtk 3.6.6 - jsoncpp 1.9.4 - Workaround for boo#1180359 - Version 1.8.2 * ZIP archives containing DICOM files can be uploaded using WebDAV * New config option "MallocArenaMax" to control memory usage on GNU/Linux * Explicit error log if trying to load a 32bit (resp. 64bit) plugin into a 64bit (resp. 32bit) version of Orthanc * New configuration options contributed by Varian Medical Systems: - "DeidentifyLogs" to remove patient identification from the logs (C-GET, C-MOVE, C-FIND) - "DeidentifyLogsDicomVersion" to specify the deidentification rules for the logs - "OrthancExplorerEnabled" to enable/disable the Orthanc Explorer Web user interface - "SslMinimumProtocolVersion" to set the minimal SSL protocol version (now defaults to SSL 1.2) - "SslCiphersAccepted" to set the accepted ciphers over SSL (now defaults to FIPS 140-2) * New configuration options related to ingest transcoding: - "IngestTranscodingOfUncompressed" to control whether uncompressed transfer syntaxes are transcoded - "IngestTranscodingOfCompressed" to control whether compressed transfer syntaxes are transcoded * "/instances" can be used to import ZIP archives provided in the POST body * Allow concurrency on the OrthancPluginRegisterIncomingHttpRequestFilter() callbacks * Allow empty request body in "/modalities/{id}/echo" * If meta-header is missing, best-effort to extract "TransferSyntax" in "/instances/{id}/metadata" - Version 1.8.1 * adaption to new systemd-macros (OBS) * New sample tool "OrthancImport.py" to easily import compressed archives (ZIP) into Orthanc * Logging categories (cf. command-line options starting with "--verbose-" and "--trace=") * New command-line option "--trace-dicom" to access full debug information from DCMTK * New config option "DicomEchoChecksFind" to automatically complement C-GET SCU with C-FIND SCU * API version upgraded to 9 * "/tools/dicom-echo": Execute C-Echo SCU to a modality that is not registered in "/modalities" * "/tools/log-level-*": Dynamically access and/or change the verbosity of logging categories * "/peers/{id}/configuration": Get the configuration of one peer (cf. "/peers?expand") * "/modalities/{id}/configuration": Get the configuration of one modality (cf. "/modalities?expand") * "/tools/dicom-echo" and "/modalities/{id}/echo" now accept the field "CheckFind" in their JSON body to complement C-GET SCU with C-FIND SCU ("DicomEchoChecksFind" on a per-connection basis) * Archive/media jobs report the size of the created ZIP file in content field "ArchiveSizeMB" * New function in the SDK: OrthancPluginGenerateRestApiAuthorizationToken() * C-GET SCP: Fix responses and handling of cancel * Fix decoding sequence if "BuiltinDecoderTranscoderOrder" is "Before" * Fix keep-alive in the embedded HTTP server by setting the "Keep-Alive" HTTP header * Fix access to videos as a single raw frame (feature broken since Orthanc 1.6.0) * REST API now returns 404 error if deleting an inexistent peer or modality * Improved forward ABI compatibility of Orthanc Framework (notably, no inline methods anymore) * Upgraded dependencies for static builds (notably on Windows and LSB): - civetweb 1.13 - version 1.8.0 * Serving the content of Orthanc as a WebDAV network share * New config options: "WebDavEnabled", "WebDavDeleteAllowed" and "WebDavUploadAllowed" - Version 1.7.4 * New configuration options to enable HTTP peers identification through certificates: "SslVerifyPeers" and "SslTrustedClientCertificates" * New configuration option "SyncStorageArea" to immediately commit the files onto the disk (through fsync()), so as to avoid discrepencies between DB and filesystem in case of hard shutdown of the machine running Orthanc. This slows down adding new files into Orthanc. * Underscores are now allowed in peers/modalities symbolic names * Fix compatibility with C-MOVE SCU requests issued by Ambra * Fix transcoding in C-MOVE SCP, in the case where "SynchronousCMove" is "true" * When checking DICOM allowed methods, if there are multiple modalities with the same AET, differentiate them from the calling IP * Enable the access to raw frames in Philips ELSCINT1 proprietary compression * Support empty key passwords when using HTTP client certificates * Fix handling of "ModalitiesInStudy" (0008,0061) in C-FIND and "/tools/find" - Version 1.7.3 * API version upgraded to 8 * "/peers/{id}/store": New option "Compress" to compress DICOM data using gzip * "OrthancPeerStore" jobs now report the transmitted size in their public content * New config option "Worklist.LimitAnswers" for the sample modality worklist plugin * Add missing tag "Retrieve AE Title (0008,0054)" in C-FIND SCP responses * Fix DICOM SCP filters if some query tag has > 256 characters (list of UIDs matching) * "/series/.../ordered-slices" supports spaces in Image Position/Orientation Patient tags * Fix possible crash in HttpClient if sending multipart body (can occur in STOW-RS) * Support receiving multipart messages larger than 2GB in the embedded HTTP server - Version 1.7.2 * C-FIND SCP now returns private tags (cf. option "DefaultPrivateCreator") * Packaging of the Orthanc framework as a shared library * New change types in the SDK: JobSubmitted, JobSuccess, JobFailure * Issue #182: Better reporting of errors in plugins reading chunked HTTP body * Fix issue #183 (C-ECHO always fails in Orthanc Explorer, regression from 1.6.1 to 1.7.0) - version 1.7.1 * Fix decoding of DICOM images for plugins (for compatibility with Orthanc Web Viewer 2.6) - new version 1.7.0 * Support of DICOM C-GET SCP (contribution by Varian) * DICOM transcoding over the REST API * Transcoding from compressed to uncompressed transfer syntaxes over DICOM C-STORE SCU (if the remote modality doesn't support compressed syntaxes) * New configuration options related to transcoding: "TranscodeDicomProtocol", "BuiltinDecoderTranscoderOrder", "IngestTranscoding" and "DicomLossyTranscodingQuality" * See NEWS for details - version 1.6.1 sqlitewrapper.patch removed (included in 1.6.1) - sqlitewrapper.patch (boo#1167431) - various security hardenings (boo#1167431) - ConnectivityCheck Plugin enabled in build - version 1.6.0 bugfixes and improvements (see /usr/share/doc/packages/orthanc/NEWS rpmlintrc for some rpmlint warnings - for i586, one test disabled (fail due to rounding issues) - version 1.5.8 * various bugfixes, see NEWS for details - version 1.5.7 * Documentation added - version 1.5.5 - version 1.5.4 civetweb.patch removed various bugfixes - civetweb.patch added - version 1.5.3 * New configuration option: "SaveJobs" to specify whether jobs are stored in the database * Don't return tags whose group is below 0x0008 in C-FIND SCP answers * Fix compatibility with DICOMweb plugin (allow multipart answers over HTTP Keep-Alive) * Fix issue #73 (/modalities/{modalityId}/store raises 500 errors instead of 404) * Fix issue #90 (C-Find shall match missing tags to null/empty string) * Fix issue #119 (/patients/.../archive returns a 500 when JobsHistorySize is 0) * Fix issue #128 (Asynchronous C-MOVE: invalid number of remaining sub-operations) - version 1.5.2 temporary fixes for civetweb 1.11 removed - Version 1.5.1 Initial OBS build spec file adapted from Fedora project <s.jodogne@gmail.com> OBS-URL: https://build.opensuse.org/request/show/964989 OBS-URL: https://build.opensuse.org/package/show/graphics/orthanc?expand=0&rev=43
282 lines
9.8 KiB
RPMSpec
282 lines
9.8 KiB
RPMSpec
#
|
|
# spec file for package orthanc
|
|
#
|
|
# Copyright (c) 2022 SUSE LLC
|
|
# Copyright (c) 2019-2021 Dr. Axel Braun
|
|
#
|
|
# 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: orthanc
|
|
Version: 1.10.1
|
|
Release: 0
|
|
Summary: RESTful DICOM server for healthcare and medical research
|
|
License: GPL-3.0-or-later
|
|
Group: Productivity/Graphics/Visualization/Other
|
|
URL: http://www.orthanc-server.com/
|
|
Source0: http://www.orthanc-server.com/downloads/get.php?path=/orthanc/Orthanc-%{version}.tar.gz
|
|
Source1: orthanc.service
|
|
Source2: orthanc-readme.SUSE
|
|
Source3: serve-folders.json
|
|
Source4: worklists.json
|
|
Source5: index.html
|
|
Source7: orthanc-rpmlintrc
|
|
Source8: Configuration.json
|
|
# Sources for plugin - need a defined version, so taking them from orthanc-server
|
|
Source10: http://orthanc.osimis.io/ThirdPartyDownloads/dicom-web/bootstrap-4.3.1.zip
|
|
Source11: http://orthanc.osimis.io/ThirdPartyDownloads/dicom-web/axios-0.19.0.tar.gz
|
|
Source12: http://orthanc.osimis.io/ThirdPartyDownloads/jquery-3.4.1.min.js
|
|
Source13: http://orthanc.osimis.io/ThirdPartyDownloads/dicom-web/vuejs-2.6.10.tar.gz
|
|
|
|
BuildRequires: civetweb-devel
|
|
BuildRequires: cmake >= 2.8.0
|
|
BuildRequires: curl-devel
|
|
BuildRequires: dcmtk
|
|
BuildRequires: dcmtk-devel
|
|
BuildRequires: doxygen
|
|
BuildRequires: gcc-c++
|
|
BuildRequires: googletest-devel
|
|
BuildRequires: help2man
|
|
BuildRequires: jsoncpp-devel
|
|
BuildRequires: libboost_date_time-devel >= 1.66
|
|
BuildRequires: libboost_filesystem-devel >= 1.66
|
|
BuildRequires: libboost_iostreams-devel >= 1.66
|
|
BuildRequires: libboost_locale-devel >= 1.66
|
|
BuildRequires: libboost_regex-devel >= 1.66
|
|
BuildRequires: libboost_system-devel >= 1.66
|
|
BuildRequires: libboost_thread-devel >= 1.66
|
|
#Workaround for boo#1180359
|
|
BuildRequires: libbz2-devel
|
|
BuildRequires: libjpeg-devel
|
|
BuildRequires: libpng-devel
|
|
BuildRequires: libtiff-devel
|
|
BuildRequires: libuuid-devel
|
|
BuildRequires: libwrap0
|
|
BuildRequires: libxml2-devel
|
|
BuildRequires: openssl-devel
|
|
BuildRequires: pugixml-devel
|
|
BuildRequires: sqlite3-devel
|
|
BuildRequires: tcpd-devel
|
|
BuildRequires: unzip
|
|
#Workaround for boo#1180359
|
|
BuildRequires: zlib-devel
|
|
BuildRequires: pkgconfig(icu-uc)
|
|
BuildRequires: pkgconfig(libsystemd)
|
|
BuildRequires: pkgconfig(lua5.1)
|
|
|
|
Requires: dcmtk
|
|
Requires(pre): /usr/sbin/groupadd
|
|
Requires(pre): /usr/sbin/useradd
|
|
|
|
%{?systemd_ordering}
|
|
|
|
%description
|
|
Orthanc aims at providing a simple, yet powerful standalone DICOM server.
|
|
Orthanc can turn any computer running Windows or Linux into a DICOM store
|
|
(in other words, a mini-PACS system). Its architecture is lightweight,
|
|
meaning that no complex database administration is required, nor the
|
|
installation of third-party dependencies. What makes Orthanc unique
|
|
is the fact that it provides a RESTful API. Thanks to this major
|
|
feature, it is possible to drive Orthanc from any computer language.
|
|
|
|
The DICOM tags of the stored medical images can be downloaded in the
|
|
JSON file format. Furthermore, standard PNG images can be generated
|
|
on-the-fly from the DICOM instances by Orthanc. Orthanc lets its
|
|
users focus on the content of the DICOM files, hiding the complexity
|
|
of the DICOM format and of the DICOM protocol.
|
|
|
|
%package -n %{name}-devel
|
|
Summary: Header and source files for creating Orthanc plugins
|
|
Group: Development/Libraries/C and C++
|
|
Provides: orthanc-static = %{version}-%{release}
|
|
|
|
%description -n %{name}-devel
|
|
This package includes the header files to develop C/C++ plugins for Orthanc.
|
|
|
|
%package -n %{name}-doc
|
|
Summary: Documentation files for Orthanc
|
|
Group: Productivity/Graphics/Visualization/Other
|
|
BuildArch: noarch
|
|
|
|
%description -n %{name}-doc
|
|
This package includes the documentation and the sample codes available
|
|
for Orthanc.
|
|
It also includes the Python and LUA Scripts, and the documentation to develop
|
|
C/C++ plugins for Orthanc.
|
|
|
|
%package source
|
|
Summary: This package includes the source files for Orthanc
|
|
Group: Development/Sources
|
|
|
|
%description source
|
|
This package includes the source files for Orthanc. Use it in conjunction with the -devel package
|
|
|
|
%prep
|
|
%setup -q -n Orthanc-%{version}
|
|
|
|
cp %{S:1} %{S:2} .
|
|
|
|
#slight change in standard configuration for OrthancStorage
|
|
cp %{S:8} OrthancServer/Resources/.
|
|
|
|
#OrthancPlugins may ask for additional files to be loaded
|
|
#Putting them into this folder prevents download of sources from the web
|
|
mkdir -p OrthancServer/Plugins/Samples/ConnectivityChecks/ThirdPartyDownloads
|
|
cp %{S:10} %{S:11} %{S:12} %{S:13} OrthancServer/Plugins/Samples/ConnectivityChecks/ThirdPartyDownloads/.
|
|
|
|
%build
|
|
%cmake ../OrthancServer \
|
|
-DSTANDALONE_BUILD:BOOL=ON \
|
|
-DSTATIC_BUILD:BOOL=OFF \
|
|
-DENABLE_CIVETWEB=ON \
|
|
-DORTHANC_UNIT_TESTS_LINK_FRAMEWORK=OFF \
|
|
-DUSE_SYSTEM_MONGOOSE=OFF \
|
|
-DSYSTEM_MONGOOSE_USE_CALLBACKS=OFF \
|
|
-DUNIT_TESTS_WITH_HTTP_CONNEXIONS=OFF \
|
|
-DBoost_NO_BOOST_CMAKE=ON
|
|
|
|
%cmake_build %{?_smp_mflags}
|
|
|
|
# Generate the man page
|
|
help2man ./Orthanc -N -n "Lightweight, RESTful DICOM server for healthcare and medical research" > %{name}.1
|
|
|
|
%check
|
|
# we disable one test for i586
|
|
%ifarch != ix86
|
|
build/UnitTests
|
|
%else
|
|
build/UnitTests --gtest_filter=-ImageProcessing.Convolution --gtest_filter=-Version.CivetwebCompression --gtest_filter=-SharedLibrary.Basic
|
|
%endif
|
|
|
|
%install
|
|
# install: make some dirs...
|
|
mkdir -p -m 755 %{buildroot}
|
|
mkdir -p -m 755 %{buildroot}%{_sysconfdir}/%{name}
|
|
mkdir -p -m 755 %{buildroot}%{_unitdir}
|
|
mkdir -p -m 755 %{buildroot}%{_initddir}
|
|
mkdir -p -m 755 %{buildroot}%{_bindir}
|
|
mkdir -p -m 755 %{buildroot}%{_sbindir}
|
|
mkdir -p -m 755 %{buildroot}%{_libdir}
|
|
mkdir -p -m 755 %{buildroot}%{_mandir}
|
|
mkdir -p -m 755 %{buildroot}%{_docdir}/%{name}
|
|
|
|
##setup source directory
|
|
mkdir -p -m 755 %{buildroot}/usr/src/%{name}
|
|
# Copy sources
|
|
tar --strip-components 1 -xzf %{S:0} -C %{buildroot}/usr/src/%{name}/
|
|
# Do not mark Python scripts as executable
|
|
find %{buildroot}/usr/src/%{name} -name '*.py' -exec chmod a-x "{}" +
|
|
#...and delete dot files
|
|
rm %{buildroot}/usr/src/%{name}/.hg*
|
|
rm %{buildroot}/usr/src/%{name}/.travis*
|
|
|
|
%cmake_install
|
|
|
|
##move the doc into
|
|
cp -r %{buildroot}/usr/share/doc/%{name}/* %{buildroot}%{_docdir}/%{name}/.
|
|
rm -rf %{buildroot}/usr/share/doc/%{name}
|
|
|
|
install -m 755 -d %{buildroot}%{_mandir}/man1
|
|
cp build/%{name}.1 %{buildroot}%{_mandir}/man1
|
|
|
|
install -m 755 -d %{buildroot}%{_sysconfdir}/%{name}
|
|
cp %{S:3} %{buildroot}%{_sysconfdir}/%{name}
|
|
cp %{S:4} %{buildroot}%{_sysconfdir}/%{name}
|
|
cp %{S:8} %{buildroot}%{_sysconfdir}/%{name}
|
|
|
|
install -m 755 -d %{buildroot}%{_unitdir}
|
|
cp orthanc.service %{buildroot}%{_unitdir}
|
|
|
|
install -m 755 -d %{buildroot}%{_sharedstatedir}/%{name}/db-v6
|
|
|
|
# Move the plugins from "/usr/lib64/" to "/usr/lib64/orthanc", and
|
|
# remove the symbolic links generated by CMake
|
|
mkdir -p %{buildroot}%{_libdir}/%{name}
|
|
mv build/*.so.%{version} %{buildroot}%{_libdir}/%{name}
|
|
rm build/*.so
|
|
|
|
# move the executables to stay consistent
|
|
mv %{buildroot}%{_bindir}/OrthancRecoverCompressedFile %{buildroot}%{_bindir}/orthancRecoverCompressedFile
|
|
mv %{buildroot}%{_sbindir}/Orthanc %{buildroot}%{_sbindir}/orthanc
|
|
|
|
# Create symbolic links to plugins in "/usr/share/orthanc/plugins"
|
|
# We stick to the "relative symlinks" section of the guideline
|
|
|
|
rm %{buildroot}%{_prefix}/share/%{name}/plugins/*.so*
|
|
|
|
ln -s ../../../..%{_libdir}/%{name}/libServeFolders.so.%{version} \
|
|
%{buildroot}%{_prefix}/share/%{name}/plugins/libServeFolders.so
|
|
ln -s ../../../..%{_libdir}/%{name}/libModalityWorklists.so.%{version} \
|
|
%{buildroot}%{_prefix}/share/%{name}/plugins/libModalityWorklists.so
|
|
ln -s ../../../..%{_libdir}/%{name}/libConnectivityChecks.so.%{version} \
|
|
%{buildroot}%{_prefix}/share/%{name}/plugins/libConnectivityChecks.so
|
|
|
|
# Prepare documentation: "index.html", Doxygen of plugin SDK, and sample codes
|
|
cp -r %{S:5} %{buildroot}%{_docdir}/%{name}/
|
|
cp -r OrthancServer/Resources/Samples/ %{buildroot}%{_docdir}/%{name}/Samples
|
|
cp -r OrthancServer/Plugins/Samples/ %{buildroot}%{_docdir}/%{name}/OrthancPluginSamples
|
|
|
|
%pre
|
|
getent group orthanc >/dev/null || groupadd -r orthanc
|
|
getent passwd orthanc >/dev/null || \
|
|
useradd -r -g orthanc -G orthanc -d %{_sharedstatedir}/orthanc -s /sbin/nologin \
|
|
-c "User account that holds information for Orthanc" orthanc
|
|
|
|
%service_add_pre orthanc.service
|
|
|
|
%preun
|
|
%service_del_preun orthanc.service
|
|
|
|
%post
|
|
/sbin/ldconfig
|
|
%service_add_post orthanc.service
|
|
|
|
%postun
|
|
/sbin/ldconfig
|
|
%service_del_postun orthanc.service
|
|
|
|
%files
|
|
%doc AUTHORS NEWS README TODO orthanc-readme.SUSE
|
|
%license COPYING
|
|
%{_mandir}/man1/orthanc.1*
|
|
%{_bindir}/orthancRecoverCompressedFile
|
|
%{_sbindir}/orthanc
|
|
%{_unitdir}/orthanc.service
|
|
%{_libdir}/orthanc/*.so.%{version}
|
|
%{_prefix}/share/orthanc/plugins/*.so*
|
|
%dir %attr(0755, orthanc, orthanc) %{_sysconfdir}/orthanc
|
|
%dir %{_libdir}/orthanc
|
|
%dir %{_prefix}/share/orthanc
|
|
%dir %{_prefix}/share/orthanc/plugins
|
|
%defattr(0750, orthanc , orthanc)
|
|
%config(noreplace) %{_sysconfdir}/orthanc/*.json
|
|
%dir %attr(0755, orthanc, orthanc) %{_sharedstatedir}/orthanc
|
|
%dir %attr(0755, orthanc, orthanc) %{_sharedstatedir}/orthanc/db-v6
|
|
|
|
%files -n orthanc-devel
|
|
%dir %{_includedir}/orthanc
|
|
%{_includedir}/orthanc/*
|
|
|
|
%files -n orthanc-doc
|
|
%{_docdir}/orthanc/index.html
|
|
%{_docdir}/orthanc/Orthanc*
|
|
%{_docdir}/orthanc/Samples/*
|
|
%dir %attr(0755, orthanc, orthanc) %{_docdir}/orthanc/Samples
|
|
|
|
%files source
|
|
%defattr(-,root,root)
|
|
%dir /usr/src/%{name}
|
|
/usr/src/%{name}/*
|
|
|
|
%changelog
|