]> TLD Linux GIT Repositories - packages/rpm-build-tools.git/commitdiff
- add tld macro to release when building to allow release control
authorMarcin Krol <hawk@tld-linux.org>
Sat, 20 Mar 2021 17:02:26 +0000 (18:02 +0100)
committerMarcin Krol <hawk@tld-linux.org>
Sat, 20 Mar 2021 17:02:26 +0000 (18:02 +0100)
builder.sh

index 4ea1d3d8904a203ea2bb28b8e4ea0343583b2f81..1d876e589f1b12ec841a419cd0a14ea53a1f563c 100755 (executable)
@@ -1756,6 +1756,8 @@ build_package() {
        fi
        # Enable/disable distro wide bconds based on ~/.distbcond
        process_distbcond "$specdir/$SPECFILE"
+       # Add %tld macro to release to allow release control
+       sed -i -r -e 's/^Release:\s+(.*)$/Release:\t\1%{?tld}/' $specdir/$SPECFILE
        # FIXME: eval here is exactly why?
        PATH=$CLEAN_PATH eval teeboth "'$logfile'" ${TIME_COMMAND} ${NICE_COMMAND} $RPMBUILD $TARGET_SWITCH $BUILD_SWITCH -v $QUIET $CLEAN $RPMOPTS $RPMBUILDOPTS $BCOND --define \'_specdir $PACKAGE_DIR\' --define \'_sourcedir $PACKAGE_DIR\' $specdir/$SPECFILE
        retval=$?