File p7zip.spec of Package p7zip

Name:		p7zip
Version:	17.05
Release:	%mkrel 1
Summary:	7-zip compatible compression program
License:	LGPLv2+
Group:		Archiving/Compression
# https://sourceforge.net/projects/p7zip/
Url:		https://github.com/p7zip-project/p7zip
Source0:	https://github.com/p7zip-project/p7zip/archive/v%{version}/%{name}-%{version}.tar.gz
Patch1:		0001-fix-data-null-pointer.patch
Patch2:		0001-fix-out-of-mem.patch
%ifarch %{ix86}
BuildRequires:	nasm
%endif
%ifarch x86_64
BuildRequires:	yasm
%endif

%description
p7zip is a port of 7za.exe for Unix. 7-Zip is a file archiver with
a high compression ratio.
This package contains a new p7zip fork with additional codecs and
improvements (forked from https://sourceforge.net/projects/p7zip/).

%prep
%setup -q -n %{name}-%{version}
%autopatch -p1

%ifarch x86_64
cp makefile.linux_amd64_asm makefile.machine
%endif
%ifarch %{ix86}
cp makefile.linux_x86_asm_gcc_4.X makefile.machine
%endif
%ifarch ppc ppc64
cp -f makefile.linux_any_cpu_gcc_4.X makefile.machine
%endif

find DOC -type d|xargs chmod 755
find README ChangeLog TODO DOC -type f|xargs chmod 644
#gw don't package this, it is non-free like unrar
find . -name 'unRarLicense.txt' -delete
#fix wrong-file-end-of-line-encoding
find ./DOC/MANUAL -name 'style.css' -exec sed -i 's/\r$//' {} \;

%build
%make_build all3 OPTFLAGS="%{optflags}"

%install
%make_install \
	DEST_HOME=%{buildroot}%{_prefix} \
	DEST_MAN=%{buildroot}%{_mandir} \
	DEST_SHARE=%{buildroot}%{_libdir}/%{name}

chmod -R +w %{buildroot}
#gw don't package this, it is non-free like unrar
find %{buildroot} -name 'Rar*.so' -delete
#gw fix paths in wrapper scripts and man pages
perl -pi -e "s^%{buildroot}^^" %{buildroot}%{_bindir}/* %{buildroot}%{_mandir}/man1/*
#(daviddavid) remove unwanted packaged docs
rm -rf %{buildroot}%{_docdir}/%{name}/DOC

%files
%doc README ChangeLog TODO DOC/*
%{_bindir}/7za
%{_bindir}/7zr
%{_bindir}/7z
%{_libdir}/p7zip
%{_mandir}/man1/*


%changelog
* Thu Jun 22 2023 daviddavid <daviddavid> 17.05-1.mga9
+ Revision: 1962842
- new version: 17.05
- remove merged upstream patch
- update Url

* Sat Mar 19 2022 umeabot <umeabot> 17.04-3.mga9
+ Revision: 1800048
- Mageia 9 Mass Rebuild

* Mon Jun 28 2021 luigiwalser <luigiwalser> 17.04-2.mga9
+ Revision: 1734134
- add upstream patch to fix CVE-2021-3465
- add patches from fedora to fix null pointer dereferences

* Fri Apr 09 2021 daviddavid <daviddavid> 17.04-1.mga9
+ Revision: 1714366
- new version: 17.04

* Tue Jan 12 2021 daviddavid <daviddavid> 17.03-1.mga8
+ Revision: 1671266
- new version: 17.03, fixes CVE-2018-5996 and CVE-2018-10115 (mga#27713)
+ neoclust <neoclust>
- New version 17.02

* Tue Jun 02 2020 daviddavid <daviddavid> 16.02-7.mga8
+ Revision: 1589673
- add fedora patch to fix build with gcc 10

* Fri Feb 14 2020 umeabot <umeabot> 16.02-6.mga8
+ Revision: 1515765
- Mageia 8 Mass Rebuild

* Sun Sep 23 2018 umeabot <umeabot> 16.02-5.mga7
+ Revision: 1300084
- Mageia 7 Mass Rebuild

* Sat Feb 17 2018 daviddavid <daviddavid> 16.02-4.mga7
+ Revision: 1202010
- add patch to fix CVE-2018-5996 (mga#22613)
- improve previous CVE-2017-17969 patch

* Mon Feb 05 2018 daviddavid <daviddavid> 16.02-3.mga7
+ Revision: 1199007
- add debian patch to fix CVE-2017-17969 (mga#22523)
- also add from debian some others patches:
  * Fix-g++-warning.patch
  * hardening-flags.patch
  * man.patch
  * manpages.patch

* Mon Nov 21 2016 daviddavid <daviddavid> 16.02-2.mga6
+ Revision: 1068628
- add an upstream patch to fix CVE-2016-9296
  * https://sourceforge.net/p/p7zip/bugs/185/
  * https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-9296

* Thu Aug 11 2016 daviddavid <daviddavid> 16.02-1.mga6
+ Revision: 1045536
- new version: 16.02
- remove merged upstream patches

* Thu May 19 2016 daviddavid <daviddavid> 15.14.1-2.mga6
+ Revision: 1016930
- add two upstream patches to fix CVE-2016-2334 and CVE-2016-2335 (mga#18490)
  * https://sourceforge.net/p/p7zip/discussion/383043/thread/9d0fb86b/#1dba

* Fri Mar 25 2016 daviddavid <daviddavid> 15.14.1-1.mga6
+ Revision: 995240
- new version: 15.14.1

* Fri Mar 18 2016 daviddavid <daviddavid> 15.14-1.mga6
+ Revision: 992688
- new version: 15.14
- remove p7zip-15.09-CVE-2015-1038.patch, from changelog is fixed
+ umeabot <umeabot>
- Mageia 6 Mass Rebuild

* Sat Dec 12 2015 daviddavid <daviddavid> 15.09-1.mga6
+ Revision: 909651
- new version: 15.09
- add another patch from Fedora to fix CVE-2015-1038 for release 15.09
- fix more packaging of docs
- fix some wrong-file-end-of-line-encoding warnings
- switch 'alpha ppc' build to 'ppc ppc64'

* Mon Oct 19 2015 danf <danf> 9.20.1-8.mga6
+ Revision: 892631
- Fix packaging of docs on latest rpm

* Tue Jun 16 2015 luigiwalser <luigiwalser> 9.20.1-7.mga6
+ Revision: 823171
- add patch from debian to fix CVE-2015-1038

* Wed Oct 15 2014 umeabot <umeabot> 9.20.1-6.mga5
+ Revision: 746759
- Second Mageia 5 Mass Rebuild

* Tue Sep 16 2014 umeabot <umeabot> 9.20.1-5.mga5
+ Revision: 683302
- Mageia 5 Mass Rebuild

* Fri Oct 18 2013 umeabot <umeabot> 9.20.1-4.mga4
+ Revision: 508806
- Mageia 4 Mass Rebuild

* Sun Jan 13 2013 umeabot <umeabot> 9.20.1-3.mga3
+ Revision: 362330
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Fri Nov 16 2012 zezinho <zezinho> 9.20.1-2.mga3
+ Revision: 318986
- spec cleanup
+ dams <dams>
- delete patch

* Wed Jul 13 2011 dams <dams> 9.20.1-1.mga2
+ Revision: 123771
- Update to 9.20.1
- Drop patch

* Mon Mar 07 2011 nanardon <nanardon> 9.13-2.mga1
+ Revision: 65806
- imported package p7zip


* Sun Aug 15 2010 Götz Waschk <waschk@mandriva.org> 9.13-2mdv2011.0
+ Revision: 570239
- fix paths in man pages (bug #60660)

* Sat Aug 07 2010 Götz Waschk <waschk@mandriva.org> 9.13-1mdv2011.0
+ Revision: 567347
- new version
- update patch 0

* Sun Feb 14 2010 Götz Waschk <waschk@mandriva.org> 9.04-3mdv2010.1
+ Revision: 505879
- update build deps
- use the right makefiles
- really use our optimization flags
- fix format strings

* Sun Jun 07 2009 Götz Waschk <waschk@mandriva.org> 9.04-1mdv2010.0
+ Revision: 383769
- update to new version 9.04

* Sat Feb 14 2009 Götz Waschk <waschk@mandriva.org> 4.65-1mdv2009.1
+ Revision: 340325
- update to new version 4.65

* Sun Nov 30 2008 Götz Waschk <waschk@mandriva.org> 4.61-1mdv2009.1
+ Revision: 308588
- update to new version 4.61

* Thu Sep 04 2008 Götz Waschk <waschk@mandriva.org> 4.58-4mdv2009.0
+ Revision: 280737
- fix wrapper scripts
- remove unrar readme
- update license
- add 7z and 7zr (bug #43503)
- add man pages

* Fri Aug 08 2008 Thierry Vignaud <tv@mandriva.org> 4.58-2mdv2009.0
+ Revision: 268355
- rebuild early 2009.0 package (before pixel changes)

* Sun Jun 08 2008 Götz Waschk <waschk@mandriva.org> 4.58-1mdv2009.0
+ Revision: 216942
- new version

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

  + Thierry Vignaud <tv@mandriva.org>
    - kill re-definition of %%buildroot on Pixel's request
    - kill zip URL from description

* Sun Dec 16 2007 Funda Wang <fwang@mandriva.org> 4.57-1mdv2008.1
+ Revision: 120503
- update to new version 4.57

* Tue Oct 09 2007 Götz Waschk <waschk@mandriva.org> 4.55-1mdv2008.1
+ Revision: 96137
- new version

* Sat Sep 01 2007 Götz Waschk <waschk@mandriva.org> 4.53-1mdv2008.0
+ Revision: 77366
- new version

* Thu Jul 26 2007 Götz Waschk <waschk@mandriva.org> 4.51-1mdv2008.0
+ Revision: 56052
- new version

* Sun Jul 15 2007 Götz Waschk <waschk@mandriva.org> 4.49-1mdv2008.0
+ Revision: 52333
- new version

* Sun Jul 01 2007 Götz Waschk <waschk@mandriva.org> 4.48-1mdv2008.0
+ Revision: 46790
- new version

* Mon May 28 2007 Götz Waschk <waschk@mandriva.org> 4.47-1mdv2008.0
+ Revision: 32085
- new version

* Sun Apr 22 2007 Götz Waschk <waschk@mandriva.org> 4.45-1mdv2008.0
+ Revision: 16899
- new version


* Sat Jan 27 2007 Götz Waschk <waschk@mandriva.org> 4.44-1mdv2007.0
+ Revision: 114279
- new version

* Wed Jan 24 2007 Götz Waschk <waschk@mandriva.org> 4.43-2mdv2007.1
+ Revision: 112820
- rebuild
- Import p7zip

* Sun Sep 24 2006 Götz Waschk <waschk@mandriva.org> 4.43-1mdv2007.0
- New version 4.43

* Mon May 29 2006 Götz Waschk <waschk@mandriva.org> 4.42-1mdk
- New release 4.42

* Sun Apr 16 2006 Götz Waschk <waschk@mandriva.org> 4.39-1mdk
- New release 4.39

* Mon Apr 03 2006 Jerome Soyer <saispo@mandriva.org> 4.37-1mdk
- New release 4.37

* Mon Feb 13 2006 Götz Waschk <waschk@mandriva.org> 4.33-1mdk
- New release 4.33

* Tue Jan 17 2006 Per Øyvind Karlsen <pkarlsen@mandriva.com> 4.30-2mdk
- build on all archs
- %%mkrel

* Sat Nov 26 2005 Götz Waschk <waschk@mandriva.org> 4.30-1mdk
- New release 4.30

* Sat Oct 08 2005 Götz Waschk <waschk@mandriva.org> 4.29-1mdk
- new version

* Fri Sep 23 2005 Götz Waschk <waschk@mandriva.org> 4.27-1mdk
- New release 4.27

* Sun Jun 05 2005 Götz Waschk <waschk@mandriva.org> 4.20-1mdk
- New release 4.20

* Sat May 14 2005 Götz Waschk <waschk@mandriva.org> 4.18-1mdk
- New release 4.18

* Sat Apr 09 2005 Götz Waschk <waschk@linux-mandrake.com> 4.16-1mdk
- fix build
- New release 4.16

* Wed Mar 16 2005 Götz Waschk <waschk@linux-mandrake.com> 4.14.01-2mdk
- add docs

* Mon Jan 24 2005 Goetz Waschk <waschk@linux-mandrake.com> 4.14.01-1mdk
- New release 4.14.01

* Sat Jan 15 2005 waschk@linux-mandrake.com 4.14-1mdk
- New release 4.14

* Fri Dec 17 2004 Goetz Waschk <waschk@linux-mandrake.com> 4.13-1mdk
- New release 4.13

* Fri Nov 19 2004 Götz Waschk <waschk@linux-mandrake.com> 4.12-1mdk
- fix build
- drop patch
- New release 4.12

* Tue Oct 26 2004 Götz Waschk <waschk@linux-mandrake.com> 4.10-2mdk
- don't link statically

* Sun Oct 24 2004 Götz Waschk <waschk@linux-mandrake.com> 4.10-1mdk
- remove 7z and keep 7za
- fix source URL
- New release 4.10

* Fri Sep 17 2004 Götz Waschk <waschk@linux-mandrake.com> 0.91-1mdk
- initial package

openSUSE Build Service is sponsored by