Skip to content

Commit

Permalink
Merge pull request #140 from essentialkaos/develop
Browse files Browse the repository at this point in the history
Version 3.4.1
  • Loading branch information
andyone authored Sep 13, 2024
2 parents 5e47276 + 8a03ba8 commit 648b528
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 14 deletions.
24 changes: 13 additions & 11 deletions SOURCES/libexec/build.shx
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,23 @@ startBuild() {
local spec="$1"
local err

if ! isSpecFile "$spec" ; then
if isSpecFile "${spec}.spec" ; then
[[ -r "${spec}.source" && -z "$source_list" ]] && source_list="$spec.source"
spec="${spec}.spec"
else
err=$(validateSpec "$spec")
if isSpecFile "${spec}.spec" ; then
if [[ -r "${spec}.source" && -z "$source_list" ]] ; then
source_list="$spec.source"
fi
spec="${spec}.spec"
fi

error "\"$spec\" is not a spec file!"
if ! isSpecFile "$spec" ; then
err=$(validateSpec "$spec")

if [[ -n "$err" ]] ; then
error "$err"
fi
error "\"$spec\" is not a valid spec file!"

doExit $ERROR_SPEC
if [[ -n "$err" ]] ; then
error "$err"
fi

doExit $ERROR_SPEC
fi

checkOptions
Expand Down
2 changes: 1 addition & 1 deletion SOURCES/libexec/spec.shx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ isSpecFile() {
# Code: Yes
# Echo: Validation error (String)
validateSpec() {
spectool -n "$1" 1>/dev/null 2>&1
spectool -n "$1" 2>&1 | grep 'error: '
return $?
}

Expand Down
2 changes: 1 addition & 1 deletion SOURCES/rpmbuilder
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fi
APP="RPMBuilder"

# Utility version (String)
VER="3.4.0"
VER="3.4.1"

# Utility description (String)
DESC="RPM package build helper"
Expand Down
5 changes: 4 additions & 1 deletion rpmbuilder.spec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Summary: RPM package build helper
Name: rpmbuilder
Version: 3.4.0
Version: 3.4.1
Release: 0%{?dist}
License: Apache License, Version 2.0
Group: Development/Tools
Expand Down Expand Up @@ -58,6 +58,9 @@ install -pm 644 libexec/* %{buildroot}%{_libexecdir}/%{name}/
################################################################################

%changelog
* Wed Sep 11 2024 Anton Novojilov <[email protected]> - 3.4.1-0
- Improved spec validation

* Mon Sep 09 2024 Anton Novojilov <[email protected]> - 3.4.0-0
- Added 'define' option validation
- Pass macros from 'define' option to spec-builddep
Expand Down

0 comments on commit 648b528

Please sign in to comment.