670d19
%global library_version 1.0.6
670d19
670d19
Summary: A file compression utility
670d19
Name: bzip2
670d19
Version: 1.0.6
670d19
Release: 13%{?dist}
670d19
License: BSD
670d19
Group: Applications/File
670d19
URL: http://www.bzip.org/
670d19
Source: http://www.bzip.org/%{version}/%{name}-%{version}.tar.gz
670d19
670d19
Requires: bzip2-libs = %{version}-%{release}
670d19
670d19
Patch0: bzip2-1.0.4-saneso.patch
670d19
Patch1: bzip2-1.0.4-cflags.patch
670d19
# resolves: #226979
670d19
Patch2: bzip2-1.0.4-bzip2recover.patch
670d19
670d19
%description
670d19
Bzip2 is a freely available, patent-free, high quality data compressor.
670d19
Bzip2 compresses files to within 10 to 15 percent of the capabilities
670d19
of the best techniques available.  However, bzip2 has the added benefit
670d19
of being approximately two times faster at compression and six times
670d19
faster at decompression than those techniques.  Bzip2 is not the
670d19
fastest compression utility, but it does strike a balance between speed
670d19
and compression capability.
670d19
670d19
Install bzip2 if you need a compression utility.
670d19
670d19
%package devel
670d19
Summary: Libraries and header files for apps which will use bzip2
670d19
Group: Development/Libraries
670d19
Requires: bzip2-libs = %{version}-%{release}
670d19
670d19
%description devel
670d19
670d19
Header files and a library of bzip2 functions, for developing apps
670d19
which will use the library.
670d19
670d19
%package libs
670d19
Summary: Libraries for applications using bzip2
670d19
Group: System Environment/Libraries
670d19
670d19
%description libs
670d19
670d19
Libraries for applications using the bzip2 compression format.
670d19
670d19
%prep
670d19
%setup -q
670d19
%patch0 -p1 -b .saneso
670d19
%patch1 -p1 -b .cflags
670d19
%patch2 -p1 -b .bz2recover
670d19
670d19
%build
670d19
%ifarch ppc64 ppc64le
670d19
export O3="-O3"
670d19
%else
670d19
export O3=""
670d19
%endif
670d19
670d19
make -f Makefile-libbz2_so CC="%{__cc}" AR="%{__ar}" RANLIB="%{__ranlib}" \
670d19
    CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64 -fpic -fPIC $O3" \
670d19
    %{?_smp_mflags} all
670d19
670d19
rm -f *.o
670d19
make CC="%{__cc}" AR="%{__ar}" RANLIB="%{__ranlib}" \
670d19
    CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64 $O3" \
670d19
    %{?_smp_mflags} all
