-
Notifications
You must be signed in to change notification settings - Fork 445
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add rpmSetarch support
- Loading branch information
Showing
10 changed files
with
72 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import com.typesafe.sbt.packager.linux.LinuxPackageMapping | ||
|
||
enablePlugins(JavaServerAppPackaging) | ||
|
||
name := "rpm-test" | ||
|
||
version := "0.1.0" | ||
|
||
maintainer := "David Pennell <[email protected]>" | ||
|
||
packageSummary := "Test rpm package" | ||
|
||
packageName in Linux := "rpm-package" | ||
|
||
packageDescription := """A fun package description of our software, | ||
with multiple lines.""" | ||
|
||
rpmRelease := "1" | ||
|
||
rpmVendor := "typesafe" | ||
|
||
rpmUrl := Some("http://github.com/sbt/sbt-native-packager") | ||
|
||
rpmLicense := Some("BSD") | ||
|
||
packageArchitecture in Rpm:= "i386" | ||
|
||
rpmSetarch := Some("i386") | ||
|
||
linuxPackageMappings := { | ||
val helloMapping = LinuxPackageMapping(Seq(((resourceDirectory in Compile).value / "hello-32bit", "/usr/share/rpm-package/libexec/hello-32bit"))) withPerms "0755" | ||
linuxPackageMappings.value :+ helloMapping | ||
} | ||
|
||
TaskKey[Unit]("check-spec-file") <<= (target, streams) map { (target, out) => | ||
val spec = IO.read(target / "rpm" / "SPECS" / "rpm-package.spec") | ||
out.log.success(spec) | ||
assert(spec contains "%attr(0644,root,root) /usr/share/rpm-package/lib/rpm-test.rpm-test-0.1.0.jar", "Wrong installation path\n" + spec) | ||
assert(spec contains "%attr(0755,root,root) /usr/share/rpm-package/libexec/hello-32bit", "Wrong 32-bit exe installation path\n" + spec) | ||
assert(spec contains "%attr(0755,root,root) /etc/init.d/rpm-package", "Wrong /etc/init.d path\n" + spec) | ||
assert(spec contains "%config %attr(644,root,root) /etc/default/rpm-package", "Wrong /etc default file\n" + spec) | ||
assert(spec contains "%dir %attr(755,rpm-package,rpm-package) /var/log/rpm-package", "Wrong logging dir path\n" + spec) | ||
assert(spec contains "%dir %attr(755,rpm-package,rpm-package) /var/run/rpm-package", "Wrong /var/run dir path\n" + spec) | ||
out.log.success("Successfully tested rpm-package file") | ||
() | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % sys.props("project.version")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#include<stdio.h> | ||
|
||
main() | ||
{ | ||
printf("Hello World!\n"); | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Run the debian packaging. | ||
> rpm:package-bin | ||
$ exists target/rpm/RPMS/i386/rpm-package-0.1.0-1.i386.rpm | ||
$ exists target/rpm/SPECS/rpm-package.spec | ||
|
||
# Check files for defaults | ||
> check-spec-file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters