rules 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #!/usr/bin/make -f
  2. # -*- makefile -*-
  3. # Uncomment this to turn on verbose mode.
  4. #export DH_VERBOSE=1
  5. JAVA_HOME = /usr/lib/jvm/java-22-coffeelibs
  6. DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
  7. ifeq ($(DEB_BUILD_ARCH),amd64)
  8. JMODS_PATH = jmods/amd64:${JAVA_HOME}/jmods
  9. else ifeq ($(DEB_BUILD_ARCH),arm64)
  10. JMODS_PATH = jmods/aarch64:${JAVA_HOME}/jmods
  11. endif
  12. %:
  13. dh $@
  14. override_dh_auto_clean:
  15. rm -rf runtime
  16. rm -rf cryptomator
  17. rm -rf debian/cryptomator
  18. rm -rf resources
  19. override_dh_auto_build:
  20. mkdir resources
  21. ln -s ../common/org.cryptomator.Cryptomator512.png resources/cryptomator.png
  22. # Remark: no compression is applied for improved build compression later (here deb)
  23. $(JAVA_HOME)/bin/jlink \
  24. --output runtime \
  25. --module-path "${JMODS_PATH}" \
  26. --add-modules java.base,java.desktop,java.instrument,java.logging,java.naming,java.net.http,java.scripting,java.sql,java.xml,javafx.base,javafx.graphics,javafx.controls,javafx.fxml,jdk.unsupported,jdk.security.auth,jdk.accessibility,jdk.management.jfr,jdk.net,java.compiler \
  27. --strip-native-commands \
  28. --no-header-files \
  29. --no-man-pages \
  30. --strip-debug \
  31. --compress zip-0
  32. $(JAVA_HOME)/bin/jpackage \
  33. --type app-image \
  34. --runtime-image runtime \
  35. --input libs \
  36. --module-path mods \
  37. --module org.cryptomator.desktop/org.cryptomator.launcher.Cryptomator \
  38. --dest . \
  39. --name cryptomator \
  40. --vendor "Skymatic GmbH" \
  41. --java-options "--enable-preview" \
  42. --java-options "--enable-native-access=org.cryptomator.jfuse.linux.amd64,org.cryptomator.jfuse.linux.aarch64,org.purejava.appindicator" \
  43. --copyright "(C) 2016 - 2024 Skymatic GmbH" \
  44. --java-options "-Xss5m" \
  45. --java-options "-Xmx256m" \
  46. --java-options "-Dfile.encoding=\"utf-8\"" \
  47. --java-options "-Djava.net.useSystemProxies=true" \
  48. --java-options "-Dcryptomator.logDir=\"@{userhome}/.local/share/Cryptomator/logs\"" \
  49. --java-options "-Dcryptomator.pluginDir=\"@{userhome}/.local/share/Cryptomator/plugins\"" \
  50. --java-options "-Dcryptomator.settingsPath=\"@{userhome}/.config/Cryptomator/settings.json:@{userhome}/.Cryptomator/settings.json\"" \
  51. --java-options "-Dcryptomator.p12Path=\"@{userhome}/.config/Cryptomator/key.p12\"" \
  52. --java-options "-Dcryptomator.ipcSocketPath=\"@{userhome}/.config/Cryptomator/ipc.socket\"" \
  53. --java-options "-Dcryptomator.mountPointsDir=\"@{userhome}/.local/share/Cryptomator/mnt\"" \
  54. --java-options "-Dcryptomator.showTrayIcon=true" \
  55. --java-options "-Dcryptomator.integrationsLinux.trayIconsDir=\"/usr/share/icons/hicolor/symbolic/apps\"" \
  56. --java-options "-Dcryptomator.buildNumber=\"deb-${REVISION_NUM}\"" \
  57. --java-options "-Dcryptomator.appVersion=\"${SEMVER_STR}\"" \
  58. --java-options "-Dcryptomator.disableUpdateCheck=\"${DISABLE_UPDATE_CHECK}\"" \
  59. --java-options "-Dcryptomator.integrationsLinux.autoStartCmd=\"cryptomator\"" \
  60. --app-version "${VERSION_NUM}.${REVISION_NUM}" \
  61. --resource-dir resources \
  62. --verbose