SynologyOpenSource / minimalPkg

Example package for synology toolkit framework - MIT License (MIT)
MIT License
27 stars 5 forks source link

Sample for creating a Java based package #3

Open col-panic opened 7 years ago

col-panic commented 7 years ago

Hy there,

could you please provide a link or a respective sample for a minimal Java-based package to integrate?

Thank you

SynologyOpenSource commented 7 years ago

Hi,

You can follow synology developer guide for more detail.

There are some tips for java-base package integration:

  1. In SynoBuildConf/build, you can use /usr/lib/jvm/java-6-jdk/bin/javac to compile your .java source.
  2. In INFO file, install_dep_packages need to depends on Java8 (synology package).
  3. In scripts/start-stop-status, use /var/packages/Java8/target/j2sdk-image/bin/java, which is installed by Java8 package, to run compiled code.

Thanks.

col-panic commented 7 years ago

Thanks a lot! I will try.

Another question. Does there exist a way to integrate an application "synology style" while the application itself is delivered via Docker? So for example, by installing a synology package the result is a fully configured and started docker image?

SynologyOpenSource commented 7 years ago

Hi,

I think the following tips will help you to create package via docker.

  1. Nothing need to do while build time (assume docker image is built by docker hub).
  2. In INFO file, install_dep_packages need to depends on Docker (synology package).
  3. In scripts/start-stop-status, use /usr/local/bin/docker to pull/run image as an application.

Thanks.