- .spec file cleanup

This commit is contained in:
Peter Schiffer 2012-10-26 13:27:27 +02:00
parent 7b25abf1dd
commit de5c2d5839

View File

@ -1,30 +1,32 @@
%define library_version 1.0.6 %global library_version 1.0.6
Summary: A file compression utility Summary: A file compression utility
Name: bzip2 Name: bzip2
Version: 1.0.6 Version: 1.0.6
Release: 5%{?dist} Release: 6%{?dist}
License: BSD License: BSD
Group: Applications/File Group: Applications/File
URL: http://www.bzip.org/ URL: http://www.bzip.org/
Source: http://www.bzip.org/%{version}/bzip2-%{version}.tar.gz Source: http://www.bzip.org/%{version}/%{name}-%{version}.tar.gz
Patch0: bzip2-1.0.4-saneso.patch Patch0: bzip2-1.0.4-saneso.patch
Patch5: bzip2-1.0.4-cflags.patch Patch1: bzip2-1.0.4-cflags.patch
Patch6: bzip2-1.0.4-bzip2recover.patch # resolves: #226979
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Patch2: bzip2-1.0.4-bzip2recover.patch
%description %description
Bzip2 is a freely available, patent-free, high quality data compressor. Bzip2 is a freely available, patent-free, high quality data compressor.
Bzip2 compresses files to within 10 to 15 percent of the capabilities Bzip2 compresses files to within 10 to 15 percent of the capabilities
of the best techniques available. However, bzip2 has the added benefit of the best techniques available. However, bzip2 has the added benefit
of being approximately two times faster at compression and six times of being approximately two times faster at compression and six times
faster at decompression than those techniques. Bzip2 is not the faster at decompression than those techniques. Bzip2 is not the
fastest compression utility, but it does strike a balance between speed fastest compression utility, but it does strike a balance between speed
and compression capability. and compression capability.
Install bzip2 if you need a compression utility. Install bzip2 if you need a compression utility.
%package devel %package devel
Summary: Header files developing apps which will use bzip2 Summary: Libraries and header files for apps which will use bzip2
Group: Development/Libraries Group: Development/Libraries
Requires: bzip2-libs = %{version}-%{release} Requires: bzip2-libs = %{version}-%{release}
@ -42,25 +44,22 @@ Group: System Environment/Libraries
Libraries for applications using the bzip2 compression format. Libraries for applications using the bzip2 compression format.
%prep %prep
%setup -q %setup -q
%patch0 -p1 -b .saneso %patch0 -p1 -b .saneso
%patch5 -p1 -b .cflags %patch1 -p1 -b .cflags
%patch6 -p1 -b .bz2recover %patch2 -p1 -b .bz2recover
%build %build
make -f Makefile-libbz2_so CC="%{__cc}" AR="%{__ar}" RANLIB="%{__ranlib}" \ make -f Makefile-libbz2_so CC="%{__cc}" AR="%{__ar}" RANLIB="%{__ranlib}" \
CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64 -fpic -fPIC" \ CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64 -fpic -fPIC" \
%{?_smp_mflags} all %{?_smp_mflags} all
rm -f *.o rm -f *.o
make CC="%{__cc}" AR="%{__ar}" RANLIB="%{__ranlib}" \ make CC="%{__cc}" AR="%{__ar}" RANLIB="%{__ranlib}" \
CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64" \ CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64" \
%{?_smp_mflags} all %{?_smp_mflags} all
%install %install
rm -rf ${RPM_BUILD_ROOT}
chmod 644 bzlib.h chmod 644 bzlib.h
mkdir -p $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,/%{_lib},%{_libdir},%{_includedir}} mkdir -p $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,/%{_lib},%{_libdir},%{_includedir}}
cp -p bzlib.h $RPM_BUILD_ROOT%{_includedir} cp -p bzlib.h $RPM_BUILD_ROOT%{_includedir}
@ -80,32 +79,28 @@ ln -s bzip2.1 $RPM_BUILD_ROOT%{_mandir}/man1/bzcat.1
ln -s bzdiff.1 $RPM_BUILD_ROOT%{_mandir}/man1/bzcmp.1 ln -s bzdiff.1 $RPM_BUILD_ROOT%{_mandir}/man1/bzcmp.1
ln -s bzmore.1 $RPM_BUILD_ROOT%{_mandir}/man1/bzless.1 ln -s bzmore.1 $RPM_BUILD_ROOT%{_mandir}/man1/bzless.1
%post libs -p /sbin/ldconfig %post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig %postun libs -p /sbin/ldconfig
%clean
rm -rf ${RPM_BUILD_ROOT}
%files %files
%defattr(-,root,root,-) %doc LICENSE CHANGES README
%doc LICENSE CHANGES README
%{_bindir}/* %{_bindir}/*
%{_mandir}/*/* %{_mandir}/*/*
%files libs %files libs
%defattr(-,root,root,-)
%doc LICENSE %doc LICENSE
/%{_lib}/*so.* /%{_lib}/*so.*
%files devel %files devel
%defattr(-,root,root,-)
%doc manual.html manual.pdf %doc manual.html manual.pdf
%{_includedir}/* %{_includedir}/*
/%{_libdir}/*so /%{_libdir}/*so
%changelog %changelog
* Fri Oct 26 2012 Peter Schiffer <pschiffe@redhat.com> - 1.0.6-6
- .spec file cleanup
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.6-5 * Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.6-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild