# and that both p and q are package names (i.e. no version/release).
%_dependency_whiteout %{nil}
+
+#-----------------------------------------------------------------
+#
+# (re)definition of %{rpm*flags} with %filterout_* support
+# Requires: awk
+#
+# Flags specified in %filterout_* are removed from %rpm*flags, exactly:
+# %rpmcflags = %optflags - %filterout - %filterout_c - %filterout_ld
+# %rpmcxxflags = %optflags - %filterout - %filterout_cxx - %filterout_ld
+# %rpmldflags = %optldflags - %filterout_ld
+#
+# Regular expressions are supported, but to avoid some character be treated
+# as regular expression it must be escaped twice.
+
+%filter_out \
+ for (i in I) { A=0; \
+ for (f in F) { \
+ if (I[i] ~ "^" F[f] "$") A=1; \
+ }; \
+ if (!A) printf(I[i] FS); \
+ }
+
+%rpmcflags %(awk 'BEGIN {
+ split("%{?debug:%debugcflags}%{!?debug:%optflags}%{?debuginfocflags}",I);
+ split("%{?filterout} %{?filterout_c} %{?filterout_ld}",F);
+ %{filter_out}
+}')
+
+%rpmcxxflags %(awk 'BEGIN {
+ split("%{?debug:%debugcflags}%{!?debug:%optflags}%{?debuginfocflags}",I);
+ split("%{?filterout} %{?filterout_cxx} %{?filterout_ld}",F);
+ %{filter_out}
+}')
+
+%rpmldflags %(awk 'BEGIN {
+ split("%{?optldflags}",I);
+ split("%{?filterout_ld}",F)
+ %{filter_out}
+}')
+
#-----------------------------------------------------------------
%configure2_13 { \
if [ -n "$LINGUAS" ]; then unset LINGUAS; fi; \
#
%update_icon_cache() {{ \
umask 022; \
- gtk-update-icon-cache -qf %{_datadir}/icons/%1; \
+ /usr/bin/gtk-update-icon-cache -qf %{_datadir}/icons/%1; \
}}
#-----------------------------------------------------------------
%{-M} \\\
%{-G:-G %{-G*}} \\\
%{expand:%{%{#}}} 1>&2 || exit $? \
- [ ! -x /usr/sbin/nscd ] || /usr/sbin/nscd -i passwd \
+ [ ! -x /usr/sbin/nscd ] || /usr/sbin/nscd -i passwd || : \
fi;
# Usage:
else \
echo "Adding group %{1} GID=%{-g*}." \
/usr/sbin/groupadd -g %{-g*} -r %{1} 1>&2 || exit $? \
- [ ! -x /usr/sbin/nscd ] || /usr/sbin/nscd -i group \
+ [ ! -x /usr/sbin/nscd ] || /usr/sbin/nscd -i group || : \
fi;
# apache_config_{install/uninstall} macros written by glen@pld-linux.org.
done \
%{nil}
+%env_update [ ! -x /sbin/env-update ] || /sbin/env-update -u || :
+
# vim:ts=4 sw=4 noet