makedeb


tachidesk-server 0.6.5-2


A free and open source manga reader that runs extensions built for Tachiyomi

Click here to go back to the commit logs for tachidesk-server.

Commit:


Hash: ac64bffb5ea328a651ade3cd6f8b00d7347a7233

Message: fix revision number. add systemd service

Diff


diff --git a/.SRCINFO b/.SRCINFO
index 77aba07..7e6fb85 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,21 +1,29 @@
 pkgbase = tachidesk-server
 	pkgdesc = A free and open source manga reader that runs extensions built for Tachiyomi
 	pkgver = 0.6.3
-	pkgrel = 1
+	pkgrel = 2
 	url = https://github.com/Suwayomi/Tachidesk-Server
 	arch = any
 	license = MPL2
 	depends = java-runtime>=8
 	optdepends = electron: running in Electron
 	provides = tachidesk-server
-	noextract = Tachidesk-Server-v0.6.3-r1087.jar
-	source = https://github.com/Suwayomi/Tachidesk-Server/releases/download/v0.6.3/Tachidesk-Server-v0.6.3-r1087.jar
+	noextract = Tachidesk-Server-v0.6.3-r1100.jar
+	source = https://github.com/Suwayomi/Tachidesk-Server/releases/download/v0.6.3/Tachidesk-Server-v0.6.3-r1100.jar
+	source = tachidesk-server.conf
+	source = tachidesk-server.service
+	source = tachidesk-server.sysusers
+	source = tachidesk-server.tmpfiles
 	source = tachidesk-server.desktop
 	source = tachidesk-server.png
 	source = tachidesk-server-browser-launcher.sh
 	source = tachidesk-server-debug-launcher.sh
 	source = tachidesk-server-electron-launcher-debian.sh
-	sha256sums = aece7cebf31c977197e762304d5182b2a18111140da3dffa9a12311893ac2ce4
+	sha256sums = 533afe39862d2af2826b9c8b5e31653b63ffd13c3fc20512e33814caa39eb5ca
+	sha256sums = f0645eb6855fcb854dd42c000ad0ca1895b67017234d79a93cefb9b90e9b3ef6
+	sha256sums = b8ae15e5dec2d20bedf4827b56a65d48b0155bd86a21147604fb714ee4208c59
+	sha256sums = d968233df273640b51cd3daf61bab809df6fb844bee92f4f5887c09d95c482aa
+	sha256sums = 715b5ad6ecdcab24f7a7663c3b606654a6c7bd6323540d29ad1440b0116e046d
 	sha256sums = 7ec4e0722d0312384672ccd01d939cce0fe356cf16d23f3473e7502cdddbccd3
 	sha256sums = 7528715b5b8d8360a9fd7dc096b51fd52bf3da671167e224b6cb637437fc4831
 	sha256sums = 1a075de252d4d1e4a025e26d379985995893e03d2ac9182ab8a48624b7076470
diff --git a/PKGBUILD b/PKGBUILD
index 6d3eaf3..d857487 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,9 +2,12 @@
 
 pkgname=tachidesk-server
 pkgver=0.6.3
-pkgrel=1
+pkgrel=2
+__pkgname="$pkgname"
 __PkgName=Tachidesk-Server
-__revnum=1087
+__pkgver="$pkgver"
+__revnum=1100
+
 pkgdesc='A free and open source manga reader that runs extensions built for Tachiyomi'
 arch=('any')
 url="https://github.com/Suwayomi/$__PkgName"
@@ -12,14 +15,23 @@ license=('MPL2')
 depends=('java-runtime>=8')
 optdepends=('electron: running in Electron')
 provides=("$pkgname")
