summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTodd Zullinger <tmz@pobox.com>2008-12-26 21:49:42 -0500
committerTodd Zullinger <tmz@pobox.com>2008-12-27 10:34:19 -0500
commit77a5d0bdb18fcf7f8b737f8246e1b4a2fd727ff6 (patch)
treeb5ef667c1fb6c2e85f7ef434cf858dbe3bed19c4
parent5b05644cce52e24ab2e140bb831803efdb365660 (diff)
downloadgit-package-77a5d0bdb18fcf7f8b737f8246e1b4a2fd727ff6.tar.gz
git-package-77a5d0bdb18fcf7f8b737f8246e1b4a2fd727ff6.tar.xz
git-package-77a5d0bdb18fcf7f8b737f8246e1b4a2fd727ff6.zip
Consolidate build/install options in %make_git (Roland McGrath)
-rw-r--r--git.spec20
1 files changed, 13 insertions, 7 deletions
diff --git a/git.spec b/git.spec
index d343911..893cec7 100644
--- a/git.spec
+++ b/git.spec
@@ -131,18 +131,23 @@ Requires: git = %{version}-%{release}, emacs-common
%setup -q
%patch0 -p1
+# Use these same options for every invocation of 'make'.
+# Otherwise it will rebuild in %%install due to flags changes.
+%define make_git \
+make %{_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" \\\
+ ETC_GITCONFIG=%{_sysconfdir}/gitconfig \\\
+ DESTDIR=$RPM_BUILD_ROOT \\\
+ INSTALL="install -p" \\\
+ INSTALLDIRS=vendor \\\
+ prefix=%{_prefix}
+
%build
-make %{_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" \
- ETC_GITCONFIG=%{_sysconfdir}/gitconfig \
- prefix=%{_prefix} all %{!?_without_docs: doc}
+%{make_git} all %{!?_without_docs: doc}
make -C contrib/emacs
%install
rm -rf $RPM_BUILD_ROOT
-make %{_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" DESTDIR=$RPM_BUILD_ROOT \
- prefix=%{_prefix} mandir=%{_mandir} INSTALL="install -p" \
- ETC_GITCONFIG=%{_sysconfdir}/gitconfig \
- INSTALLDIRS=vendor install %{!?_without_docs: install-doc}
+%{make_git} install %{!?_without_docs: install-doc}
make -C contrib/emacs install \
emacsdir=$RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp
for elc in $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/*.elc ; do
@@ -270,6 +275,7 @@ rm -rf $RPM_BUILD_ROOT
* Sat Dec 20 2008 Todd Zullinger <tmz@pobox.com> 1.6.0.6-2
- Install git-* commands in %%{_libexecdir}/git-core, the upstream default
- Remove libcurl from Requires, rpm will pick this up automatically
+- Consolidate build/install options in %%make_git (Roland McGrath)
- Include DirectoryIndex in gitweb httpd-config (bug 471692)
- Preserve timestamps on installed files
- Quiet some rpmlint complaints