Skip to content

Commit

Permalink
Merge pull request #83 from essentialkaos/develop
Browse files Browse the repository at this point in the history
Version 2.7.2
  • Loading branch information
andyone authored Mar 11, 2020
2 parents 3882b9d + 7040aeb commit cd67d25
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 8 deletions.
21 changes: 17 additions & 4 deletions SOURCES/libexec/build.shx
Original file line number Diff line number Diff line change
Expand Up @@ -458,10 +458,9 @@ getYumOpts() {
# Convert utility options to rpmbuild options
#
# Code: No
# Echo: No
# Echo: Options (String)
getBuildOpts() {
local opts=""
local macros_def

if [[ -n "$no_source" ]] ; then
opts="-bb"
Expand All @@ -479,13 +478,27 @@ getBuildOpts() {
[[ -n "$without" ]] && opts="$opts $(getBuildOptsWithout)"
[[ -n "$verbose" ]] && opts="$opts --verbose"

if [[ -n "$define" ]] ; then
opts="$opts $(getDefineOpts)"
fi

echo "$opts"
}

# Get options with macro definitions
#
# Code: No
# Echo: Options (String)
getDefineOpts() {
local opts macros_def

if [[ -n "$define" ]] ; then
for macros_def in $define ; do
opts="$opts --define=\"${macros_def/=/ }\""
opts="--define=\"${macros_def/=/ }\" ${opts}"
done
fi

echo "$opts"
echo "${opts% }"
}

# Get build prefix
Expand Down
16 changes: 14 additions & 2 deletions SOURCES/libexec/spec.shx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,13 @@ readInspecOptions() {
# Code: No
# Echo: Sources list (String)
getSources() {
spectool -n -S "$1" 2>/dev/null | cut -f2 -d" "
local opts

if [[ -n "$define" ]] ; then
opts=$(getDefineOpts)
fi

eval "spectool -n -S $opts $1" 2>/dev/null | cut -f2 -d" "
}

# Get patches
Expand All @@ -63,7 +69,13 @@ getSources() {
# Code: No
# Echo: Patches list (String)
getPatches() {
spectool -n -P "$1" 2>/dev/null | cut -f2 -d" "
local opts

if [[ -n "$define" ]] ; then
opts=$(getDefineOpts)
fi

eval "spectool $opts -n -P $1" 2>/dev/null | cut -f2 -d" "
}

# Bump version in spec after successful build
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="2.7.1"
VER="2.7.2"

################################################################################

Expand Down
6 changes: 5 additions & 1 deletion rpmbuilder.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Summary: RPM package build helper
Name: rpmbuilder
Version: 2.7.1
Version: 2.7.2
Release: 0%{?dist}
License: EKOL
Group: Development/Tools
Expand Down Expand Up @@ -55,6 +55,10 @@ rm -rf %{buildroot}
################################################################################

%changelog
* Tue Mar 10 2020 Anton Novojilov <andy@essentialkaos.com> - 2.7.2-0
- Fixed bug with handling macroses defined through --define option while
downloading sources and patches

* Wed Feb 05 2020 Anton Novojilov <andy@essentialkaos.com> - 2.7.1-0
- Fixed handling --download option with predefined options in preferences file

Expand Down

0 comments on commit cd67d25

Please sign in to comment.