diff options
author | William Gathoye | 2019-10-20 21:28:38 +0200 |
---|---|---|
committer | William Gathoye | 2019-10-20 22:53:41 +0200 |
commit | bf4a2cac5f4780396ba5b3ec7c67c1ab94230974 (patch) | |
tree | 677bcfd5c3063c1d617ece508b2c018e6c38debb | |
parent | a497a672d2efe880d28355d8ccb47e5a7ee54284 (diff) | |
download | aur-bf4a2cac5f4780396ba5b3ec7c67c1ab94230974.tar.gz |
Add systemd integration and Orthanc config file
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | PKGBUILD | 24 | ||||
-rw-r--r-- | orthanc.service | 14 | ||||
-rw-r--r-- | orthanc.sysusers | 1 | ||||
-rw-r--r-- | orthanc.tmpfiles | 2 |
5 files changed, 54 insertions, 8 deletions
@@ -1,28 +1,35 @@ pkgbase = orthanc - pkgdesc = Open-source, lightweight DICOM server. + pkgdesc = Open-source, lightweight DICOM server pkgver = 1.5.8 pkgrel = 1 url = http://orthanc-server.com/ arch = x86_64 arch = i686 - license = custom:GPL3WithOpenSSLException + license = GPL3 + makedepends = boost makedepends = cmake makedepends = doxygen makedepends = gtest makedepends = make makedepends = python - depends = boost + makedepends = unzip + depends = boost-libs depends = curl depends = dcmtk depends = jsoncpp depends = libjpeg-turbo - depends = libpng - depends = openssl + depends = lua depends = pugixml depends = sqlite - depends = util-linux + backup = etc/webapps/orthanc/config.json source = https://www.orthanc-server.com/downloads/get.php?path=/orthanc/Orthanc-1.5.8.tar.gz - sha512sums = 2357210fb6d7d8d99d5b67c3136abd7e7ec23a92f0946eeb2661aad7e6dcaaf3 + source = orthanc.service + source = orthanc.sysusers + source = orthanc.tmpfiles + sha512sums = 9610526cff59e2061e16728d7ce78a80dd8803371ac80be561349476bac011ad2200b1e144df13b4e94174a90591ed8a1a0c258c98122f934ce4e70b320568e5 + sha512sums = cd69b74eff5eea43191341ec35cef53d026a1939bb6fdc6a71734c0f9339ff47effc0eb611c16fd609d6ffcf1e332f48cfaa533ccf8d7f71ce7e61f04b4fabca + sha512sums = 30d63bafdcfff751e12f6187115bac5d1630eb31848eab6d06d10359118e3a3c404a845ef14852ee578df0b25f622f2195d0b0546fe62cdc8a2702f2ffb59634 + sha512sums = 2dffd683e6c9bd0e495a1478bf2c6f90833a5c260c7619828136804d410da1d38b385db5db094a065352e21c54c0da1b5dcdd83bce129bd4bcba9c4a11361d18 pkgname = orthanc @@ -5,7 +5,7 @@ pkgname=orthanc pkgver=1.5.8 pkgrel=1 -pkgdesc='Open-source, lightweight DICOM server.' +pkgdesc='Open-source, lightweight DICOM server' arch=('x86_64' 'i686') url='http://orthanc-server.com/' license=('GPL3') @@ -16,15 +16,23 @@ depends=( makedepends=( 'boost' 'cmake' 'doxygen' 'gtest' 'make' 'python' 'unzip' ) +backup=("etc/webapps/${pkgname}/config.json") source=( "https://www.orthanc-server.com/downloads/get.php?path=/orthanc/Orthanc-${pkgver}.tar.gz" + "${pkgname}.service" + "${pkgname}.sysusers" + "${pkgname}.tmpfiles" ) sha512sums=( '9610526cff59e2061e16728d7ce78a80dd8803371ac80be561349476bac011ad2200b1e144df13b4e94174a90591ed8a1a0c258c98122f934ce4e70b320568e5' + 'cd69b74eff5eea43191341ec35cef53d026a1939bb6fdc6a71734c0f9339ff47effc0eb611c16fd609d6ffcf1e332f48cfaa533ccf8d7f71ce7e61f04b4fabca' + '30d63bafdcfff751e12f6187115bac5d1630eb31848eab6d06d10359118e3a3c404a845ef14852ee578df0b25f622f2195d0b0546fe62cdc8a2702f2ffb59634' + '2dffd683e6c9bd0e495a1478bf2c6f90833a5c260c7619828136804d410da1d38b385db5db094a065352e21c54c0da1b5dcdd83bce129bd4bcba9c4a11361d18' ) build() { cmake \ + -DSTATIC_BUILD=OFF \ -DALLOW_DOWNLOADS=ON \ -DUSE_SYSTEM_CIVETWEB=OFF \ -DBoost_NO_BOOST_CMAKE=ON \ @@ -47,4 +55,18 @@ package() { mkdir -p ${pkgdir}/usr/bin mv "${pkgdir}"/usr/sbin/* ${pkgdir}/usr/bin rmdir "${pkgdir}"/usr/sbin + + # Systemd + install -Dm644 "${pkgname}".service -t "${pkgdir}"/usr/lib/systemd/system/ + install -Dm644 "${pkgname}".sysusers "${pkgdir}"/usr/lib/sysusers.d/"${pkgname}".conf + install -Dm644 "${pkgname}".tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/"${pkgname}".conf + + # Orthanc config file + install -dm755 "${pkgdir}"/etc/webapps/"${pkgname}" + install -Dm644 "${srcdir}"/Orthanc-"${pkgver}"/Resources/Configuration.json -t "${pkgdir}"/etc/webapps/"${pkgname}" + mv "${pkgdir}"/etc/webapps/"${pkgname}"/Configuration.json "${pkgdir}"/etc/webapps/"${pkgname}"/config.json + + sed -e 's@"StorageDirectory" : ".*"@"StorageDirectory" : "/var/lib/orthanc/"@g' \ + -e 's@"IndexDirectory" : ".*"@"IndexDirectory" : "/var/lib/orthanc/"@g' \ + -i "${pkgdir}"/etc/webapps/"${pkgname}"/config.json } diff --git a/orthanc.service b/orthanc.service new file mode 100644 index 000000000000..59f26b947f44 --- /dev/null +++ b/orthanc.service @@ -0,0 +1,14 @@ +[Unit] +Description=Open-source, lightweight DICOM server + +[Service] +Type=simple +User=orthanc +Group=orthanc +ExecStart=Orthanc /etc/webapps/orthanc/config.json + +Restart=on-failure +PrivateTmp=false + +[Install] +WantedBy=multi-user.target diff --git a/orthanc.sysusers b/orthanc.sysusers new file mode 100644 index 000000000000..48fff11210a3 --- /dev/null +++ b/orthanc.sysusers @@ -0,0 +1 @@ +u orthanc - "orthanc user" diff --git a/orthanc.tmpfiles b/orthanc.tmpfiles new file mode 100644 index 000000000000..716fcb846e1c --- /dev/null +++ b/orthanc.tmpfiles @@ -0,0 +1,2 @@ +d /var/lib/orthanc 0700 orthanc orthanc - +z /etc/webapps/orthanc/config.json - orthanc orthanc |