-__jar=$__PkgName-v$pkgver-r$__revnum.jar
-source=("$url/releases/download/v$pkgver/$__jar"
-        "$pkgname.desktop"
-        "$pkgname.png"
-        "$pkgname-browser-launcher.sh"
-        "$pkgname-debug-launcher.sh"
-        "$pkgname-electron-launcher-debian.sh")
-sha256sums=('aece7cebf31c977197e762304d5182b2a18111140da3dffa9a12311893ac2ce4'
+
+__jar=$__PkgName-v$__pkgver-r$__revnum.jar
+source=("$url/releases/download/v$__pkgver/$__jar"
+        "$__pkgname.conf"
+        "$__pkgname.service"
+        "$__pkgname.sysusers"
+        "$__pkgname.tmpfiles"
+        "$__pkgname.desktop"
+        "$__pkgname.png"
+        "$__pkgname-browser-launcher.sh"
+        "$__pkgname-debug-launcher.sh"
+        "$__pkgname-electron-launcher-debian.sh")
+sha256sums=('533afe39862d2af2826b9c8b5e31653b63ffd13c3fc20512e33814caa39eb5ca'
+            'f0645eb6855fcb854dd42c000ad0ca1895b67017234d79a93cefb9b90e9b3ef6'
+            'b8ae15e5dec2d20bedf4827b56a65d48b0155bd86a21147604fb714ee4208c59'
+            'd968233df273640b51cd3daf61bab809df6fb844bee92f4f5887c09d95c482aa'
+            '715b5ad6ecdcab24f7a7663c3b606654a6c7bd6323540d29ad1440b0116e046d'
             '7ec4e0722d0312384672ccd01d939cce0fe356cf16d23f3473e7502cdddbccd3'
             '7528715b5b8d8360a9fd7dc096b51fd52bf3da671167e224b6cb637437fc4831'
             '1a075de252d4d1e4a025e26d379985995893e03d2ac9182ab8a48624b7076470'
@@ -28,10 +40,14 @@ sha256sums=('aece7cebf31c977197e762304d5182b2a18111140da3dffa9a12311893ac2ce4'
 noextract=("$__jar")
 
 package() {
-    install -Dm644 "$srcdir/$__jar" "$pkgdir/usr/share/java/$pkgname/$pkgname.jar"
-    install -Dm644 "$srcdir/$pkgname.desktop" -t "$pkgdir/usr/share/applications/"
-    install -Dm644 "$srcdir/$pkgname.png" -t "$pkgdir/usr/share/pixmaps/"
-    install -Dm755 "$srcdir/$pkgname-browser-launcher.sh" "$pkgdir/usr/bin/$pkgname-browser"
-    install -Dm755 "$srcdir/$pkgname-debug-launcher.sh" "$pkgdir/usr/bin/$pkgname-debug"
-    install -Dm755 "$srcdir/$pkgname-electron-launcher-debian.sh" "$pkgdir/usr/bin/$pkgname-electron"
+    install -Dm644 "$srcdir/$__pkgname.conf"                    "$pkgdir/etc/tachidesk/server.conf"
+    install -Dm644 "$srcdir/$__pkgname.service"                 "$pkgdir/usr/lib/systemd/system/$__pkgname.service"
+    install -Dm644 "$srcdir/$__pkgname.sysusers"                "$pkgdir/usr/lib/sysusers.d/$__pkgname.conf"
+    install -Dm644 "$srcdir/$__pkgname.tmpfiles"                "$pkgdir/usr/lib/tmpfiles.d/$__pkgname.conf"
+    install -Dm644 "$srcdir/$__jar"                             "$pkgdir/usr/share/java/$__pkgname/$__pkgname.jar"
+    install -Dm644 "$srcdir/$__pkgname.desktop"                 "$pkgdir/usr/share/applications/$__pkgname.desktop"
+    install -Dm644 "$srcdir/$__pkgname.png"                     "$pkgdir/usr/share/pixmaps/$__pkgname.png"
+    install -Dm755 "$srcdir/$__pkgname-browser-launcher.sh"     "$pkgdir/usr/bin/$__pkgname-browser"
+    install -Dm755 "$srcdir/$__pkgname-debug-launcher.sh"       "$pkgdir/usr/bin/$__pkgname-debug"
+    install -Dm755 "$srcdir/$__pkgname-electron-launcher-debian.sh"    "$pkgdir/usr/bin/$__pkgname-electron"
 }
diff --git a/tachidesk-server.conf b/tachidesk-server.conf
new file mode 100644
index 0000000..acc64b0
--- /dev/null
+++ b/tachidesk-server.conf
@@ -0,0 +1,5 @@
+TACHIDESK_ROOT_DIR="/var/lib/tachidesk"
+
+# Extra arguments passed to the java command
+# The default value disables the system tray icon, and launching a browser on service start.
+JAVA_ARGS=-Dsuwayomi.tachidesk.config.server.initialOpenInBrowserEnabled=false -Dsuwayomi.tachidesk.config.server.systemTrayEnabled=false
diff --git a/tachidesk-server.service b/tachidesk-server.service
new file mode 100644
index 0000000..a72f4c4
--- /dev/null
+++ b/tachidesk-server.service
@@ -0,0 +1,31 @@
+[Unit]
+Description=A free and open source manga reader server that runs extensions built for Tachiyomi.
+Wants=network-online.target
+After=network-online.target
+
+[Service]
+Type=simple
+User=tachidesk
+Group=tachidesk
+SyslogIdentifier=tachidesk
+
+EnvironmentFile=/etc/tachidesk/server.conf
+ExecStart=/usr/bin/java $JAVA_ARGS -Dsuwayomi.tachidesk.config.server.rootDir="${TACHIDESK_ROOT_DIR}" -jar /usr/share/java/tachidesk-server/tachidesk-server.jar
+Restart=on-failure
+
+ProtectSystem=full
+ProtectHome=true
+PrivateTmp=yes
+PrivateDevices=yes
+ProtectClock=yes
+ProtectKernelTunables=yes
+ProtectKernelModules=yes
+ProtectKernelLogs=yes
+ProtectControlGroups=yes
+RestrictSUIDSGID=yes
+RestrictRealtime=yes
+RestrictNamespaces=yes
+NoNewPrivileges=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/tachidesk-server.sysusers b/tachidesk-server.sysusers
new file mode 100644
index 0000000..8a666c2
--- /dev/null
+++ b/tachidesk-server.sysusers
@@ -0,0 +1,2 @@
+#Type    Name       ID    GECOS                                 Home directory              Shell
+u        tachidesk  -     "Tachidesk Manga Server"              /var/lib/tachidesk
diff --git a/tachidesk-server.tmpfiles b/tachidesk-server.tmpfiles
new file mode 100644
index 0000000..d967daa
--- /dev/null
+++ b/tachidesk-server.tmpfiles
@@ -0,0 +1,2 @@
+#Type  Path                Mode  User       Group      Age  Argument
+d      /var/lib/tachidesk  0755  tachidesk  tachidesk