670d19
670d19
%install
670d19
chmod 644 bzlib.h
670d19
mkdir -p $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_libdir},%{_includedir}}
670d19
cp -p bzlib.h $RPM_BUILD_ROOT%{_includedir}
670d19
install -m 755 libbz2.so.%{library_version} $RPM_BUILD_ROOT%{_libdir}
670d19
install -m 755 bzip2-shared  $RPM_BUILD_ROOT%{_bindir}/bzip2
670d19
install -m 755 bzip2recover bzgrep bzdiff bzmore  $RPM_BUILD_ROOT%{_bindir}/
670d19
cp -p bzip2.1 bzdiff.1 bzgrep.1 bzmore.1  $RPM_BUILD_ROOT%{_mandir}/man1/
670d19
ln -s bzip2 $RPM_BUILD_ROOT%{_bindir}/bunzip2
670d19
ln -s bzip2 $RPM_BUILD_ROOT%{_bindir}/bzcat
670d19
ln -s bzdiff $RPM_BUILD_ROOT%{_bindir}/bzcmp
670d19
ln -s bzmore $RPM_BUILD_ROOT%{_bindir}/bzless
670d19
ln -s libbz2.so.%{library_version} $RPM_BUILD_ROOT%{_libdir}/libbz2.so.1
670d19
ln -s libbz2.so.1 $RPM_BUILD_ROOT%{_libdir}/libbz2.so
670d19
ln -s bzip2.1 $RPM_BUILD_ROOT%{_mandir}/man1/bzip2recover.1
670d19
ln -s bzip2.1 $RPM_BUILD_ROOT%{_mandir}/man1/bunzip2.1
670d19
ln -s bzip2.1 $RPM_BUILD_ROOT%{_mandir}/man1/bzcat.1
670d19
ln -s bzdiff.1 $RPM_BUILD_ROOT%{_mandir}/man1/bzcmp.1
670d19
ln -s bzmore.1 $RPM_BUILD_ROOT%{_mandir}/man1/bzless.1
670d19
670d19
%post libs -p /sbin/ldconfig
670d19
670d19
%postun libs  -p /sbin/ldconfig
670d19
670d19
%files
670d19
%doc LICENSE CHANGES README
670d19
%{_bindir}/*
670d19
%{_mandir}/*/*
670d19
670d19
%files libs
670d19
%doc LICENSE
670d19
%{_libdir}/libbz2.so.1*
670d19
670d19
%files devel
670d19
%doc manual.html manual.pdf
670d19
%{_includedir}/*
670d19
%{_libdir}/*.so
670d19
670d19
%changelog
670d19
* Thu Jul 31 2014 jchaloup <jchaloup@redhat.com> - 1.0.6-13
670d19
- resolves: #1123489
670d19
  recompiled with -O3 flag for ppc64le arch
670d19
670d19
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 1.0.6-12
670d19
- Mass rebuild 2014-01-24
670d19
670d19
* Fri Jan 10 2014 Peter Schiffer <pschiffe@redhat.com> - 1.0.6-11
670d19
- related: #1051062
670d19
  added explicit requires on bzip2-libs subpackage from main package
670d19
670d19
* Fri Jan 10 2014 Peter Schiffer <pschiffe@redhat.com> - 1.0.6-10
670d19
- resolves: #1051062
670d19
  recompiled with -O3 flag for ppc64 arch
670d19
670d19
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.0.6-9
670d19
- Mass rebuild 2013-12-27
670d19
670d19
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.6-8
670d19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
670d19
670d19
* Fri Oct 26 2012 Peter Schiffer <pschiffe@redhat.com> - 1.0.6-7
670d19
- moved libraries from /lib to /usr/lib
670d19
670d19
* Fri Oct 26 2012 Peter Schiffer <pschiffe@redhat.com> - 1.0.6-6
670d19
- .spec file cleanup
670d19
670d19
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.6-5
670d19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
670d19
670d19
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.6-4
670d19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
670d19
670d19
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.6-3
670d19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
670d19
670d19
* Wed Sep 29 2010 jkeating - 1.0.6-2
670d19
- Rebuilt for gcc bug 634757
670d19
670d19
* Wed Sep 22 2010 Ivana Hutarova Varekova <varekova@redhat.com> - 1.0.6-1
670d19
- update to 1.0.6
670d19
670d19
* Mon Jul 12 2010 Ivana Hutarova Varekova <varekova@redhat.com> - 1.0.5-7
670d19
- add LICENSE to bzip2-libs
670d19
670d19
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.5-6
670d19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
670d19
670d19
* Tue Mar 17 2009 Ivana Varekova <varekova@redhat.com> 1.0.5-5
670d19
- remove static library
670d19
670d19
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.5-4
670d19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
670d19
670d19
* Mon Sep  1 2008 Ivana Varekova <varekova@redhat.com> 1.0.5-3
670d19
- minor spec file changew
670d19
670d19
* Thu Apr 10 2008 Ivana Varekova <varekova@redhat.com> 1.0.5-2
670d19
- Resolves: #441775
670d19
  fix libs link
670d19
670d19
* Tue Mar 25 2008 Ivana Varekova <varekova@redhat.com> 1.0.5-1
670d19
- update to 1.0.5
670d19
670d19
* Wed Feb 20 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.0.4-14
670d19
- Autorebuild for GCC 4.3
670d19
670d19
* Wed Jan 23 2008 Ivana Varekova <varekova@redhat.com> 1.0.4-13
670d19
- rebuild
670d19
670d19
* Mon May 21 2007 Ivana Varekova <varekova@redhat.com> 1.0.4-12
670d19
- fix *.so,*.a directory
670d19
670d19
* Mon May 21 2007 Ivana Varekova <varekova@redhat.com> 1.0.4-11
670d19
- remove libbz2.* from /usr/lib* to /lib*
670d19
670d19
* Wed Apr  4 2007 Ivana Varekova <varekova@redhat.com> 1.0.4-10
670d19
- change libz.a permissions
670d19
670d19
* Wed Apr  4 2007 Ivana Varekova <varekova@redhat.com> 1.0.4-9
670d19
- remove useless -p 
670d19
670d19
* Thu Mar 15 2007 Ivana Varekova <varekova@redhat.com> 1.0.4-8
670d19
- remove unnecessary "/" after RPM_BUILD_ROOT macro
670d19
670d19
* Mon Feb 19 2007 Jesse Keating <jkeating@redhat.com> 1.0.4-7
670d19
- Temporarily add static lib back in for rpm
670d19
670d19
* Fri Feb 16 2007 Ivana Varekova <varekova@redhat.com> 1.0.4-6
670d19
- incorporate the next review feedback
670d19
670d19
* Thu Feb 15 2007 Ivana Varekova <varekova@redhat.com> 1.0.4-5
670d19
- incorporate package review feedback
670d19
670d19
* Tue Feb  6 2007 Ivana Varekova <varekova@redhat.com> 1.0.4-4
670d19
- fix bzip2recover patch
670d19
670d19
* Mon Feb  5 2007 Ivana Varekova <varekova@redhat.com> 1.0.4-3
670d19
- Resolves: 226979 
670d19
  Buffer overflow in bzip2's bzip2recover
670d19
670d19
* Mon Jan  8 2007 Ivana Varekova <varekova@redhat.com> 1.0.4-1
670d19
- update to 1.0.4
670d19
- spec file cleanup
670d19
670d19
* Mon Jul 17 2006 Ivana Varekova <varekova@redhat.com> 1.0.3-3
670d19
- add cflags (#198926)
670d19
670d19
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1.0.3-2.2.2
670d19
- rebuild
670d19
670d19
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 1.0.3-2.2.1
670d19
- bump again for double-long bug on ppc(64)
670d19
670d19
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 1.0.3-2.2
670d19
- rebuilt for new gcc4.1 snapshot and glibc changes
670d19
670d19
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
670d19
- rebuilt
670d19
670d19
* Fri Nov 25 2005 Ivana Varekova <varekova@redhat.com> 1.0.3-2
670d19
- fix bug 174172 - CAN-2005-0758 bzgrep has security issue in sed usage
670d19
670d19
* Mon Aug 29 2005 Ivana Varekova <varekova@redhat.com> 1.0.3-1
670d19
- 1.0.3
670d19
- add NULL-ptr-check patch 
670d19
  (patch author: Mihai Limbasan 
670d19
670d19
* Thu May 19 2005 Jiri Ryska <jryska@redhat.com>
670d19
- fixed permission setting for decompressed files #155742
670d19
- fixed decompression bomb (DoS) #157548
670d19
670d19
* Fri Mar 04 2005 Jiri Ryska <jryska@redhat.com>
670d19
- rebuilt
670d19
670d19
* Thu Dec 09 2004 Jiri Ryska <jryska@redhat.com>
670d19
- changed temp file creation in bzdiff #92444
670d19
670d19
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
670d19
- rebuilt
670d19
670d19
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com>
670d19
- rebuilt
670d19
670d19
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
670d19
- rebuilt
670d19
670d19
* Tue Jun 17 2003 Jeff Johnson <jbj@redhat.com> 1.0.2-11
670d19
- rebuilt because of crt breakage on ppc64.
670d19
670d19
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
670d19
- rebuilt
670d19
670d19
* Mon Mar 31 2003 Jeff Johnson <jbj@redhat.com> 1.0.2-9
670d19
- rebuild to get rid of undefined __ctype_b in libbz2.a.
670d19
670d19
* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
670d19
- rebuilt
670d19
670d19
* Thu Nov 21 2002 Elliot Lee <sopwith@redhat.com>
670d19
- Pass __cc/__ar/__ranlib to makefiles
670d19
- Use _smp_mflags
670d19
670d19
* Tue Nov 19 2002 Tim Powers <timp@redhat.com>
670d19
- rebuild on all arches
670d19
- fix %%doc file list
670d19
670d19
* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
670d19
- automated rebuild
670d19
670d19
* Thu May 23 2002 Tim Powers <timp@redhat.com>
670d19
- automated rebuild
670d19
670d19
* Thu Apr 25 2002 Trond Eivind Glomsrød <teg@redhat.com> 1.0.2-3
670d19
- Rebuild in new environment
670d19
670d19
* Thu Feb 21 2002 Trond Eivind Glomsrød <teg@redhat.com> 1.0.2-2
670d19
- Rebuild
670d19
670d19
* Wed Jan 30 2002 Trond Eivind Glomsrød <teg@redhat.com> 1.0.2-1
670d19
- 1.0.2
670d19
- Total overhaul of build precedure
670d19
- Add many small helper programs added to 1.0.2
670d19
- drop old patches
670d19
670d19
* Wed Jan 09 2002 Tim Powers <timp@redhat.com>
670d19
- automated rebuild
670d19
670d19
* Mon Nov 26 2001 Trond Eivind Glomsrød <teg@redhat.com> 1.0.1-5
670d19
- Don't segfault when infile is a directory and "-f" is used (#56623)
670d19
- Automake is evil. Add workaround
670d19
670d19
* Fri Mar 30 2001 Trond Eivind Glomsrød <teg@redhat.com>
670d19
- use "License" instead of "Copyright"
670d19
- split out libs
670d19
670d19
* Fri Jul 21 2000 Trond Eivind Glomsrød <teg@redhat.com>
670d19
- new URL and source location
670d19
670d19
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
670d19
- automatic rebuild
670d19
670d19
* Sat Jul 01 2000 Trond Eivind Glomsrød <teg@redhat.com>
670d19
- 1.0.1
670d19
- ported my patch
670d19
670d19
* Tue Jun 13 2000 Jeff Johnson <jbj@redhat.com>
670d19
- FHS packaging to build on solaris2.5.1.
670d19
- remove config.cache from autoconf patch.
670d19
- sparc: use %%configure, but not the m4 macros.
670d19
670d19
* Tue Jun 06 2000 Trond Eivind Glomsrød <teg@redhat.com>
670d19
- Use %%configure, %%makeinstall, %%{_manpath} and %%{_tmpdir}
670d19
670d19
* Wed May 17 2000 Trond Eivind Glomsrød <teg@redhat.com>
670d19
- 1.0.0 - ported my 1.0pre8 libtoolizedautoconf patch
670d19
670d19
* Tue May 16 2000 Trond Eivind Glomsrød <teg@redhat.com>
670d19
- use soft links, not hardlinks, for binaries
670d19
- mv .so to devel
670d19
670d19
* Mon May 15 2000 Trond Eivind Glomsrød <teg@redhat.com>
670d19
- autoconfed and libtoolized package 
670d19
- fixed Copyright (it's BSD, not GPL)
670d19
- dumped bzless (less works fine with bz2-files)
670d19
- rewrote build and install parts
670d19
- separated main package and devel package
670d19
670d19
* Mon May  8 2000 Bernhard Rosenkränzer <bero@redhat.com>
670d19
- 1.0pre8
670d19
670d19
* Fri Apr 14 2000 Bernhard Rosenkränzer <bero@redhat.com>
670d19
- Add bzgrep (a version of zgrep hacked to do bzip2)
670d19
670d19
* Mon Feb  7 2000 Bill Nottingham <notting@redhat.com>
670d19
- handle compressed manpages
670d19
670d19
* Fri Dec 31 1999 Bernhard Rosenkränzer <bero@redhat.com>
670d19
- 0.9.5d
670d19
- Update download URL, add URL: tag in header
670d19
670d19
* Tue Aug 10 1999 Jeff Johnson <jbj@redhat.com>
670d19
- upgrade to 0.9.5c.
670d19
670d19
* Mon Aug  9 1999 Bill Nottingham <notting@redhat.com>
670d19
- install actual bzip2 binary, not libtool cruft.
670d19
670d19
* Sun Aug  8 1999 Jeff Johnson <jbj@redhat.com>
670d19
- run ldconfig to get shared library.
670d19
670d19
* Mon Aug  2 1999 Jeff Johnson <jbj@redhat.com>
670d19
- create shared libbz1.so.* library.
670d19
670d19
* Sun Apr  4 1999 Jeff Johnson <jbj@redhat.com>
670d19
- update to bzip2-0.9.0c.
670d19
670d19
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> 
670d19
- auto rebuild in the new build environment (release 4)
670d19
670d19
* Thu Dec 17 1998 Cristian Gafton <gafton@redhat.com>
670d19
- build against glibc 2.1
670d19
670d19
* Wed Sep 30 1998 Cristian Gafton <gafton@redhat.com>
670d19
- force compilation with egcs to avoid gcc optimization bug (thank God 
670d19
  we haven't been beaten by it)
670d19
670d19
* Wed Sep 09 1998 Cristian Gafton <gafton@redhat.com>
670d19
- version 0.9.0b
670d19
670d19
* Tue Sep 08 1998 Cristian Gafton <gafton@redhat.com>
670d19
- updated to 0.9.0
670d19
670d19
* Thu Apr 09 1998 Cristian Gafton <gafton@redhat.com>
670d19
- first build for Manhattan