summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorWilliam Gathoye2019-10-20 21:28:38 +0200
committerWilliam Gathoye2019-10-20 22:53:41 +0200
commitbf4a2cac5f4780396ba5b3ec7c67c1ab94230974 (patch)
tree677bcfd5c3063c1d617ece508b2c018e6c38debb /PKGBUILD
parenta497a672d2efe880d28355d8ccb47e5a7ee54284 (diff)
downloadaur-bf4a2cac5f4780396ba5b3ec7c67c1ab94230974.tar.gz
Add systemd integration and Orthanc config file
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD24
1 files changed, 23 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index b65b2eb3b2ee..363cc3953390 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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
}