From 3f3a0b63092889e5f35fe9b8862d8905813e6511 Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Wed, 30 May 2018 14:42:00 -0400 Subject: [PATCH] Use %make_build and %make_install Also drop DESTDIR and INSTALL from config.mak; they are both handled via %make_install. Remove the rpmlint filter for %buildroot usage which was only needed due to DESTDIR's use in config.mak. --- git.rpmlintrc | 3 --- git.spec | 15 +++++++-------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/git.rpmlintrc b/git.rpmlintrc index caf2fb7..9a57745 100644 --- a/git.rpmlintrc +++ b/git.rpmlintrc @@ -4,9 +4,6 @@ from Config import * addFilter("git.* spelling-error %description .* subpackages") addFilter("git-subtree.* spelling-error %description .* (subdirectory|subproject|subtree)") -# We're not misusing %{buildroot} here -addFilter("git\.(spec|src):.* rpm-buildroot-usage %prep DESTDIR = %{buildroot}") - # git-core-doc requires git-core, which provides the symlink target addFilter("git(-core-doc)?\..*: W: dangling-relative-symlink /usr/share/doc/git/contrib/hooks ../../../git-core/contrib/hooks") diff --git a/git.spec b/git.spec index 09c5f63..5456fda 100644 --- a/git.spec +++ b/git.spec @@ -458,8 +458,6 @@ LDFLAGS = %{__global_ldflags} NEEDS_CRYPTO_WITH_SSL = 1 USE_LIBPCRE2 = 1 ETC_GITCONFIG = %{_sysconfdir}/gitconfig -DESTDIR = %{buildroot} -INSTALL = install -p GITWEB_PROJECTROOT = %{_localstatedir}/lib/git GNU_ROFF = 1 NO_CROSS_DIRECTORY_HARDLINKS = 1 @@ -507,18 +505,18 @@ rm -rf perl/Git/LoadCPAN{.pm,/} grep -rlZ '^use Git::LoadCPAN::' | xargs -r0 sed -i 's/Git::LoadCPAN:://g' %build -make %{?_smp_mflags} all %{?with_docs:doc} +%make_build all %{?with_docs:doc} make -C contrib/emacs %if %{libsecret} -make -C contrib/credential/libsecret/ +%make_build -C contrib/credential/libsecret/ %endif make -C contrib/credential/netrc/ -make -C contrib/diff-highlight/ +%make_build -C contrib/diff-highlight/ -make -C contrib/subtree/ +%make_build -C contrib/subtree/ # Fix shebang in a few places to silence rpmlint complaints # @@ -541,7 +539,7 @@ sed -i -e '1s@#!\( */usr/bin/env python\|%{__python2}\)$@#!%{__python3}@' \ %endif %install -make %{?_smp_mflags} install %{?with_docs:install-doc} +%make_install %{?with_docs:install-doc} # symlink %%{gitexecdir} copies of git, git-shell, and git-upload-pack for i in git git-shell git-upload-pack; do @@ -565,7 +563,7 @@ install -pm 755 contrib/credential/libsecret/git-credential-libsecret \ install -pm 755 contrib/credential/netrc/git-credential-netrc \ %{buildroot}%{gitexecdir} -make -C contrib/subtree install %{?with_docs:install-doc} +%make_install -C contrib/subtree %{?with_docs:install-doc} mkdir -p %{buildroot}%{_sysconfdir}/httpd/conf.d install -pm 0644 %{SOURCE13} %{buildroot}%{_sysconfdir}/httpd/conf.d/%{gitweb_httpd_conf} @@ -900,6 +898,7 @@ make test || ./print-failed-test-output * Wed May 30 2018 Todd Zullinger - 2.17.1-3 - Use %%apply_patch for aarch64 zlib patch, return to %%autosetup - Disable jgit tests on s390x, they're unreliable +- Use %make_build and %make_install * Tue May 29 2018 Todd Zullinger - 2.17.1-2 - packfile: Correct zlib buffer handling (#1582555)