X-Git-Url: https://git.tld-linux.org/?a=blobdiff_plain;f=builder.sh;h=787e2168a51ce54da32094a9de3bfec8131760ea;hb=481879772435a1632563d0d2a65c90fe5b7d9d0b;hp=a19da1207d111a72e70ecf92315418108f3452d0;hpb=45d8f2d9258214696ed2d3bba02ceb0236d47fd3;p=packages%2Frpm-build-tools.git diff --git a/builder.sh b/builder.sh index a19da12..787e216 100755 --- a/builder.sh +++ b/builder.sh @@ -1750,6 +1750,14 @@ build_package() { local specdir=$(insert_gitlog $SPECFILE) ulimit -c unlimited + # If required exclude directories with systemd related files from package contents + if grep -q -E 'systemd(unitdir|userunitdir|tmpfilesdir)' $specdir/$SPECFILE; then + sed -i -e '/^%exclude_systemd_files/d; /^%files/s/$/\n%exclude_systemd_files/g;' $specdir/$SPECFILE + fi + # Disable systemd bcond if present and enabled, there is no systemd in TLD + if grep -q -E '^%bcond_without\s+systemd\s+' $specdir/$SPECFILE; then + sed -i -r -e '/^%bcond_without\s+systemd\s+/s/bcond_without/bcond_with/g;' $specdir/$SPECFILE + fi # 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=$?