我正在尝试将我的 scala 主应用程序代码打包为 .deb 文件。该应用程序只能在 ubuntu 机器上运行,所以我并不真正关心 Windows 等。
目前,我正在努力寻找最简单的方法来使用最简单的设置来编译 .deb。假设我的文件夹中有一个简单的object Kernel extends App
scala 文件,该src
文件应该包含 jardependencies。
我目前对该项目的基于 scala 的 debian 设置是:
import com.typesafe.sbt.SbtNativePackager._
import NativePackagerKeys.
val debSettings = mapGenericFilesToLinux ++ linuxSettings ++ debianSettings ++ Seq(
name in Debian := "my-app",
version in Debian := "0.1-version",
mainClass := Some("Kernel"),
packageSummary := "",
target := new java.io.File("target"),
packageDescription := "my app",
packageDescription := "my app desciption",
NativePackagerKeys.normalizedName := "normalizedName",
maintainer := "my name",
sourceDirectory := new java.io.File("./src"),
debianPackageDependencies in Debian ++= Seq("openjdk-7-jre"),
debianPackageRecommends in Debian ++= Seq(),
linuxPackageMappings in Debian ++= Seq() ,
debianMaintainerScripts ++=Seq())
调用有效并创建了debian:package-bin
一个 deb,但没有将二进制文件/jar 复制到 deb 中,所以我显然缺少一些配置。我知道仍然缺少 linuxPackageMappings 等,但我想知道是否有更简单的编译配置?usingpackageArchetype.java_server
迫使我为 Windows 等包含这么多未使用的变量。我想避免这种情况。
任何建议如何简化仅 deb 构建的设置 + 映射?