]> git.pld-linux.org Git - packages/bzip2.git/blobdiff - bzip2.spec
- rediffed
[packages/bzip2.git] / bzip2.spec
index 39043f7f68edabccc3893df3efae7826e9584973..d99966527cf2c995e588dc6976c7901717214bb0 100644 (file)
@@ -1,8 +1,8 @@
-# 
+#
 # Conditional build:
 %bcond_with    progress        # with progressbar patch
-%bcond_without static_libs     # don't build static libraries
-#
+%bcond_without static_libs     # static libraries
+
 Summary:       Extremely powerful file compression utility
 Summary(es.UTF-8):     Un compresor de archivos con un nuevo algoritmo
 Summary(fr.UTF-8):     Utilitaire de compression de fichier extrêmement puissant
@@ -11,28 +11,28 @@ Summary(pt_BR.UTF-8):       Compactador de arquivo extremamente poderoso
 Summary(uk.UTF-8):     Компресор файлів на базі алгоритму блочного сортування
 Summary(ru.UTF-8):     Компрессор файлов на основе алгоритма блочной сортировки
 Name:          bzip2
-Version:       1.0.5
-Release:       3
-Epoch:         0
+Version:       1.0.8
+Release:       1
 License:       BSD-like
 Group:         Applications/Archiving
-Source0:       http://www.bzip.org/%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 3c15a0c8d1d3ee1c46a1634d00617b1a
+Source0:       https://sourceware.org/pub/bzip2/%{name}-%{version}.tar.gz
+# Source0-md5: 67e051268d0c475ea773822f7500d0e5
 Source1:       http://qboosh.pl/man/%{name}-man-pages.tar.bz2
 # Source1-md5: 14a68bf85666428000aad7cb0785a6e5
+Source2:       %{name}.pc
 Patch0:                %{name}-libtoolizeautoconf.patch
-Patch1:                %{name}-bzgrep.patch
+
 # Modified from http://www.vanheusden.com/Linux/bzip2-1.0.2.diff.gz
 Patch2:                %{name}-progress-counter-1.0.2.patch
-URL:           http://www.bzip.org/
+URL:           https://sourceware.org/bzip2/
 BuildRequires: autoconf >= 2.50
 BuildRequires: automake >= 1:1.6
 BuildRequires: libtool
 BuildRequires: rpmbuild(macros) >= 1.213
-Requires:      %{name}-libs = %{epoch}:%{version}-%{release}
+Requires:      %{name}-libs = %{version}-%{release}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                specflags_ia32  -fomit-frame-pointer -D_FILE_OFFSET_BITS=64
+%define                specflags_ia32  -fomit-frame-pointer
 
 %description
 Bzip2 compresses files using the Burrows-Wheeler block-sorting text
@@ -115,7 +115,7 @@ Summary(pt_BR.UTF-8):       Arquivos de inclusão para o bzip2
 Summary(uk.UTF-8):     Хедери, необхідні для програмування з libbz2
 Summary(ru.UTF-8):     Хедеры, необходимые для программирования с libbz2
 Group:         Development/Libraries
-Requires:      %{name}-libs = %{epoch}:%{version}-%{release}
+Requires:      %{name}-libs = %{version}-%{release}
 Obsoletes:     libbzip2-devel
 
 %description devel
@@ -144,7 +144,7 @@ Summary(pt_BR.UTF-8):       Bibliotecas estáticas para desenvolvimento com a bzip2
 Summary(ru.UTF-8):     Статические библиотеки bzip2
 Summary(uk.UTF-8):     Статичні бібліотеки bzip2
 Group:         Development/Libraries
-Requires:      %{name}-devel = %{epoch}:%{version}-%{release}
+Requires:      %{name}-devel = %{version}-%{release}
 
 %description static
 Static libbz2 library.
@@ -167,7 +167,7 @@ Bibliotecas estáticas para desenvolvimento com a bzip2.
 %prep
 %setup -q
 %patch0 -p1
-%patch1 -p1
+
 %{?with_progress:%patch2 -p1}
 
 %build
@@ -177,23 +177,34 @@ Bibliotecas estáticas para desenvolvimento com a bzip2.
 %{__autoheader}
 %{__automake}
 %configure \
+       CFLAGS="%{rpmcflags} -D_FILE_OFFSET_BITS=64" \
        %{!?with_static_libs:--disable-static}
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/%{_lib}
+install -d $RPM_BUILD_ROOT{/%{_lib},/etc/env.d,%{_pkgconfigdir}}
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
-mv -f $RPM_BUILD_ROOT%{_libdir}/libbz2.so.* $RPM_BUILD_ROOT/%{_lib}
+%{__sed} -e '
+       s|^libdir=.*|libdir=%{_libdir}|
+       s|^Version:.*|Version: %{version}|
+' %{SOURCE2} > $RPM_BUILD_ROOT%{_pkgconfigdir}/bzip2.pc
+
+%{__mv} $RPM_BUILD_ROOT%{_libdir}/libbz2.so.* $RPM_BUILD_ROOT/%{_lib}
 ln -sf /%{_lib}/libbz2.so.1.0.0 $RPM_BUILD_ROOT%{_libdir}/libbz2.so
 
+# TODO: move this to install-*-hook so the patch could be upstreamed eventually
 # standard soname was libbz2.so.1.0, libtoolizeautoconf patch broke it,
 # but ABI has not changed - provide symlink for binary compatibility
 ln -sf libbz2.so.1.0.0 $RPM_BUILD_ROOT/%{_lib}/libbz2.so.1.0
 
+cat << EOF >$RPM_BUILD_ROOT/etc/env.d/BZIP2
+#BZIP2="-5"
+EOF
+
 bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
 
 %clean
@@ -205,6 +216,7 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %doc CHANGES LICENSE README manual.html
+%config(noreplace,missingok) %verify(not md5 mtime size) /etc/env.d/BZIP2
 %attr(755,root,root) %{_bindir}/bunzip2
 %attr(755,root,root) %{_bindir}/bzcat
 %attr(755,root,root) %{_bindir}/bzcmp
@@ -250,6 +262,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/libbz2.la
 %{_includedir}/bzlib.h
 %{_includedir}/bzlib_private.h
+%{_pkgconfigdir}/bzip2.pc
 
 %if %{with static_libs}
 %files static
This page took 0.048106 seconds and 4 git commands to generate.