@matheusbsbs / matheus-bagliano / commits / 9f7a3c19de
Fork 0

RPM packaging: use %global inside %{!?...}

According to https://www.redhat.com/archives/fedora-devel-list/2010-January/msg00093.html scope of %define lasts until the end brace; earlier RPM up to Fedora 12 didn't necessarily honor the scope, but later versions corrected the bug. Problem and solution both pointed out by Todd Zullinger. Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Jan 31, 2010 at 11:11 UTC 9f7a3c19dee2064b24b6b9fd5d6f6e770d4d539c
1 file changed +4 -1
git.spec.in
+4 -1
@@ -98,7 +98,7 @@ BuildRequires: perl(Error)
98 Perl interface to Git
99
100 %define path_settings ETC_GITCONFIG=/etc/gitconfig prefix=%{_prefix} mandir=%{_mandir} htmldir=%{_docdir}/%{name}-%{version}
101 -%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
101 +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
102
103 %prep
104 %setup -q
@@ -192,6 +192,9 @@ rm -rf $RPM_BUILD_ROOT
192 # No files for you!
193
194 %changelog
195 +* Sun Jan 31 2010 Junio C Hamano <gitster@pobox.com>
196 +- Do not use %define inside %{!?...} construct.
197 +
198 * Sat Jan 30 2010 Junio C Hamano <gitster@pobox.com>
199 - We don't ship Python bits until a real foreign scm interface comes.
200