]> git.pld-linux.org Git - packages/bzip2.git/blobdiff - bzip2.spec
- rediffed
[packages/bzip2.git] / bzip2.spec
index 4bad1fadfee5ab0db2f9c216b6f3133c338c3fd7..d99966527cf2c995e588dc6976c7901717214bb0 100644 (file)
@@ -1,8 +1,8 @@
-# 
+#
 # Conditional build:
 %bcond_with    progress        # with progressbar patch
-%bcond_without doc             # don't build tex documentation
-#
+%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,26 +11,25 @@ Summary(pt_BR.UTF-8):       Compactador de arquivo extremamente poderoso
 Summary(uk.UTF-8):     Компресор файлів на базі алгоритму блочного сортування
 Summary(ru.UTF-8):     Компрессор файлов на основе алгоритма блочной сортировки
 Name:          bzip2
-Version:       1.0.4
+Version:       1.0.8
 Release:       1
-Epoch:         0
 License:       BSD-like
 Group:         Applications/Archiving
-Source0:       http://www.bzip.org/%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: fc310b254f6ba5fbb5da018f04533688
-Source1:       http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
-# Source1-md5: 5ffc3dbdd40080a8c22c3b4c3143cdd7
+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/
-BuildRequires: autoconf
-BuildRequires: automake
+URL:           https://sourceware.org/bzip2/
+BuildRequires: autoconf >= 2.50
+BuildRequires: automake >= 1:1.6
 BuildRequires: libtool
 BuildRequires: rpmbuild(macros) >= 1.213
-%{?with_doc:BuildRequires:     tetex}
-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
@@ -116,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
@@ -145,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.
@@ -168,45 +167,44 @@ Bibliotecas estáticas para desenvolvimento com a bzip2.
 %prep
 %setup -q
 %patch0 -p1
-%patch1 -p1
+
 %{?with_progress:%patch2 -p1}
 
 %build
-%{__aclocal}
 %{__libtoolize}
-%{__automake}
+%{__aclocal}
 %{__autoconf}
+%{__autoheader}
+%{__automake}
 %configure \
-       CFLAGS="%{rpmcflags} -D_FILE_OFFSET_BITS=64"
+       CFLAGS="%{rpmcflags} -D_FILE_OFFSET_BITS=64" \
+       %{!?with_static_libs:--disable-static}
 %{__make}
 
-%if %{with doc}
-cd doc
-/usr/bin/texi2html bzip2.texi
-cd ..
-%endif
-
 %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
 
-# Substitute %{_bindir} in bzless.
-mv -f $RPM_BUILD_ROOT%{_bindir}/bzless{,.tmp}
-sed -e "s@%%{_bindir}@%{_bindir}@g" \
-       $RPM_BUILD_ROOT%{_bindir}/bzless.tmp > \
-       $RPM_BUILD_ROOT%{_bindir}/bzless
-rm -f $RPM_BUILD_ROOT%{_bindir}/bzless.tmp
+%{__sed} -e '
+       s|^libdir=.*|libdir=%{_libdir}|
+       s|^Version:.*|Version: %{version}|
+' %{SOURCE2} > $RPM_BUILD_ROOT%{_pkgconfigdir}/bzip2.pc
 
-mv -f $RPM_BUILD_ROOT%{_libdir}/libbz2.so.* $RPM_BUILD_ROOT/%{_lib}
-ln -sf /%{_lib}/libbz2.so.1.0.0 $RPM_BUILD_ROOT/%{_libdir}/libbz2.so
+%{__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
@@ -217,27 +215,57 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc CHANGES LICENSE README* %{?with_doc:doc/*.html}
-%attr(755,root,root) %{_bindir}/*
-%{_mandir}/man1/*
+%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
+%attr(755,root,root) %{_bindir}/bzdiff
+%attr(755,root,root) %{_bindir}/bzegrep
+%attr(755,root,root) %{_bindir}/bzfgrep
+%attr(755,root,root) %{_bindir}/bzgrep
+%attr(755,root,root) %{_bindir}/bzip2
+%attr(755,root,root) %{_bindir}/bzip2recover
+%attr(755,root,root) %{_bindir}/bzless
+%attr(755,root,root) %{_bindir}/bzmore
+%{_mandir}/man1/bunzip2.1*
+%{_mandir}/man1/bzcat.1*
+%{_mandir}/man1/bzcmp.1*
+%{_mandir}/man1/bzdiff.1*
+%{_mandir}/man1/bzegrep.1*
+%{_mandir}/man1/bzfgrep.1*
+%{_mandir}/man1/bzgrep.1*
+%{_mandir}/man1/bzless.1*
+%{_mandir}/man1/bzmore.1*
+%{_mandir}/man1/bzip2.1*
+%{_mandir}/man1/bzip2recover.1*
+%lang(cs) %{_mandir}/cs/man1/*
 %lang(es) %{_mandir}/es/man1/*
 %lang(fr) %{_mandir}/fr/man1/*
 %lang(hu) %{_mandir}/hu/man1/*
+%lang(it) %{_mandir}/it/man1/*
 %lang(ja) %{_mandir}/ja/man1/*
 %lang(ko) %{_mandir}/ko/man1/*
 %lang(pl) %{_mandir}/pl/man1/*
+%lang(tr) %{_mandir}/tr/man1/*
+%lang(zh_CN) %{_mandir}/zh_CN/man1/*
 
 %files libs
 %defattr(644,root,root,755)
-%attr(755,root,root) /%{_lib}/lib*.so.*.*.*
-%attr(755,root,root) /%{_lib}/lib*.so.1.0
+%attr(755,root,root) /%{_lib}/libbz2.so.*.*.*
+%attr(755,root,root) /%{_lib}/libbz2.so.1.0
+%attr(755,root,root) %ghost /%{_lib}/libbz2.so.1
 
 %files devel
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/lib*.so
-%{_libdir}/lib*.la
-%{_includedir}/*.h
+%attr(755,root,root) %{_libdir}/libbz2.so
+%{_libdir}/libbz2.la
+%{_includedir}/bzlib.h
+%{_includedir}/bzlib_private.h
+%{_pkgconfigdir}/bzip2.pc
 
+%if %{with static_libs}
 %files static
 %defattr(644,root,root,755)
-%{_libdir}/lib*.a
+%{_libdir}/libbz2.a
+%endif
This page took 0.032923 seconds and 4 git commands to generate.