Skip to content

Commit 9731979

Browse files
committed
fix rpm file name for arch
1 parent 5e97fc6 commit 9731979

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/main/java/io/github/fvarrui/javapackager/packagers/GenerateRpm.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ protected File doApply(LinuxPackager packager) throws Exception {
5353

5454
Builder builder = new Builder();
5555
builder.setType(RpmType.BINARY);
56-
builder.setPlatform(packager.getArchForRpm(), Os.LINUX);
56+
Architecture archForRpm = packager.getArchForRpm();
57+
builder.setPlatform(archForRpm, Os.LINUX);
5758
builder.setPackage(name, version, "1");
5859
builder.setPackager(organizationName);
5960
builder.setDescription(description);
@@ -76,7 +77,9 @@ protected File doApply(LinuxPackager packager) throws Exception {
7677

7778
builder.build(outputDirectory);
7879

79-
File originalRpm = new File(outputDirectory, name + "-" + version + "-1.x86_64.rpm");
80+
String arch = archForRpm.name().toLowerCase();
81+
String suffix = "-1."+arch+".rpm";
82+
File originalRpm = new File(outputDirectory, name + "-" + version + suffix);
8083
File rpm = null;
8184
if (originalRpm.exists()) {
8285
rpm = new File(outputDirectory, name + "_" + version + ".rpm");

0 commit comments

Comments
 (0)