Add a bcond to build with external debugedit

In preparation to splitting debugedit to a separate project, add a
switch that we can easily flick when the time comes.
This commit is contained in:
Panu Matilainen 2021-04-26 14:30:22 +03:00
parent ae094714b0
commit 3e8fbdcf8f
1 changed files with 19 additions and 4 deletions

View File

@ -25,12 +25,14 @@
%bcond_without sqlite %bcond_without sqlite
# build with bdb_ro support? # build with bdb_ro support?
%bcond_without bdb_ro %bcond_without bdb_ro
# build with external debugedit?
%bcond_with debugedit
%define rpmhome /usr/lib/rpm %define rpmhome /usr/lib/rpm
%global rpmver 4.16.90 %global rpmver 4.16.90
%global snapver git15395 %global snapver git15395
%global rel 1 %global rel 2
%global sover 9 %global sover 9
%global srcver %{rpmver}%{?snapver:-%{snapver}} %global srcver %{rpmver}%{?snapver:-%{snapver}}
@ -181,6 +183,9 @@ Requires: tar unzip gzip bzip2 cpio xz
%if %{with zstd} %if %{with zstd}
Requires: zstd Requires: zstd
%endif %endif
%if %{with debugedit}
Requires: debugedit
%endif
Requires: pkgconfig >= 1:0.24 Requires: pkgconfig >= 1:0.24
Requires: /usr/bin/gdb-add-index Requires: /usr/bin/gdb-add-index
# https://fedoraproject.org/wiki/Changes/Minimal_GDB_in_buildroot # https://fedoraproject.org/wiki/Changes/Minimal_GDB_in_buildroot
@ -376,6 +381,10 @@ rm -f $RPM_BUILD_ROOT/%{rpmhome}/{perldeps.pl,perl.*,pythond*}
rm -f $RPM_BUILD_ROOT/%{_fileattrsdir}/{perl*,python*} rm -f $RPM_BUILD_ROOT/%{_fileattrsdir}/{perl*,python*}
rm -rf $RPM_BUILD_ROOT/var/tmp rm -rf $RPM_BUILD_ROOT/var/tmp
%if %{with debugedit}
rm -f $RPM_BUILD_ROOT/%{rpmhome}/{debugedit,sepdebugcrcfix,find-debuginfo.sh}
%endif
%if %{with check} %if %{with check}
%check %check
make check TESTSUITEFLAGS=-j%{_smp_build_ncpus} || (cat tests/rpmtests.log; exit 1) make check TESTSUITEFLAGS=-j%{_smp_build_ncpus} || (cat tests/rpmtests.log; exit 1)
@ -506,9 +515,6 @@ fi
%{rpmhome}/brp-* %{rpmhome}/brp-*
%{rpmhome}/check-* %{rpmhome}/check-*
%{rpmhome}/debugedit
%{rpmhome}/sepdebugcrcfix
%{rpmhome}/find-debuginfo.sh
%{rpmhome}/find-lang.sh %{rpmhome}/find-lang.sh
%{rpmhome}/*provides* %{rpmhome}/*provides*
%{rpmhome}/*requires* %{rpmhome}/*requires*
@ -518,6 +524,12 @@ fi
%{rpmhome}/mkinstalldirs %{rpmhome}/mkinstalldirs
%{rpmhome}/fileattrs/* %{rpmhome}/fileattrs/*
%if !%{with debugedit}
%{rpmhome}/debugedit
%{rpmhome}/sepdebugcrcfix
%{rpmhome}/find-debuginfo.sh
%endif
%files sign %files sign
%{_bindir}/rpmsign %{_bindir}/rpmsign
%{_mandir}/man8/rpmsign.8* %{_mandir}/man8/rpmsign.8*
@ -542,6 +554,9 @@ fi
%doc doc/librpm/html/* %doc doc/librpm/html/*
%changelog %changelog
* Mon Apr 26 2021 Panu Matilainen <pmatilai@redhat.com> - 4.16.90-0.git15395.2
- Add a bcond to build with external debugedit
* Mon Apr 26 2021 Panu Matilainen <pmatilai@redhat.com> - 4.16.90-0.git15395.1 * Mon Apr 26 2021 Panu Matilainen <pmatilai@redhat.com> - 4.16.90-0.git15395.1
- Rebase to rpm 4.17.0 alpha (https://rpm.org/wiki/Releases/4.17.0) - Rebase to rpm 4.17.0 alpha (https://rpm.org/wiki/Releases/4.17.0)
- Drop a local hack for a cosmetic Fedora 22 era rpm2cpio issue - Drop a local hack for a cosmetic Fedora 22 era rpm2cpio issue