-
Notifications
You must be signed in to change notification settings - Fork 441
Goals
Josh Suereth edited this page Jun 29, 2013
·
4 revisions
The sbt-native-packager is taking the following approach towards design goals:
- Create hooks for packaging applications in a native (or universal) fashion using platform-specific tools, such as:
- Windows Installer XML and MSIs
- RPMs and YUM
- Debian package manager
- generic tar/zip
- Macintosh App bundles Not implemented
- Create an abstraction layer where a common set of definitions can be used to define a Java/Scala package, and is mapped into the underlying settings for each tool.
- Define a "universal" zip/tgz layout
- Define necessary settings, and generic mappings into MSI/DEB/RPM
- Create application archetypes which generate default scripts and layouts for projects that match a particular pattern. These can be used to auto-package your project for various environments. Example archetypes include:
- Server (Play web application, Akka server, etc.). this includes init.d style scripts and/or windows service hooks.
- Command line utility (sbt, giter8, etc.). This includes launcher scripts, via BAT or BASH.
Example:
The idea here is that we try to generate "universal" mappings, and then canonical ways to expose these into the various operating systems.
<root>/
bin/
<scripts files>
lib/
<jar files used>
conf/
<configuration files>
share/
doc/
<documentation>
man/
<man pages>
Here, we directly create the universal layout in opt, and generate symlinks (or copies) as necessary to wire into the system of interest.
/opt/<package-name> ---> <generic root>
/usr/bin/*script* --symlinks--> /opt/<package-name>/bin/*script*
/usr/share/man/man1/*manpage*.1.gz --symlinks--> /opt/<package-name>/share/man/*manpage*.1.gz
/etc/<package-name>/ --symlinks--> /opt/<package-name>/conf/
TODO - What extras are needed to install startup scripts/services?
Pretty simple, just use the universal layout directly.
/opt/<package-name> ---> PROGRAM_FILES\<package-name> (or user install location)
Extras:
- Automatically create <PACKAGE_HOME> environment variable upon install.
- Simple way to add menu shortcuts to documentation HTML
- Simple way to add menu shortcuts to BAT files
- TODO - What extras are needed to install windows services?
Potentially, what we do here is just bundle everything in a DMG file that can be loaded.
For the "Application" archetype, we can also provide an app bundle in a DMG file.