aboutsummaryrefslogtreecommitdiffstats
path: root/build.macros.in
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2009-01-29 14:12:08 +0000
committerPascal Rigaux <pixel@mandriva.com>2009-01-29 14:12:08 +0000
commit6a00e838377de30388dbec6ed48e65ce598b3b7e (patch)
treee35343370bb1310be504666436aa0e1b61df57bc /build.macros.in
parent0a7ff99241883736064d013c1e8f296f8f93750e (diff)
downloadrpm-setup-6a00e838377de30388dbec6ed48e65ce598b3b7e.tar
rpm-setup-6a00e838377de30388dbec6ed48e65ce598b3b7e.tar.gz
rpm-setup-6a00e838377de30388dbec6ed48e65ce598b3b7e.tar.bz2
rpm-setup-6a00e838377de30388dbec6ed48e65ce598b3b7e.tar.xz
rpm-setup-6a00e838377de30388dbec6ed48e65ce598b3b7e.zip
- when %_with_git_repository is set, define %_after_setup and %_patch to use
the new scripts git-repository--after-tarball and git-repository--apply-patch
Diffstat (limited to 'build.macros.in')
-rw-r--r--build.macros.in9
1 files changed, 9 insertions, 0 deletions
diff --git a/build.macros.in b/build.macros.in
index 9ce5d86..15bfa83 100644
--- a/build.macros.in
+++ b/build.macros.in
@@ -7,6 +7,15 @@
# [Pixel, Dec 2008] deprecated, to remove as soon as rpm 4.6.0 dust settles down
%defaultbuildroot %{_tmppath}/%{name}-%{version}-%{release}-buildroot
+
+# when %_with_git_repository is set, these macros modify the behaviour of "%prep" step:
+%_after_setup %{?_with_git_repository:GIT_URL="%{?git_url}" GIT_REPOSITORY_CACHE=%{?git_repository_cache} @RPMVENDORDIR@/git-repository--after-tarball}
+%_patch %{?_with_git_repository:PKG_NAME=%{name} @RPMVENDORDIR@/git-repository--apply-patch}%{?!_with_git_repository:%__patch}
+
+# used by "git-repository--after-tarball":
+%git_repository_cache %_topdir/%{name}.git
+
+
# Various programs used in rpm scripts
%_update_desktop_database_bin %{_bindir}/update-desktop-database
%_update_mime_database_bin %{_bindir}/update-mime-database