[orthanc] Initial import (#888301).
Sebastien Jodogne
sjodogne at fedoraproject.org
Mon Apr 8 02:27:42 UTC 2013
commit 5f57ee1c635a4350444d242afd71bcbce6e9aa4a
Author: Sebastien Jodogne <s.jodogne at gmail.com>
Date: Mon Apr 8 04:27:30 2013 +0200
Initial import (#888301).
.gitignore | 1 +
orthanc-0.5.0-cmake.patch | 38 +++++++++++
orthanc.json | 92 ++++++++++++++++++++++++++
orthanc.service | 13 ++++
orthanc.spec | 158 +++++++++++++++++++++++++++++++++++++++++++++
sources | 1 +
6 files changed, 303 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..2c222b6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/Orthanc-0.5.0.tar.gz
diff --git a/orthanc-0.5.0-cmake.patch b/orthanc-0.5.0-cmake.patch
new file mode 100644
index 0000000..09ec830
--- /dev/null
+++ b/orthanc-0.5.0-cmake.patch
@@ -0,0 +1,38 @@
+--- CMakeLists.txt.orig 2013-04-04 15:55:38.622568766 +0200
++++ CMakeLists.txt 2013-04-04 15:56:20.482570468 +0200
+@@ -65,7 +65,8 @@
+ include(${CMAKE_SOURCE_DIR}/Resources/CMake/DcmtkConfiguration.cmake)
+ endif()
+
+-include(${CMAKE_SOURCE_DIR}/Resources/CMake/MongooseConfiguration.cmake)
++#include(${CMAKE_SOURCE_DIR}/Resources/CMake/MongooseConfiguration.cmake)
++link_libraries(mongoose)
+ include(${CMAKE_SOURCE_DIR}/Resources/CMake/ZlibConfiguration.cmake)
+ include(${CMAKE_SOURCE_DIR}/Resources/CMake/SQLiteConfiguration.cmake)
+ include(${CMAKE_SOURCE_DIR}/Resources/CMake/JsonCppConfiguration.cmake)
+@@ -181,14 +182,14 @@
+
+ install(
+ TARGETS Orthanc
+- RUNTIME DESTINATION bin
++ RUNTIME DESTINATION sbin
+ )
+
+ # Build the unit tests if required
+ if (BUILD_UNIT_TESTS)
+ add_definitions(-DORTHANC_BUILD_UNIT_TESTS=1)
+ include(${CMAKE_SOURCE_DIR}/Resources/CMake/GoogleTestConfiguration.cmake)
+- add_executable(UnitTests
++ add_executable(UnitTestsExecutable
+ ${GTEST_SOURCES}
+ UnitTests/RestApi.cpp
+ UnitTests/SQLite.cpp
+@@ -200,7 +201,7 @@
+ UnitTests/MemoryCache.cpp
+ UnitTests/main.cpp
+ )
+- target_link_libraries(UnitTests ServerLibrary CoreLibrary)
++ target_link_libraries(UnitTestsExecutable ServerLibrary CoreLibrary)
+ endif()
+ endif()
+
diff --git a/orthanc.json b/orthanc.json
new file mode 100644
index 0000000..3d115da
--- /dev/null
+++ b/orthanc.json
@@ -0,0 +1,92 @@
+{
+ /**
+ * General configuration of Orthanc
+ **/
+
+ // The logical name of this instance of Orthanc. This one is
+ // displayed in Orthanc Explorer and at the URI "/system".
+ "Name" : "Orthanc",
+
+ // Path to the directory that holds the database
+ "StorageDirectory" : "/var/lib/orthanc/db-v3",
+
+ // Enable the transparent compression of the DICOM instances
+ "StorageCompression" : false,
+
+ // Maximum size of the storage in MB (a value of "0" indicates no
+ // limit on the storage size)
+ "MaximumStorageSize" : 0,
+
+ // Maximum number of patients that can be stored at a given time
+ // in the storage (a value of "0" indicates no limit on the number
+ // of patients)
+ "MaximumPatientCount" : 0,
+
+
+ /**
+ * Configuration of the HTTP server
+ **/
+
+ // HTTP port for the REST services and for the GUI
+ "HttpPort" : 8042,
+
+
+
+ /**
+ * Configuration of the DICOM server
+ **/
+
+ // The DICOM Application Entity Title
+ "DicomAet" : "ORTHANC",
+
+ // Check whether the called AET corresponds during a DICOM request
+ "DicomCheckCalledAet" : false,
+
+ // The DICOM port
+ "DicomPort" : 4242,
+
+
+
+ /**
+ * Security-related options
+ **/
+
+ // Whether remote hosts can connect to the HTTP server
+ "RemoteAccessAllowed" : false,
+
+ // Whether or not SSL is enabled
+ "SslEnabled" : false,
+
+ // Path to the SSL certificate
+ "SslCertificate" : "certificate.pem",
+
+ // Whether or not the password protection is enabled
+ "AuthenticationEnabled" : false,
+
+ // The list of the registered users. Because Orthanc uses HTTP
+ // Basic Authentication, the passwords are stored as plain text.
+ "RegisteredUsers" : {
+ "alice" : "alicePassword"
+ },
+
+
+
+ /**
+ * Network topology
+ **/
+
+ // The list of the known DICOM modalities
+ "DicomModalities" : {
+ /**
+ * Uncommenting the following line would enable Orthanc to
+ * connect to an instance of the "storescp" open-source DICOM
+ * store (shipped in the DCMTK distribution) started by the
+ * command line "storescp 2000".
+ **/
+ // "sample" : [ "STORESCP", "localhost", 2000 ]
+ },
+
+ // The list of the known Orthanc peers (currently unused)
+ "OrthancPeers" : {
+ }
+}
diff --git a/orthanc.service b/orthanc.service
new file mode 100644
index 0000000..2833757
--- /dev/null
+++ b/orthanc.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Orthanc DICOM server
+Documentation=man:Orthanc(1) https://code.google.com/p/orthanc/
+After=syslog.target network.target
+
+[Service]
+Type=simple
+User=orthanc
+Group=orthanc
+ExecStart=/usr/sbin/Orthanc /etc/orthanc/orthanc.json
+
+[Install]
+WantedBy=multi-user.target
diff --git a/orthanc.spec b/orthanc.spec
new file mode 100644
index 0000000..ec97f63
--- /dev/null
+++ b/orthanc.spec
@@ -0,0 +1,158 @@
+Name: orthanc
+Version: 0.5.0
+Release: 1%{?dist}
+Summary: RESTful DICOM server for healthcare and medical research
+
+License: GPLv3 with exceptions
+URL: https://code.google.com/p/orthanc/
+Source0: https://orthanc.googlecode.com/files/Orthanc-%{version}.tar.gz
+Source1: orthanc.json
+Source2: orthanc.service
+
+# This patch makes Orthanc link against the "mongoose-lib" package of
+# the Fedora distribution. This patch also fixes a problem with
+# in-place builds that are currently not supported by the CMake script
+# of Orthanc ("UnitTests" is at the same time the name of a source
+# directory and of a generated executable).
+Patch1: orthanc-0.5.0-cmake.patch
+
+BuildRequires: cmake >= 2.8.0
+BuildRequires: boost-devel
+BuildRequires: curl-devel
+BuildRequires: dcmtk-devel
+BuildRequires: glog-devel
+BuildRequires: gtest-devel
+BuildRequires: help2man
+BuildRequires: libpng-devel
+BuildRequires: libsqlite3x-devel
+BuildRequires: libuuid-devel
+BuildRequires: mongoose-devel
+BuildRequires: openssl-devel
+BuildRequires: python
+BuildRequires: jsoncpp-devel
+
+# The following line is required to add the "orthanc" user and group
+Requires(pre): shadow-utils
+
+# The following lines are required to install the Systemd service
+# https://fedoraproject.org/wiki/Packaging:ScriptletSnippets?rd=Packaging/ScriptletSnippets#Macroized_scriptlets_.28Fedora_18.2B.29
+Requires(post): systemd
+Requires(preun): systemd
+Requires(postun): systemd
+
+
+%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.
+
+
+%prep
+%setup -q -n Orthanc-%{version}
+%patch1
+
+# Copy the configuration file and the Systemd Service for the Orthanc server
+cp -p %SOURCE1 orthanc.json
+cp -p %SOURCE2 orthanc.service
+
+
+%build
+%cmake -DSTATIC_BUILD:BOOL=OFF \
+ -DSTANDALONE_BUILD:BOOL=ON \
+ -DUSE_DYNAMIC_GOOGLE_LOG:BOOL=ON \
+ -DUSE_DYNAMIC_JSONCPP:BOOL=ON \
+ -DCMAKE_BUILD_TYPE=Release \
+ .
+
+make %{?_smp_mflags}
+
+# Generate the man page
+help2man ./Orthanc -N -n "Lightweight, RESTful DICOM server for healthcare and medical research" > Orthanc.1
+
+
+%check
+# Execute the unit tests
+./UnitTestsExecutable
+
+
+%install
+make install DESTDIR=%{buildroot}
+
+install -m 755 -d %{buildroot}%{_mandir}/man1
+cp Orthanc.1 %{buildroot}%{_mandir}/man1
+
+install -m 755 -d %{buildroot}%{_sysconfdir}/orthanc
+cp orthanc.json %{buildroot}%{_sysconfdir}/orthanc
+
+install -m 755 -d %{buildroot}%{_unitdir}
+cp orthanc.service %{buildroot}%{_unitdir}
+
+install -m 755 -d %{buildroot}%{_sharedstatedir}/orthanc/db-v3
+
+
+%files
+%doc NEWS README THANKS COPYING
+%{_mandir}/man1/*.1*
+%{_sbindir}/*
+%{_unitdir}/orthanc.service
+
+%dir %{_sysconfdir}/orthanc
+%config(noreplace) %{_sysconfdir}/orthanc/orthanc.json
+%dir %attr(0755, orthanc, orthanc) %{_sharedstatedir}/orthanc
+%dir %attr(0755, orthanc, orthanc) %{_sharedstatedir}/orthanc/db-v3
+
+
+
+# Installation of the Systemd Orthanc service
+# https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd
+%post
+%systemd_post orthanc.service
+
+%preun
+%systemd_preun orthanc.service
+
+%postun
+%systemd_postun_with_restart orthanc.service
+
+
+%pre
+# http://fedoraproject.org/wiki/Packaging%3aUsersAndGroups
+# "We never remove users or groups created by packages"
+
+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
+exit 0
+
+
+%changelog
+* Thu Apr 04 2013 Sebastien Jodogne <s.jodogne at gmail.com> 0.5.0-1
+- New upstream version
+
+* Wed Dec 19 2012 Sebastien Jodogne <s.jodogne at gmail.com> 0.4.0-5
+- Fixes according to reviews
+
+* Wed Dec 19 2012 Sebastien Jodogne <s.jodogne at gmail.com> 0.4.0-4
+- Dynamic linking against mongoose-lib
+
+* Wed Dec 19 2012 Sebastien Jodogne <s.jodogne at gmail.com> 0.4.0-3
+- Improvements to the packaging
+
+* Tue Dec 18 2012 Sebastien Jodogne <s.jodogne at gmail.com> 0.4.0-2
+- Improvements to the packaging
+
+* Mon Dec 17 2012 Sebastien Jodogne <s.jodogne at gmail.com> 0.4.0-1
+- Initial RPM Release
diff --git a/sources b/sources
index e69de29..d59522a 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+2c471afaa974ac8afc2734f42f3567ba Orthanc-0.5.0.tar.gz
More information about the scm-commits
mailing list