diff options
author | Phillip Schichtel | 2022-11-01 19:08:51 +0100 |
---|---|---|
committer | Phillip Schichtel | 2022-11-01 19:08:51 +0100 |
commit | fd40325051ddfeaf9c029eb82d285f934dd16d3d (patch) | |
tree | 021986433b5298a7a24147a0c76f6e0461e52d4d | |
download | aur-fd40325051ddfeaf9c029eb82d285f934dd16d3d.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 26 | ||||
-rw-r--r-- | .gitignore | 7 | ||||
-rw-r--r-- | Makefile | 12 | ||||
-rw-r--r-- | OperatingSystemUtil.java | 29 | ||||
-rw-r--r-- | PKGBUILD | 58 | ||||
-rw-r--r-- | bookman-cockpit.desktop | 9 | ||||
-rw-r--r-- | bookman-cockpit.sh | 14 | ||||
-rw-r--r-- | logback.xml | 14 |
8 files changed, 169 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..e47fb3802ea0 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,26 @@ +pkgbase = bookman-cockpit + pkgdesc = Bookman Cockpit + pkgver = 1.12.0 + pkgrel = 1 + url = https://www.bookman.de/ + arch = any + license = custom + makedepends = jdk17-openjdk + makedepends = unzip + depends = java-environment=17 + depends = java17-openjfx + options = !strip + source = installer.exe::https://bit.ly/3eMJh3j + source = https://maven.ej-technologies.com/repository/com/install4j/install4j-runtime/9.0.7/install4j-runtime-9.0.7.jar + source = OperatingSystemUtil.java + source = logback.xml + source = bookman-cockpit.desktop + source = bookman-cockpit.sh + sha256sums = 0720edee5828d20a21b735e0572e838f3d60e069e98da35d4f589eda690a3400 + sha256sums = 5a0bd9ca7d0632eec36d9f3b4980741f70e47511ee070c1da6c7c778ed058106 + sha256sums = f2a742dabb4f1ac32867c3ba152355695220e4bd4a7ba032de98e3c5d2ed3309 + sha256sums = ef6cf40ff0a46853f2d5308c884e17328a6a36009f5697d5914bfbb720cac261 + sha256sums = 32db57235ad25fadb8b2a4a02f7618c7a51df33b50df780613f06cb33fb977e3 + sha256sums = 2ca092cc4826a3607f316fc7acdec0bd3b3bf3f9382650d2a96480cf26ce91c4 + +pkgname = bookman-cockpit diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..8cc5aa4b34a4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +*.exe +*.jar +*.tar.gz +*.tar.xz +*.tar.zst +src/ +pkg/ diff --git a/Makefile b/Makefile new file mode 100644 index 000000000000..c653001cf472 --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ + +.SRCINFO: PKGBUILD + makepkg --printsrcinfo > .SRCINFO + +package: PKGBUILD .SRCINFO + updpkgsums + makepkg --syncdeps --rmdeps --force --clean --noconfirm + +all: package + +clean: + rm -Rv .SRCINFO *.exe *.tar.gz *.tar.xz *.tar.zst src/ pkg/ 2> /dev/null || true diff --git a/OperatingSystemUtil.java b/OperatingSystemUtil.java new file mode 100644 index 000000000000..eb20adc788e6 --- /dev/null +++ b/OperatingSystemUtil.java @@ -0,0 +1,29 @@ +package de.bookman.util; + +import java.io.File; + +public class OperatingSystemUtil { + public OperatingSystemUtil() { + } + + public static File getTempDir() { + return new File(System.getProperty("java.io.tmpdir")); + } + + public static boolean jvmIs64Bit() { + return System.getProperty("sun.arch.data.model").equals("64"); + } + + public static boolean isLinux() { + return false; + } + + public static boolean isWindows() { + return false; + } + + public static boolean isMacOSX() { + return true; + } +} + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..59671dcb98d6 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,58 @@ +# Maintainer: Phillip Schichtel <phillip@schich.tel> +pkgname=bookman-cockpit +pkgver=1.12.0 +pkgrel=1 +options=(!strip) +pkgdesc="Bookman Cockpit" +arch=(any) +url="https://www.bookman.de/" +license=('custom') +depends=('java-environment=17' 'java17-openjfx') +makedepends=('jdk17-openjdk' 'unzip') +# the bit.ly link looks suspicious, but that's what they use on their website. +# Also the download is not versioned, so this will eventuelly break due to integrity checks failing. +source=("installer.exe::https://bit.ly/3eMJh3j" + "https://maven.ej-technologies.com/repository/com/install4j/install4j-runtime/9.0.7/install4j-runtime-9.0.7.jar" + "OperatingSystemUtil.java" + "logback.xml" + "${pkgname}.desktop" + "${pkgname}.sh") +sha256sums=('0720edee5828d20a21b735e0572e838f3d60e069e98da35d4f589eda690a3400' + '5a0bd9ca7d0632eec36d9f3b4980741f70e47511ee070c1da6c7c778ed058106' + 'f2a742dabb4f1ac32867c3ba152355695220e4bd4a7ba032de98e3c5d2ed3309' + 'ef6cf40ff0a46853f2d5308c884e17328a6a36009f5697d5914bfbb720cac261' + '32db57235ad25fadb8b2a4a02f7618c7a51df33b50df780613f06cb33fb977e3' + '2d785d3b556ecd4659d8664ed6399ce252cf370f2bbbd9f25dc01b93283a7881') + +build() { + javac "OperatingSystemUtil.java" + mv "$(dirname "$(readlink -f "OperatingSystemUtil.java")")/OperatingSystemUtil.class" "$srcdir" + unzip -p "bin/bookman-${pkgver}.jar" 'de/bookman/resources/icons/bookman.png' > bookman.png +} + +package() { + local optdir="/opt/${pkgname}" + local target="${pkgdir}${optdir}" + local extracted="${srcdir}/jprofiler${pkgver}" + + install -dm755 "$target" + install -dm755 "${pkgdir}/usr/bin" + install -m755 "${srcdir}/${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}" + + install -dm755 "$target/jars" + cp -a "${srcdir}/bin/lib/." "$target/jars" + cp -a "${srcdir}/bin/bookman-${pkgver}.jar" "$target/jars" + cp -a "${srcdir}/install4j-runtime-9.0.7.jar" "$target/jars" + + install -dm755 "$target/override/de/bookman/util" + install -m755 "${srcdir}/OperatingSystemUtil.class" "$target/override/de/bookman/util" + install -m644 "${srcdir}/logback.xml" "$target/override" + + local icondir="${pkgdir}/usr/share/icons/hicolor/256x256/apps" + install -dm755 "$icondir" + install -m644 "${srcdir}/bookman.png" "$icondir/${pkgname}.png" + + local appsdir="${pkgdir}/usr/share/applications" + install -dm755 "$appsdir" + cp "${srcdir}/${pkgname}.desktop" "$appsdir" +} diff --git a/bookman-cockpit.desktop b/bookman-cockpit.desktop new file mode 100644 index 000000000000..99cec2bea5cb --- /dev/null +++ b/bookman-cockpit.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=Bookman Cockpit +GenericName=Bookman Cockpit +Comment=Launch Bookman Cockpit +Icon=bookman-cockpit +Categories=Finance; +Exec=bookman-cockpit diff --git a/bookman-cockpit.sh b/bookman-cockpit.sh new file mode 100644 index 000000000000..f841f205abea --- /dev/null +++ b/bookman-cockpit.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +export JAVA_HOME=/usr/lib/jvm/java-17-openjdk +home="${XDG_CONFIG_HOME:-"$HOME/.config"}/bookman-cockpit" + +"${JAVA_HOME}/bin/java" \ + -Duser.home="$home" \ + -Dde.bookman.deployMode=LIVE \ + -Dde.bookman.javaBackendUri=https://cockpit.bookman-gmbh.de/api/java/ \ + -Dde.bookman.microsoftApplicationId=a7719d9a-1877-4bd1-a3c7-e3f8edf86485 \ + -Dde.bookman.microsoftSsoRedirectUrl=http://localhost:4826 \ + -cp "/opt/bookman-cockpit/override/:${JAVA_HOME}/lib/*:/opt/bookman-cockpit/jars/*" \ + de.bookman.start.MainGradle + diff --git a/logback.xml b/logback.xml new file mode 100644 index 000000000000..9aea5710c806 --- /dev/null +++ b/logback.xml @@ -0,0 +1,14 @@ +<configuration> + + <contextListener class="de.bookman.start.LoggerStartupListener"/> + + <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <pattern>|%d| %-5p |%.40c| - %m%n</pattern> + </encoder> + </appender> + + <root level="${LOG_LEVEL}"> + <appender-ref ref="CONSOLE"/> + </root> +</configuration>
\ No newline at end of file |