From d78e30202a3d2a7d589ac8c50d8c586b59e56ac8fb96c1f95620eb31a4ab1a2b Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Tue, 6 Jun 2017 11:11:31 +0000 Subject: [PATCH 1/2] Accepting request 501361 from home:pluskalm:branches:Archiving - Drop implicit pie building - Try profiled build - Move autoreconf to build section OBS-URL: https://build.opensuse.org/request/show/501361 OBS-URL: https://build.opensuse.org/package/show/Archiving/bzip2?expand=0&rev=61 --- bzip2.changes | 7 +++++++ bzip2.spec | 52 ++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 46 insertions(+), 13 deletions(-) diff --git a/bzip2.changes b/bzip2.changes index 3ad4cc3..ad1354b 100644 --- a/bzip2.changes +++ b/bzip2.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Jun 6 10:32:06 UTC 2017 - mpluskal@suse.com + +- Drop implicit pie building +- Try profiled build +- Move autoreconf to build section + ------------------------------------------------------------------- Thu Mar 23 15:14:20 UTC 2017 - kstreitova@suse.com diff --git a/bzip2.spec b/bzip2.spec index 9db72c8..9abed04 100644 --- a/bzip2.spec +++ b/bzip2.spec @@ -41,10 +41,9 @@ BuildRequires: autoconf >= 2.57 BuildRequires: libtool BuildRequires: pkgconfig # The following is a kludge to get updating bzip2 to after the split work -PreReq: %{libname} +Requires(pre): %{libname} Provides: bzip = %{version} Obsoletes: bzip < %{version} -BuildRoot: %{_tmppath}/%{name}-%{version}-build %description The bzip2 program is a very powerful program for compressing files. @@ -52,9 +51,7 @@ The bzip2 program is a very powerful program for compressing files. %package doc Summary: The bzip2 program and Library Documentation Group: Productivity/Archiving/Compression -%if 0%{?suse_version} > 1130 BuildArch: noarch -%endif %description doc The bzip2 program and library documentation. @@ -83,19 +80,27 @@ The bzip2 runtime library development files. %patch3 -p1 %patch4 %patch5 -p1 -autoreconf -fiv %build -export CFLAGS="%{optflags} -fPIE" -%configure --with-pic --disable-static -make %{?_smp_mflags} LDFLAGS="-pie" +autoreconf -fiv +%configure \ + --with-pic \ + --disable-static +%if %{do_profiling} + make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_generate}" + make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_generate}" check + make test + make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_feedback}" +%else + make %{?_smp_mflags} CFLAGS="%{optflags}" +%endif %install -make DESTDIR=%{buildroot} install %{?_smp_mflags} pkgconfigdir=%{_libdir}/pkgconfig +%make_install pkgconfigdir=%{_libdir}/pkgconfig gzip -9 manual.ps gzip -dc %{SOURCE1} > bznew -install -D -m 755 bznew %{buildroot}%{_bindir}/bznew -install -m 644 %{SOURCE2} %{buildroot}%{_mandir}/man1 +install -Dpm 0755 bznew %{buildroot}%{_bindir}/bznew +install -m 0644 %{SOURCE2} %{buildroot}%{_mandir}/man1 # Steam and prolly others still use the 1.0 name, so we need to be # compatible # Remove this when all distros use the autotools based bzip2 release @@ -111,8 +116,29 @@ make %{?_smp_mflags} test %files %defattr(-,root,root) -%{_mandir}/man1/* -%{_bindir}/* +%{_bindir}/bunzip2 +%{_bindir}/bzcat +%{_bindir}/bzcmp +%{_bindir}/bzdiff +%{_bindir}/bzegrep +%{_bindir}/bzfgrep +%{_bindir}/bzgrep +%{_bindir}/bzip2 +%{_bindir}/bzip2recover +%{_bindir}/bzless +%{_bindir}/bzmore +%{_bindir}/bznew +%{_mandir}/man1/bunzip2.1%{ext_man} +%{_mandir}/man1/bzcat.1%{ext_man} +%{_mandir}/man1/bzcmp.1%{ext_man} +%{_mandir}/man1/bzdiff.1%{ext_man} +%{_mandir}/man1/bzegrep.1%{ext_man} +%{_mandir}/man1/bzfgrep.1%{ext_man} +%{_mandir}/man1/bzgrep.1%{ext_man} +%{_mandir}/man1/bzip2.1%{ext_man} +%{_mandir}/man1/bzless.1%{ext_man} +%{_mandir}/man1/bzmore.1%{ext_man} +%{_mandir}/man1/bznew.1%{ext_man} %files doc %defattr(-,root,root) From 0e38174ca646395ed70d1e084f5d49c349f4a836a3f27caad36b313689495c3e Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Wed, 7 Jun 2017 07:35:36 +0000 Subject: [PATCH 2/2] OBS-URL: https://build.opensuse.org/package/show/Archiving/bzip2?expand=0&rev=62 --- bzip2.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bzip2.spec b/bzip2.spec index 9abed04..17cb901 100644 --- a/bzip2.spec +++ b/bzip2.spec @@ -88,8 +88,8 @@ autoreconf -fiv --disable-static %if %{do_profiling} make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_generate}" - make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_generate}" check - make test + make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_generate}" test + make clean make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_feedback}" %else make %{?_smp_mflags} CFLAGS="%{optflags}"