]> git.pld-linux.org Git - packages/rpm-build-macros.git/blobdiff - rpm.macros
Merge branch 'master' of git://git.pld-linux.org/packages/rpm-build-macros
[packages/rpm-build-macros.git] / rpm.macros
index 929a3bd1732cc2132f22596396d55d39635481a4..88ab604c5cf1bbc275cbe7e581587019112fccfe 100644 (file)
@@ -449,6 +449,12 @@ CXXFLAGS="%{rpmcxxflags}" \
 # Requires: name >= version (version based on querying package %2)
 %requires_ge_to(r)     %{!?2:ERROR}%{?3:ERROR}%{?2:%{!?3:%(if ! LC_ALL=C rpm -q --qf 'Requires: %1 >= %|E?{%{E}:}|%{V}%{?-r:-%{R}}\\n' %2 | grep '^Requires:'; then echo "BuildRequires: %2"; fi)}}
 
+# \helper for renaming packages
+# %rename old-package
+%rename() \
+Obsoletes: %{1} < %{?epoch:%{epoch}:}%{?version:%{version}}%{?release:-%{release}} \
+Provides: %{1} = %{?epoch:%{epoch}:}%{?version:%{version}}%{?release:-%{release}} 
+
 %apache_modules_api %{expand:%%global apache_modules_api %(awk '/#define MODULE_MAGIC_NUMBER_MAJOR/ {print $3}' /usr/include/apache/ap_mmn.h 2>/dev/null || echo ERROR)}%apache_modules_api
 
 # kernel version-release handling
This page took 0.032657 seconds and 4 git commands to generate.