+ # 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