From 891cd30c4ac1e790b13a8496bd85b7404fc6e49d Mon Sep 17 00:00:00 2001 From: Jvle Date: Sat, 18 Jul 2026 14:18:06 +0800 Subject: [PATCH] fix: clean generated spec formatting Signed-off-by: Jvle --- spec.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/spec.go b/spec.go index 0be5c60..adcca85 100644 --- a/spec.go +++ b/spec.go @@ -201,17 +201,18 @@ func writeSpec(dir, gopkg, openRuyiSrc, openRuyiLib, openRuyiProgram, version st log.Fatalf("Invalid pkgType %d in writeRPMSpec(), aborting", pkgType) } - fmt.Fprintf(f, "\n") + if pkgType != typeLibrary { + fmt.Fprintf(f, "\n") + } fmt.Fprintf(f, "%%description\n") - fmt.Fprintf(f, "%s\n", longdescription) - fmt.Fprintf(f, "\n") + fmt.Fprintf(f, "%s\n\n", strings.TrimRight(longdescription, "\n")) // %files writeRPMFilesSection(f, openRuyiSrc, openRuyiLib, openRuyiProgram, pkgType, assetFiles) // %changelog fmt.Fprintf(f, "%%changelog\n") - fmt.Fprintf(f, "%%{?autochangelog}\n\n") + fmt.Fprintf(f, "%%autochangelog\n\n") return nil } -- 2.54.0