rules 2.3 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-19-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. $(JAVA_HOME)/bin/jlink \
  23. --output runtime \
  24. --module-path "${JMODS_PATH}" \
  25. --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.crypto.ec,jdk.accessibility,jdk.management.jfr \
  26. --strip-native-commands \
  27. --no-header-files \
  28. --no-man-pages \
  29. --strip-debug \
  30. --compress=2
  31. $(JAVA_HOME)/bin/jpackage \
  32. --type app-image \
  33. --runtime-image runtime \
  34. --input libs \
  35. --module-path mods \
  36. --module org.cryptomator.desktop/org.cryptomator.launcher.Cryptomator \
  37. --dest . \
  38. --name cryptomator \
  39. --vendor "Skymatic GmbH" \
  40. --copyright "(C) 2016 - 2022 Skymatic GmbH" \
  41. --java-options "-Xss5m" \
  42. --java-options "-Xmx256m" \
  43. --java-options "-Dfile.encoding=\"utf-8\"" \
  44. --java-options "-Dcryptomator.logDir=\"~/.local/share/Cryptomator/logs\"" \
  45. --java-options "-Dcryptomator.pluginDir=\"~/.local/share/Cryptomator/plugins\"" \
  46. --java-options "-Dcryptomator.settingsPath=\"~/.config/Cryptomator/settings.json:~/.Cryptomator/settings.json\"" \
  47. --java-options "-Dcryptomator.p12Path=\"~/.config/Cryptomator/key.p12\"" \
  48. --java-options "-Dcryptomator.ipcSocketPath=\"~/.config/Cryptomator/ipc.socket\"" \
  49. --java-options "-Dcryptomator.mountPointsDir=\"~/.local/share/Cryptomator/mnt\"" \
  50. --java-options "-Dcryptomator.showTrayIcon=false" \
  51. --java-options "-Dcryptomator.buildNumber=\"deb-${REVISION_NUM}\"" \
  52. --java-options "-Dcryptomator.appVersion=\"${SEMVER_STR}\"" \
  53. --app-version "${VERSION_NUM}.${REVISION_NUM}" \
  54. --resource-dir resources \
  55. --verbose
  56. override_dh_fixperms:
  57. dh_fixperms
  58. chmod +x debian/cryptomator/usr/lib/cryptomator/bin/cryptomator.sh
  59. # override_dh_strip:
  60. # no-op