From 09d58566a019cf2f60918b301d4dc3a04274fc22 Mon Sep 17 00:00:00 2001 From: bingulo Date: Mon, 8 Aug 2022 16:24:16 -0300 Subject: [PATCH 1/6] New package: dcmtk-3.6.7 --- common/shlibs | 28 ++++++++++++++++++++++ srcpkgs/dcmtk-doc | 1 + srcpkgs/dcmtk/template | 54 ++++++++++++++++++++++++++++++++++++++++++ srcpkgs/libdcmtk | 1 + srcpkgs/libdcmtk-devel | 1 + 5 files changed, 85 insertions(+) create mode 120000 srcpkgs/dcmtk-doc create mode 100644 srcpkgs/dcmtk/template create mode 120000 srcpkgs/libdcmtk create mode 120000 srcpkgs/libdcmtk-devel diff --git a/common/shlibs b/common/shlibs index 481250d5c924..481897fd218f 100644 --- a/common/shlibs +++ b/common/shlibs @@ -4197,3 +4197,31 @@ libabsl_strings.so.2206.0.0 abseil-cpp-20220623.1_1 libabsl_throw_delegate.so.2206.0.0 abseil-cpp-20220623.1_1 libabsl_time_zone.so.2206.0.0 abseil-cpp-20220623.1_1 libabsl_spinlock_wait.so.2206.0.0 abseil-cpp-20220623.1_1 +libcivetweb.so.1 libcivetweb-1.15_1 +libcmr.so.17 libdcmtk-3.6.7_1 +libdcmrt.so.17 libdcmtk-3.6.7_1 +libdcmdata.so.17 libdcmtk-3.6.7_1 +libdcmseg.so.17 libdcmtk-3.6.7_1 +libdcmdsig.so.17 libdcmtk-3.6.7_1 +libdcmsr.so.17 libdcmtk-3.6.7_1 +libdcmect.so.17 libdcmtk-3.6.7_1 +libdcmtkcharls.so.17 libdcmtk-3.6.7_1 +libdcmfg.so.17 libdcmtk-3.6.7_1 +libdcmtls.so.17 libdcmtk-3.6.7_1 +libdcmimage.so.17 libdcmtk-3.6.7_1 +libdcmtract.so.17 libdcmtk-3.6.7_1 +libdcmimgle.so.17 libdcmtk-3.6.7_1 +libdcmwlm.so.17 libdcmtk-3.6.7_1 +libdcmiod.so.17 libdcmtk-3.6.7_1 +libi2d.so.17 libdcmtk-3.6.7_1 +libdcmjpeg.so.17 libdcmtk-3.6.7_1 +libijg12.so.17 libdcmtk-3.6.7_1 +libdcmjpls.so.17 libdcmtk-3.6.7_1 +libijg16.so.17 libdcmtk-3.6.7_1 +libdcmnet.so.17 libdcmtk-3.6.7_1 +libijg8.so.17 libdcmtk-3.6.7_1 +libdcmpmap.so.17 libdcmtk-3.6.7_1 +liboflog.so.17 libdcmtk-3.6.7_1 +libdcmpstat.so.17 libdcmtk-3.6.7_1 +libofstd.so.17 libdcmtk-3.6.7_1 +libdcmqrdb.so.17 libdcmtk-3.6.7_1 diff --git a/srcpkgs/dcmtk-doc b/srcpkgs/dcmtk-doc new file mode 120000 index 000000000000..69ff54ce2e0c --- /dev/null +++ b/srcpkgs/dcmtk-doc @@ -0,0 +1 @@ +dcmtk \ No newline at end of file diff --git a/srcpkgs/dcmtk/template b/srcpkgs/dcmtk/template new file mode 100644 index 000000000000..8987937f08a6 --- /dev/null +++ b/srcpkgs/dcmtk/template @@ -0,0 +1,54 @@ +# Template file for 'dcmtk' +pkgname=dcmtk +version=3.6.7 +revision=1 +build_style=cmake +configure_args="-DDCMTK_ENABLE_CXX11=ON -DBUILD_SHARED_LIBS=ON + -DDCMTK_WITH_DOXYGEN=ON" +hostmakedepends="doxygen" +makedepends="openssl-devel zlib-devel tiff-devel libpng-devel libxml2-devel + icu-devel" +short_desc="Libraries and tools that implements DICOM standard" +maintainer="Carlos E. Gallo F. " +license="custom: see /usr/share/licenses/${pkgname}" +homepage="https://dcmtk.org/dcmtk.php.en" +distfiles="https://dicom.offis.de/download/dcmtk/dcmtk${version//.}/dcmtk-${version}.tar.gz" +checksum=7c58298e3e8d60232ee6fc8408cfadd14463cc11a3c4ca4c59af5988c7e9710a +nocross="It's some tricky to achieve cross building, wich needs to compile and + run some tests codes on the target arch. + See https://support.dcmtk.org/redmine/projects/dcmtk/wiki/Cross_Compiling" + +pre_build() { + ninja -C build DOXYGEN +} + +post_install() { + vlicense COPYRIGHT +} + +dcmtk-doc_package() { + short_desc+=' - documentation' + pkg_install() { + vmove usr/share/doc + } +} + +# TODO need license here +libdcmtk_package() { + short_desc+=' - runtime libraries' + pkg_install() { + vmove "usr/lib/*.so.*" + vmove usr/share/dcmtk + } +} + +libdcmtk-devel_package() { + short_desc+=' - development files' + depends="lib${sourcepkg}>=${version}_${revision}" + pkg_install() { + vmove usr/include + vmove usr/lib/pkgconfig + vmove usr/lib/cmake + vmove "usr/lib/*.so" + } +} diff --git a/srcpkgs/libdcmtk b/srcpkgs/libdcmtk new file mode 120000 index 000000000000..69ff54ce2e0c --- /dev/null +++ b/srcpkgs/libdcmtk @@ -0,0 +1 @@ +dcmtk \ No newline at end of file diff --git a/srcpkgs/libdcmtk-devel b/srcpkgs/libdcmtk-devel new file mode 120000 index 000000000000..69ff54ce2e0c --- /dev/null +++ b/srcpkgs/libdcmtk-devel @@ -0,0 +1 @@ +dcmtk \ No newline at end of file From 14cd9682c9e68b07842d3b969bcf50c92f323dfc Mon Sep 17 00:00:00 2001 From: bingulo Date: Mon, 8 Aug 2022 16:22:27 -0300 Subject: [PATCH 2/6] New package: civetweb-1.15 --- srcpkgs/civetweb/patches/install-fix.patch | 16 +++++++++ srcpkgs/civetweb/template | 39 ++++++++++++++++++++++ srcpkgs/libcivetweb | 1 + srcpkgs/libcivetweb-devel | 1 + 4 files changed, 57 insertions(+) create mode 100644 srcpkgs/civetweb/patches/install-fix.patch create mode 100644 srcpkgs/civetweb/template create mode 120000 srcpkgs/libcivetweb create mode 120000 srcpkgs/libcivetweb-devel diff --git a/srcpkgs/civetweb/patches/install-fix.patch b/srcpkgs/civetweb/patches/install-fix.patch new file mode 100644 index 000000000000..be282dbf613c --- /dev/null +++ b/srcpkgs/civetweb/patches/install-fix.patch @@ -0,0 +1,16 @@ +--- a/Makefile ++++ b/Makefile +@@ -19,10 +19,10 @@ + # http://www.gnu.org/prep/standards/html_node/Directory-Variables.html + PREFIX ?= /usr/local + EXEC_PREFIX = $(PREFIX) +-BINDIR = $(EXEC_PREFIX)/bin +-DATAROOTDIR = $(PREFIX)/share ++BINDIR = $(DESTDIR)$(EXEC_PREFIX)/bin ++DATAROOTDIR = $(DESTDIR)$(PREFIX)/share + DOCDIR = $(DATAROOTDIR)/doc/$(CPROG) +-SYSCONFDIR ?= $(PREFIX)/etc ++SYSCONFDIR ?= $(DESTDIR)/etc + HTMLDIR = $(DOCDIR) + INCLUDEDIR = $(DESTDIR)$(PREFIX)/include + LIBDIR = $(DESTDIR)$(EXEC_PREFIX)/lib diff --git a/srcpkgs/civetweb/template b/srcpkgs/civetweb/template new file mode 100644 index 000000000000..96ff8080508b --- /dev/null +++ b/srcpkgs/civetweb/template @@ -0,0 +1,39 @@ +# Template file for 'civetweb' +pkgname=civetweb +version=1.15 +revision=1 +build_style=gnu-makefile +make_install_target="install install-headers install-lib install-slib" +make_use_env=yes +makedepends="openssl-devel" +short_desc="Embedded C/C++ web server" +maintainer="Carlos E. Gallo F. " +license="MIT" +homepage="https://civetweb.github.io/civetweb/" +distfiles="https://github.com/civetweb/civetweb/archive/refs/tags/v${version}.tar.gz" +checksum=90a533422944ab327a4fbb9969f0845d0dba05354f9cacce3a5005fa59f593b9 + +pre_install() { + vmkdir usr/include +} + +post_install() { + vlicense LICENSE.md +} + +libcivetweb_package() { + short_desc+=' - library' + pkg_install() { + vmove "usr/lib/*.so.*" + } +} + +libcivetweb-devel_package() { + depends="lib${sourcepkg}>=${version}_${revision}" + short_desc+=' - development files' + pkg_install() { + vmove usr/include + vmove "usr/lib/*.a" + vmove "usr/lib/*.so" + } +} diff --git a/srcpkgs/libcivetweb b/srcpkgs/libcivetweb new file mode 120000 index 000000000000..f740b5313316 --- /dev/null +++ b/srcpkgs/libcivetweb @@ -0,0 +1 @@ +civetweb \ No newline at end of file diff --git a/srcpkgs/libcivetweb-devel b/srcpkgs/libcivetweb-devel new file mode 120000 index 000000000000..f740b5313316 --- /dev/null +++ b/srcpkgs/libcivetweb-devel @@ -0,0 +1 @@ +civetweb \ No newline at end of file From 743a5c591f4491099d0e6d951b4964e0b57a0fb2 Mon Sep 17 00:00:00 2001 From: bingulo Date: Tue, 9 Aug 2022 16:53:53 -0300 Subject: [PATCH 3/6] New package: Orthanc-1.11.1 --- srcpkgs/Orthanc-devel | 1 + srcpkgs/Orthanc-plugins | 1 + srcpkgs/Orthanc/files/orthanc/run | 31 ++++++++++++++ srcpkgs/Orthanc/patches/config.patch | 28 +++++++++++++ srcpkgs/Orthanc/template | 62 ++++++++++++++++++++++++++++ 5 files changed, 123 insertions(+) create mode 120000 srcpkgs/Orthanc-devel create mode 120000 srcpkgs/Orthanc-plugins create mode 100755 srcpkgs/Orthanc/files/orthanc/run create mode 100644 srcpkgs/Orthanc/patches/config.patch create mode 100644 srcpkgs/Orthanc/template diff --git a/srcpkgs/Orthanc-devel b/srcpkgs/Orthanc-devel new file mode 120000 index 000000000000..6d0405937430 --- /dev/null +++ b/srcpkgs/Orthanc-devel @@ -0,0 +1 @@ +Orthanc \ No newline at end of file diff --git a/srcpkgs/Orthanc-plugins b/srcpkgs/Orthanc-plugins new file mode 120000 index 000000000000..6d0405937430 --- /dev/null +++ b/srcpkgs/Orthanc-plugins @@ -0,0 +1 @@ +Orthanc \ No newline at end of file diff --git a/srcpkgs/Orthanc/files/orthanc/run b/srcpkgs/Orthanc/files/orthanc/run new file mode 100755 index 000000000000..08f727da62c1 --- /dev/null +++ b/srcpkgs/Orthanc/files/orthanc/run @@ -0,0 +1,31 @@ +#!/bin/sh +OPTS="" +[ -r conf ] && . ./conf + +: ${USER:="_orthanc"} + +: ${CONFIGFILE:="/etc/orthanc/Configuration.json"} +[ -r "$CONFIGFILE" ] || exit 1 + +: ${ORTHANCSTORAGE:="/var/lib/OrthancStorage"} +if [ ! -e "$ORTHANCSTORAGE" ] +then + mkdir -pm 0750 "$ORTHANCSTORAGE" && + chown ${USER}:${USER} "$ORTHANCSTORAGE" || + exit 1 +fi + +# Enable log +if [ -n "$LOG" ]; then + : ${LOGDIR:="/log/orthanc"} + OPTS="${OPTS} --logdir=\"$LOGDIR\"" + + if [ ! -e "$LOGDIR" ]; then + mkdir -pm 0750 "$LOGDIR" && + chown ${USER}:${USER} "$LOGDIR" || + exit 1 + fi +fi + +# Set OPTS on conf file for aditional parameters +exec chpst -u ${USER}:${USER} Orthanc $OPTS "${CONFIGFILE}" diff --git a/srcpkgs/Orthanc/patches/config.patch b/srcpkgs/Orthanc/patches/config.patch new file mode 100644 index 000000000000..94db1a0a6c90 --- /dev/null +++ b/srcpkgs/Orthanc/patches/config.patch @@ -0,0 +1,28 @@ +--- a/OrthancServer/Resources/Configuration.json 2022-06-30 08:04:50.000000000 -0300 ++++ b/OrthancServer/Resources/Configuration.json 2022-06-30 08:04:50.000000000 -0300 +@@ -10,12 +10,12 @@ + // Path to the directory that holds the heavyweight files (i.e. the + // raw DICOM instances). Backslashes must be either escaped by + // doubling them, or replaced by forward slashes "/". +- "StorageDirectory" : "OrthancStorage", ++ "StorageDirectory" : "/var/lib/OrthancStorage", + + // Path to the directory that holds the SQLite index (if unset, the + // value of StorageDirectory is used). This index could be stored on + // a RAM-drive or a SSD device for performance reasons. +- "IndexDirectory" : "OrthancStorage", ++ "IndexDirectory" : "/var/lib/OrthancStorage", + + // Path to the directory where Orthanc stores its large temporary + // files. The content of this folder can be safely deleted once +@@ -670,8 +670,8 @@ + // server. (new in Orthanc 1.9.4) + /** + "ExternalDictionaries" : [ +- "/usr/share/libdcmtk12/dicom.dic", +- "/usr/share/libdcmtk12/diconde.dic" ++ "/usr/share/dcmtk/dicom.dic", ++ "/usr/share/dcmtk/diconde.dic" + ] + **/ + diff --git a/srcpkgs/Orthanc/template b/srcpkgs/Orthanc/template new file mode 100644 index 000000000000..8e8f4ad5ffde --- /dev/null +++ b/srcpkgs/Orthanc/template @@ -0,0 +1,62 @@ +# Template file for 'Orthanc' +pkgname=Orthanc +version=1.11.1 +revision=1 +build_wrksrc="OrthancServer" +build_style=cmake +configure_args="-DALLOW_DOWNLOADS=ON -DSTATIC_BUILD=OFF -DDCMTK_DIR=/usr/lib/cmake/dcmtk" +hostmakedepends="python3 unzip tar doxygen dcmtk" +makedepends="libuuid-devel boost-devel libcurl-devel + libdcmtk-devel gtest-devel libpng-devel libjpeg-turbo-devel + sqlite-devel libcivetweb-devel openssl-devel jsoncpp-devel lua-devel + pugixml-devel" +depends="dcmtk" +short_desc="Lightweight RESTful DICOM server" +maintainer="Carlos E. Gallo F. " +license="GPL-3.0-or-later" +homepage="https://www.orthanc-server.com/index.php" +distfiles="https://www.orthanc-server.com/downloads/get.php?path=/orthanc/Orthanc-${version}.tar.gz" +checksum=a634adc9f6dd0a74ebaeb415657b5f3d51822b4fb347641dc44f3bf8b5b56db5 +python_version=3 +nocross="A package on makedepends (dcmtk) is marked as nocross" + +# Create '_orthanc' user for the server +system_accounts="_orthanc" +_orthanc_descr="Orthanc server user" + +conf_files="/etc/orthanc/Configuration.json" + +post_install() { + vsv orthanc + vinstall Resources/Configuration.json 0644 etc/orthanc + + cd ${DESTDIR} + mv usr/sbin/* usr/bin/ + rm -rf usr/sbin + + mkdir -p usr/lib/orthanc/plugins + mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/ + rm -rf usr/share/orthanc/plugins + + # Remove garbage + rm -rf builddir +} + +Orthanc-devel_package() { + depends+=" ${sourcepkg}>=${version}_${revision}" + short_desc+=" - development files" + pkg_install() { + vmove usr/include + vmove usr/share/doc + vmkdir usr/share/orthanc/OrthancFramework 0755 + vcopy ${wrksrc}/OrthancFramework usr/share/orthanc + } +} + +Orthanc-plugins_package() { + depends+=" ${sourcepkg}>=${version}_${revision}" + short_desc+=" - official plugins" + pkg_install() { + vmove usr/lib/orthanc/plugins + } +} From e441d6fc8257542eb41dcb46832afcb88a804f34 Mon Sep 17 00:00:00 2001 From: bingulo Date: Tue, 9 Aug 2022 16:54:34 -0300 Subject: [PATCH 4/6] New package: Orthanc-DicomWeb-1.9 --- srcpkgs/Orthanc-DicomWeb/template | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 srcpkgs/Orthanc-DicomWeb/template diff --git a/srcpkgs/Orthanc-DicomWeb/template b/srcpkgs/Orthanc-DicomWeb/template new file mode 100644 index 000000000000..f4d3a0abb3e1 --- /dev/null +++ b/srcpkgs/Orthanc-DicomWeb/template @@ -0,0 +1,27 @@ +# Template file for 'Orthanc-DicomWeb' +pkgname=Orthanc-DicomWeb +version=1.9 +revision=1 +wrksrc="${pkgname/-}-${version}" +build_style=cmake +configure_args="-DALLOW_DOWNLOADS=ON -DORTHANC_FRAMEWORK_SOURCE=path + -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources" +hostmakedepends="tar unzip python3" +makedepends="Orthanc-devel pugixml-devel gtest-devel jsoncpp-devel + libuuid-devel boost-devel" +short_desc="Plugin to bring support of the DICOMweb standard into Orthanc" +maintainer="Carlos E. Gallo F. " +license="AGPL-3.0-or-later" +homepage="https://www.orthanc-server.com/static.php?page=dicomweb" +distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-dicom-web/${pkgname/-}-${version}.tar.gz" +checksum=b68ff9b3de3c3dca0ea7978223b10afd8819fc809ef32c476c9b71e8831cb17f +nocross="A package on makedepends (Orthanc-devel) is marked as nocross" + +post_install() { + vlicense COPYING + + cd ${DESTDIR} + mkdir -p usr/lib/orthanc/plugins + mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/ + rm -rf usr/share/orthanc/plugins +} From f7c4e15c47386b4619751093fb427e2fb85d019a Mon Sep 17 00:00:00 2001 From: bingulo Date: Tue, 9 Aug 2022 16:55:35 -0300 Subject: [PATCH 5/6] New package: Orthanc-PostgreSQL-4.0 --- srcpkgs/Orthanc-PostgreSQL/template | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 srcpkgs/Orthanc-PostgreSQL/template diff --git a/srcpkgs/Orthanc-PostgreSQL/template b/srcpkgs/Orthanc-PostgreSQL/template new file mode 100644 index 000000000000..9b423c32ac89 --- /dev/null +++ b/srcpkgs/Orthanc-PostgreSQL/template @@ -0,0 +1,28 @@ +# Template file for 'Orthanc-PostgreSQL' +pkgname=Orthanc-PostgreSQL +version=4.0 +revision=1 +wrksrc="${pkgname/-}-${version}" +build_wrksrc="PostgreSQL" +build_style=cmake +configure_args="-DORTHANC_FRAMEWORK_SOURCE=path + -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources" +hostmakedepends="tar unzip python3" +makedepends="Orthanc-devel openssl-devel gtest-devel zlib-devel + jsoncpp-devel libuuid-devel boost-devel postgresql-libs-devel" +short_desc="PostgreSQL database plugin for Orthanc" +maintainer="Carlos E. Gallo F. " +license="AGPL-3.0-or-later" +homepage="https://www.orthanc-server.com/static.php?page=dicomweb" +distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-postgresql/${pkgname/-}-${version}.tar.gz" +checksum=a5049ed8a5d6bb8b6529636cf1d9f631d1b61f6e0bbfdc6accae45aded42bac5 +nocross="A package on makedepends (Orthanc-devel) is marked as nocross" + +post_install() { + vlicense ../COPYING + + cd ${DESTDIR} + mkdir -p usr/lib/orthanc/plugins + mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/ + rm -rf usr/share/orthanc/plugins +} From b2e58af4de33791d03968b0c6245b053c23e0243 Mon Sep 17 00:00:00 2001 From: bingulo Date: Tue, 9 Aug 2022 16:55:52 -0300 Subject: [PATCH 6/6] New package: Orthanc-Python-4.0 --- srcpkgs/Orthanc-Python/template | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 srcpkgs/Orthanc-Python/template diff --git a/srcpkgs/Orthanc-Python/template b/srcpkgs/Orthanc-Python/template new file mode 100644 index 000000000000..87df444dfc18 --- /dev/null +++ b/srcpkgs/Orthanc-Python/template @@ -0,0 +1,26 @@ +# Template file for 'Orthanc-Python' +pkgname=Orthanc-Python +version=4.0 +revision=1 +wrksrc="${pkgname/-}-${version}" +build_style=cmake +configure_args="-DPYTHON_VERSION=${py3_ver} -DORTHANC_FRAMEWORK_SOURCE=path + -DORTHANC_FRAMEWORK_ROOT=/usr/share/orthanc/OrthancFramework/Sources" +hostmakedepends="tar unzip python3 pkg-config" +makedepends="Orthanc-devel jsoncpp-devel libuuid-devel boost-devel python3-devel" +short_desc="Python plugin for Orthanc" +maintainer="Carlos E. Gallo F. " +license="AGPL-3.0-or-later" +homepage="https://book.orthanc-server.com/plugins/python.html" +distfiles="https://www.orthanc-server.com/downloads/get.php?path=/plugin-python/${pkgname/-}-${version}.tar.gz" +checksum=3e5473abb8144c9c89101a09e733732cac19423bf847cfad51fd2bffab0e1647 +nocross="A package on makedepends (Orthanc-devel) is marked as nocross" + +post_install() { + vlicense COPYING + + cd ${DESTDIR} + mkdir -p usr/lib/orthanc/plugins + mv usr/share/orthanc/plugins/* usr/lib/orthanc/plugins/ + rm -rf usr/share/orthanc/plugins +}