SHA256
1
0
forked from pool/bzip2

Accepting request 26111 from Archiving

Copy from Archiving/bzip2 based on submit request 26111 from user mseben

OBS-URL: https://build.opensuse.org/request/show/26111
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/bzip2?expand=0&rev=19
This commit is contained in:
OBS User autobuild 2009-12-11 11:55:53 +00:00 committed by Git OBS Bridge
parent 6c16f2f3cd
commit d60f6cf2b3
5 changed files with 327 additions and 267 deletions

View File

@ -0,0 +1,286 @@
diff -urN files/autogen.sh ./autogen.sh
--- bzip2-1.0.5.orig/autogen.sh 1970-01-01 01:00:00.000000000 +0100
+++ bzip2-1.0.5.autoconfiscated/autogen.sh 2009-11-06 12:10:43.574602171 +0100
@@ -0,0 +1,8 @@
+mv LICENSE COPYING
+mv CHANGES NEWS
+touch AUTHORS
+touch ChangeLog
+libtoolize --force
+aclocal
+automake --add-missing --gnu
+autoconf
diff -urN bzip2-1.0.5.orig/README.autotools bzip2-1.0.5.autoconfiscated/README.autotools
--- bzip2-1.0.5.orig/README.autotools 1970-01-01 01:00:00.000000000 +0100
+++ bzip2-1.0.5.autoconfiscated/README.autotools 2009-11-05 23:06:27.000000000 +0100
@@ -0,0 +1,39 @@
+bzip2 autoconfiscated
+=====================
+
+Temporarily at http://pack.suse.cz/sbrabec/bzip2/ expecting that it will
+become a new upstream version to prevent per-distribution shared library
+patching done by nearly each Linux vendor separately.
+
+Autoconfiscation brings standard ./configure ; make ; make install
+installation, seamless support of DESTDIR, automatic check for supported
+CFLAGS, standard shared library support, automatic large files CFLAGS
+check and all things that are supported by automake.
+
+It makes obsolete Makefile-libbz2_so and README.COMPILATION.PROBLEMS.
+Now configure should automatically detect correct build flags.
+
+In case of any problem or question with autotools support feel free to
+contact me: Stanislav Brabec <sbrabec@suse.cz>
+
+Autoconfiscated version binaries are exactly equal to
+bzip2-1.0.5.tar.gz. There are only few changes. See below.
+
+
+New features:
+
+Trivial link man pages for bzcat and bunzip2 added.
+
+bzip2.pc file for pkg-config. Packages can use it for checks.
+
+
+Incompatible changes:
+
+soname change. Libtool has no support for two parts name suffix (e. g.
+libbz2.so.1.0). It must be a single number (e. g. libbz2.so.1). That is
+why soname must change. But I see not a big problem with it. Several
+distributions already use the new number instead of the non-standard
+number from Makefile-libbz2_so.
+
+To be super-safe, I incremented minor number of the library file, so
+both instances of the shared library can live together.
diff -urN bzip2-1.0.5.orig/configure.ac bzip2-1.0.5.autoconfiscated/configure.ac
--- bzip2-1.0.5.orig/configure.ac 1970-01-01 01:00:00.000000000 +0100
+++ bzip2-1.0.5.autoconfiscated/configure.ac 2009-11-06 17:04:04.000000000 +0100
@@ -0,0 +1,70 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ([2.57])
+AC_INIT([bzip2], [1.0.5], [Julian Seward <jseward@bzip.org>])
+BZIP2_LT_CURRENT=1
+BZIP2_LT_REVISION=5
+BZIP2_LT_AGE=0
+AC_CONFIG_SRCDIR([bzlib.h])
+AC_CONFIG_MACRO_DIR([m4])
+
+AM_INIT_AUTOMAKE
+AM_MAINTAINER_MODE
+
+# Checks for programs.
+AC_PROG_AWK
+AC_PROG_CC
+AC_PROG_INSTALL
+AC_PROG_LN_S
+AC_PROG_MAKE_SET
+AC_PROG_LIBTOOL
+PKG_PROG_PKG_CONFIG
+
+# Checks for libraries.
+
+# Checks for header files.
+
+# Checks for typedefs, structures, and compiler characteristics.
+
+# Check for system features.
+AC_SYS_LARGEFILE
+
+AC_MSG_CHECKING([whether compiler understands -Wall])
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Wall"
+AC_TRY_COMPILE([], [], [
+ AC_MSG_RESULT([yes])
+], [
+ AC_MSG_RESULT([no])
+ CFLAGS="$save_CFLAGS"
+])
+
+AC_MSG_CHECKING([whether compiler understands -Winline])
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Winline"
+AC_TRY_COMPILE([], [], [
+ AC_MSG_RESULT([yes])
+], [
+ AC_MSG_RESULT([no])
+ CFLAGS="$save_CFLAGS"
+])
+
+AC_MSG_CHECKING([whether compiler understands -fno-strength-reduce])
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -fno-strength-reduce"
+AC_TRY_COMPILE([], [], [
+ AC_MSG_RESULT([yes])
+], [
+ AC_MSG_RESULT([no])
+ CFLAGS="$save_CFLAGS"
+])
+
+# Checks for library functions.
+
+# Write the output.
+AC_SUBST([BZIP2_LT_CURRENT])
+AC_SUBST([BZIP2_LT_REVISION])
+AC_SUBST([BZIP2_LT_AGE])
+AC_CONFIG_FILES([Makefile bzip2.pc])
+AC_OUTPUT
diff -urN bzip2-1.0.5.orig/Makefile.am bzip2-1.0.5.autoconfiscated/Makefile.am
--- bzip2-1.0.5.orig/Makefile.am 1970-01-01 01:00:00.000000000 +0100
+++ bzip2-1.0.5.autoconfiscated/Makefile.am 2009-11-05 16:45:11.000000000 +0100
@@ -0,0 +1,138 @@
+lib_LTLIBRARIES = libbz2.la
+
+libbz2_la_SOURCES = \
+ blocksort.c \
+ huffman.c \
+ crctable.c \
+ randtable.c \
+ compress.c \
+ decompress.c \
+ bzlib.c
+
+libbz2_la_LDFLAGS = \
+ -version-info $(BZIP2_LT_CURRENT):$(BZIP2_LT_REVISION):$(BZIP2_LT_AGE) \
+ -no-undefined
+
+include_HEADERS = bzlib.h
+
+noinst_HEADERS = bzlib_private.h
+
+bin_PROGRAMS = bzip2 bzip2recover
+
+bzip2_SOURCES = bzip2.c
+bzip2_LDADD = libbz2.la
+
+bzip2recover_SOURCES = bzip2recover.c
+bzip2recover_LDADD = libbz2.la
+
+bin_SCRIPTS = bzgrep bzmore bzdiff
+
+man_MANS = bzip2.1 bzgrep.1 bzmore.1 bzdiff.1
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = bzip2.pc
+
+$(pkgconfig_DATA): $(srcdir)/bzip2.pc.in config.status
+
+install-exec-hook:
+ rm -f $(DESTDIR)$(bindir)/`echo "bunzip2" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ rm -f $(DESTDIR)$(bindir)/`echo "bzcat" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ rm -f $(DESTDIR)$(bindir)/`echo "bzegrep" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ rm -f $(DESTDIR)$(bindir)/`echo "bzfgrep" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ rm -f $(DESTDIR)$(bindir)/`echo "bzless" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ rm -f $(DESTDIR)$(bindir)/`echo "bzcmp" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ $(LN_S) `echo "bzip2" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` $(DESTDIR)$(bindir)/`echo "bunzip2" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ $(LN_S) `echo "bzip2" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` $(DESTDIR)$(bindir)/`echo "bzcat" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ $(LN_S) `echo "bzgrep" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` $(DESTDIR)$(bindir)/`echo "bzegrep" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ $(LN_S) `echo "bzgrep" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` $(DESTDIR)$(bindir)/`echo "bzfgrep" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ $(LN_S) `echo "bzmore" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` $(DESTDIR)$(bindir)/`echo "bzless" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ $(LN_S) `echo "bzdiff" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` $(DESTDIR)$(bindir)/`echo "bzcmp" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+
+install-data-hook:
+ echo ".so man1/`echo "bzip2" | sed 's,^.*/,,;$(transform)'`.1" >$(DESTDIR)$(mandir)/man1/`echo "bunzip2" | sed 's,^.*/,,;$(transform)'`.1
+ echo ".so man1/`echo "bzip2" | sed 's,^.*/,,;$(transform)'`.1" >$(DESTDIR)$(mandir)/man1/`echo "bzcat" | sed 's,^.*/,,;$(transform)'`.1
+ echo ".so man1/`echo "bzgrep" | sed 's,^.*/,,;$(transform)'`.1" >$(DESTDIR)$(mandir)/man1/`echo "bzegrep" | sed 's,^.*/,,;$(transform)'`.1
+ echo ".so man1/`echo "bzgrep" | sed 's,^.*/,,;$(transform)'`.1" >$(DESTDIR)$(mandir)/man1/`echo "bzfgrep" | sed 's,^.*/,,;$(transform)'`.1
+ echo ".so man1/`echo "bzmore" | sed 's,^.*/,,;$(transform)'`.1" >$(DESTDIR)$(mandir)/man1/`echo "bzless" | sed 's,^.*/,,;$(transform)'`.1
+ echo ".so man1/`echo "bzdiff" | sed 's,^.*/,,;$(transform)'`.1" >$(DESTDIR)$(mandir)/man1/`echo "bzcmp" | sed 's,^.*/,,;$(transform)'`.1
+
+uninstall-hook:
+ rm -f $(DESTDIR)$(bindir)/`echo "bunzip2" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ rm -f $(DESTDIR)$(bindir)/`echo "bzcat" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ rm -f $(DESTDIR)$(bindir)/`echo "bzegrep" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ rm -f $(DESTDIR)$(bindir)/`echo "bzfgrep" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ rm -f $(DESTDIR)$(bindir)/`echo "bzless" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ rm -f $(DESTDIR)$(bindir)/`echo "bzcmp" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
+ rm -f $(DESTDIR)$(mandir)/man1/`echo "bunzip2" | sed 's,^.*/,,;$(transform)'`.1
+ rm -f $(DESTDIR)$(mandir)/man1/`echo "bzcat" | sed 's,^.*/,,;$(transform)'`.1
+ rm -f $(DESTDIR)$(mandir)/man1/`echo "bzegrep" | sed 's,^.*/,,;$(transform)'`.1
+ rm -f $(DESTDIR)$(mandir)/man1/`echo "bzfgrep" | sed 's,^.*/,,;$(transform)'`.1
+ rm -f $(DESTDIR)$(mandir)/man1/`echo "bzless" | sed 's,^.*/,,;$(transform)'`.1
+ rm -f $(DESTDIR)$(mandir)/man1/`echo "bzcmp" | sed 's,^.*/,,;$(transform)'`.1
+
+test: bzip2
+ @cat $(srcdir)/words1
+ ./bzip2 -1 <$(srcdir)/sample1.ref >sample1.rb2
+ ./bzip2 -2 <$(srcdir)/sample2.ref >sample2.rb2
+ ./bzip2 -3 <$(srcdir)/sample3.ref >sample3.rb2
+ ./bzip2 -d <$(srcdir)/sample1.bz2 >sample1.tst
+ ./bzip2 -d <$(srcdir)/sample2.bz2 >sample2.tst
+ ./bzip2 -ds <$(srcdir)/sample3.bz2 >sample3.tst
+ cmp $(srcdir)/sample1.bz2 sample1.rb2
+ cmp $(srcdir)/sample2.bz2 sample2.rb2
+ cmp $(srcdir)/sample3.bz2 sample3.rb2
+ cmp sample1.tst $(srcdir)/sample1.ref
+ cmp sample2.tst $(srcdir)/sample2.ref
+ cmp sample3.tst $(srcdir)/sample3.ref
+ @cat $(srcdir)/words3
+
+manual: $(srcdir)/manual.html $(srcdir)/manual.ps $(srcdir)/manual.pdf
+
+manual.ps: $(MANUAL_SRCS)
+ cd $(srcdir); ./xmlproc.sh -ps manual.xml
+
+manual.pdf: $(MANUAL_SRCS)
+ cd $(srcdir); ./xmlproc.sh -pdf manual.xml
+
+manual.html: $(MANUAL_SRCS)
+ cd $(srcdir); ./xmlproc.sh -html manual.xml
+
+EXTRA_DIST = \
+ $(bin_SCRIPTS) \
+ $(man_MANS) \
+ README.autotools \
+ README.XML.STUFF \
+ bz-common.xsl \
+ bz-fo.xsl \
+ bz-html.xsl \
+ bzip.css \
+ bzip2.1.preformatted \
+ bzip2.pc.in \
+ bzip2.txt \
+ dlltest.c \
+ dlltest.dsp \
+ entities.xml \
+ format.pl \
+ libbz2.def \
+ libbz2.dsp \
+ makefile.msc \
+ manual.html \
+ manual.pdf \
+ manual.ps \
+ manual.xml \
+ mk251.c \
+ sample1.bz2 \
+ sample1.ref \
+ sample2.bz2 \
+ sample2.ref \
+ sample3.bz2 \
+ sample3.ref \
+ spewG.c \
+ unzcrash.c \
+ words0 \
+ words1 \
+ words2 \
+ words3 \
+ xmlproc.sh
+
+ACLOCAL_AMFLAGS = -I m4
diff -urN bzip2-1.0.5.orig/bzip2.pc.in bzip2-1.0.5.autoconfiscated/bzip2.pc.in
--- bzip2-1.0.5.orig/bzip2.pc.in 1970-01-01 01:00:00.000000000 +0100
+++ bzip2-1.0.5.autoconfiscated/bzip2.pc.in 2009-11-03 18:48:28.000000000 +0100
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+bindir=@bindir@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: bzip2
+Description: Lossless, block-sorting data compression
+Version: @VERSION@
+Libs: -L${libdir} -lbz2
+Cflags: -I${includedir}

View File

@ -1,11 +0,0 @@
--- Makefile-libbz2_so
+++ Makefile-libbz2_so
@@ -35,7 +35,7 @@
bzlib.o
all: $(OBJS)
- $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.4 $(OBJS)
+ $(CC) $(CFLAGS) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.4 $(OBJS)
$(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.4
rm -f libbz2.so.1.0
ln -s libbz2.so.1.0.4 libbz2.so.1.0

View File

@ -1,98 +0,0 @@
--- Makefile
+++ Makefile
@@ -24,8 +24,9 @@
CFLAGS=-Wall -Winline -O2 -g $(BIGFILES)
# Where you want it installed when you do 'make install'
-PREFIX=/usr/local
-
+PREFIX=/usr
+MANDIR=$(PREFIX)/man
+LIBDIR=$(PREFIX)/lib
OBJS= blocksort.o \
huffman.o \
@@ -35,10 +36,10 @@
decompress.o \
bzlib.o
-all: libbz2.a bzip2 bzip2recover test
+all: libbz2.a libbz2.so bzip2 bzip2recover test
-bzip2: libbz2.a bzip2.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o bzip2 bzip2.o -L. -lbz2
+bzip2: libbz2.a libbz2.so bzip2.o
+ $(CC) $(CFLAGS) $(LDFLAGS) -o bzip2 bzip2.o libbz2.so
bzip2recover: bzip2recover.o
$(CC) $(CFLAGS) $(LDFLAGS) -o bzip2recover bzip2recover.o
@@ -52,6 +53,10 @@
$(RANLIB) libbz2.a ; \
fi
+libbz2.so: $(OBJS)
+ rm -f libbz2.so*
+ $(CC) $(CFLAGS) $(LDFLAGS) -shared -o libbz2.so -Wl,-soname,libbz2.so.1 $(OBJS)
+
check: test
test: bzip2
@cat words1
@@ -71,45 +76,29 @@
install: bzip2 bzip2recover
if ( test ! -d $(PREFIX)/bin ) ; then mkdir -p $(PREFIX)/bin ; fi
- if ( test ! -d $(PREFIX)/lib ) ; then mkdir -p $(PREFIX)/lib ; fi
+ if ( test ! -d $(LIBDIR) ) ; then mkdir -p $(LIBDIR) ; fi
if ( test ! -d $(PREFIX)/man ) ; then mkdir -p $(PREFIX)/man ; fi
- if ( test ! -d $(PREFIX)/man/man1 ) ; then mkdir -p $(PREFIX)/man/man1 ; fi
+ if ( test ! -d $(MANDIR)/man1 ) ; then mkdir -p $(MANDIR)/man1 ; fi
if ( test ! -d $(PREFIX)/include ) ; then mkdir -p $(PREFIX)/include ; fi
cp -f bzip2 $(PREFIX)/bin/bzip2
- cp -f bzip2 $(PREFIX)/bin/bunzip2
- cp -f bzip2 $(PREFIX)/bin/bzcat
+ ln -sf bzip2 $(PREFIX)/bin/bunzip2
+ ln -sf bzip2 $(PREFIX)/bin/bzcat
cp -f bzip2recover $(PREFIX)/bin/bzip2recover
chmod a+x $(PREFIX)/bin/bzip2
- chmod a+x $(PREFIX)/bin/bunzip2
- chmod a+x $(PREFIX)/bin/bzcat
chmod a+x $(PREFIX)/bin/bzip2recover
- cp -f bzip2.1 $(PREFIX)/man/man1
- chmod a+r $(PREFIX)/man/man1/bzip2.1
+ cp -f bzip2.1 $(MANDIR)/man1
+ chmod a+r $(MANDIR)/man1/bzip2.1
cp -f bzlib.h $(PREFIX)/include
chmod a+r $(PREFIX)/include/bzlib.h
- cp -f libbz2.a $(PREFIX)/lib
- chmod a+r $(PREFIX)/lib/libbz2.a
- cp -f bzgrep $(PREFIX)/bin/bzgrep
- ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzegrep
- ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzfgrep
- chmod a+x $(PREFIX)/bin/bzgrep
- cp -f bzmore $(PREFIX)/bin/bzmore
- ln -s -f $(PREFIX)/bin/bzmore $(PREFIX)/bin/bzless
- chmod a+x $(PREFIX)/bin/bzmore
- cp -f bzdiff $(PREFIX)/bin/bzdiff
- ln -s -f $(PREFIX)/bin/bzdiff $(PREFIX)/bin/bzcmp
- chmod a+x $(PREFIX)/bin/bzdiff
- cp -f bzgrep.1 bzmore.1 bzdiff.1 $(PREFIX)/man/man1
- chmod a+r $(PREFIX)/man/man1/bzgrep.1
- chmod a+r $(PREFIX)/man/man1/bzmore.1
- chmod a+r $(PREFIX)/man/man1/bzdiff.1
- echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzegrep.1
- echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzfgrep.1
- echo ".so man1/bzmore.1" > $(PREFIX)/man/man1/bzless.1
- echo ".so man1/bzdiff.1" > $(PREFIX)/man/man1/bzcmp.1
+ cp -f libbz2.a $(LIBDIR)
+ chmod a+r $(LIBDIR)/libbz2.a
+ cp -f libbz2.so $(LIBDIR)
+ chmod a+r $(LIBDIR)/libbz2.so
+ echo ".so man1/bzip2.1" > $(MANDIR)/man1/bunzip2.1
+ echo ".so man1/bzip2.1" > $(MANDIR)/man1/bzcat.1
clean:
- rm -f *.o libbz2.a bzip2 bzip2recover \
+ rm -f *.o libbz2.a libbz2.so bzip2 bzip2recover \
sample1.rb2 sample2.rb2 sample3.rb2 \
sample1.tst sample2.tst sample3.tst

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Nov 24 16:40:35 CET 2009 - sbrabec@suse.cz
- Package migrated to autoconf.
-------------------------------------------------------------------
Sun Jun 7 16:40:59 CEST 2009 - crrodriguez@suse.de

View File

@ -20,29 +20,29 @@
Name: bzip2
Version: 1.0.5
Release: 35
Provides: bzip
Release: 36
Provides: bzip
Obsoletes: bzip
BuildRequires: pkg-config
# The following is a kludge to get updating bzip2 to after the split work
PreReq: libbz2-1
AutoReqProv: on
# bug437293
%ifarch ppc64
Obsoletes: bzip2-64bit
%endif
#
Group: Productivity/Archiving/Compression
License: BSD 3-Clause
License: BSD3c
Url: http://www.bzip.org/
Summary: A Program for Compressing Files
Source: bzip2-%{version}.tar.gz
Source1: bznew.gz
Source2: bznew.1.gz
Source100: rpmlintrc
Patch1: bzip2-shared_lib.patch
# PATCH-FEATURE-OPENSUSE bzip2-1.0.5-autoconfiscated.patch sbrabec@suse.cz -- Convert to a standard autoconf based package.
Patch: http://pack.suse.cz/sbrabec/bzip2/for_downstream/bzip2-1.0.5-autoconfiscated.patch
Patch2: bzip2-maxlen20.patch
Patch3: bzip2-faster.patch
Patch4: bzip2-cflags.patch
Patch5: bzip2-unsafe_strcpy.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -56,7 +56,7 @@ Authors:
Julian Seward <jseward@acm.org>
%package doc
License: BSD 3-Clause
License: BSD3c
Summary: The bzip2 program and Library Documentation
Group: Productivity/Archiving/Compression
@ -70,7 +70,7 @@ Authors:
Julian Seward <jseward@acm.org>
%package -n libbz2-1
License: BSD 3-Clause
License: BSD3c
Summary: The bzip2 runtime library
Group: Productivity/Archiving/Compression
@ -84,7 +84,7 @@ Authors:
Julian Seward <jseward@acm.org>
%package -n libbz2-devel
License: BSD 3-Clause
License: BSD3c
Summary: The bzip2 runtime library development files
Group: Development/Libraries/Other
Requires: libbz2-1 = %{version} glibc-devel
@ -100,10 +100,9 @@ Authors:
%prep
%setup -q
%patch1
%patch -p1
%patch2
%patch3
%patch4
%patch5
%build
@ -113,39 +112,38 @@ profile_bzip2()
trap "rm -f $tmpfile $tmpfile.gz" EXIT
tar -cjf $tmpfile.bz2 /usr/src || true
# time ./bzip2 $tmpfile
export LD_PRELOAD=$PWD/libbz2.so
time ./bzip2 -d < $tmpfile.bz2 > /dev/null
unset LD_PRELOAD
}
export CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64 -Wall -Winline -fpic"
sh ./autogen.sh
%if %{do_profiling}
make CFLAGS="$CFLAGS %{cflags_profile_generate}" LIBDIR=%{_libdir} %{?jobs:-j %jobs} bzip2
profile_bzip2
make clean
make CFLAGS="$CFLAGS %{cflags_profile_feedback}" LIBDIR=%{_libdir} %{?jobs:-j %jobs} bzip2
export CFLAGS="$RPM_OPT_FLAGS %{cflags_profile_generate}"
%endif
make CFLAGS="$CFLAGS" LIBDIR=%{_libdir} %{?jobs:-j %jobs}
%configure\
--libdir=/%{_lib}\
--disable-static
%if %{do_profiling}
make %{?jobs:-j %jobs}
profile_bzip2
mkdir .libs.save
mv .libs/*.gcda .libs.save/
make clean
mv .libs.save .libs
export CFLAGS="$RPM_OPT_FLAGS %{cflags_profile_feedback}"
%configure\
--libdir=/%{_lib}\
--disable-static
%endif
make %{?jobs:-j %jobs}
%install
make PREFIX=$RPM_BUILD_ROOT%{_prefix} MANDIR=$RPM_BUILD_ROOT%{_mandir} \
LIBDIR=$RPM_BUILD_ROOT%{_libdir} install
%makeinstall pkgconfigdir=%{_libdir}/pkgconfig
rm $RPM_BUILD_ROOT/%{_lib}/libbz2.so $RPM_BUILD_ROOT/%{_lib}/libbz2.la
mkdir -p $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/libbz2.so.1 $RPM_BUILD_ROOT%{_libdir}/libbz2.so
gzip -9 manual.ps
gzip -dc %{SOURCE1} > bznew
install -D -m 755 bznew $RPM_BUILD_ROOT%{_bindir}/bznew
install -D -m 755 bznew $RPM_BUILD_ROOT%{_bindir}/bznew
install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/man1
install -m 755 -d $RPM_BUILD_ROOT/%{_lib}/
mv $RPM_BUILD_ROOT%{_libdir}/libbz2.so $RPM_BUILD_ROOT/%{_lib}/libbz2.so.%{version}
ln -sf libbz2.so.%{version} $RPM_BUILD_ROOT/%{_lib}/libbz2.so.1
ln -sf ../../%{_lib}/libbz2.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libbz2.so
# installing bzgrep, bzdiff and bzmore scripts bnc#376464
mkdir -p $RPM_BUILD_ROOT%{_bindir}
install -m 755 bzgrep bzdiff bzmore $RPM_BUILD_ROOT%{_bindir}
install -m 644 bzgrep.1 bzdiff.1 bzmore.1 $RPM_BUILD_ROOT%{_mandir}/man1
ln -s bzdiff $RPM_BUILD_ROOT%{_bindir}/bzcmp
ln -s bzmore $RPM_BUILD_ROOT%{_bindir}/bzless
ln -s bzdiff.1 $RPM_BUILD_ROOT%{_mandir}/man1/bzcmp.1
ln -s bzmore.1 $RPM_BUILD_ROOT%{_mandir}/man1/bzless.1
%{__rm} -rf %{buildroot}%{_libdir}/*.a
%clean
rm -rf $RPM_BUILD_ROOT
@ -156,7 +154,7 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc README LICENSE CHANGES
%doc COPYING NEWS README
%doc %{_mandir}/man1/*
%{_bindir}/*
@ -166,7 +164,7 @@ rm -rf $RPM_BUILD_ROOT
%files -n libbz2-1
%defattr(-,root,root)
%doc README LICENSE CHANGES
%doc COPYING NEWS README
/%{_lib}/libbz2.so.1
/%{_lib}/libbz2.so.1.*
@ -174,126 +172,6 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root)
%{_includedir}/bzlib.h
%{_libdir}/libbz2.so
%{_libdir}/pkgconfig/bzip2.pc
%changelog
* Sun Jun 07 2009 crrodriguez@suse.de
- remove static libraries see bnc#509945 for details
* Wed Dec 10 2008 olh@suse.de
- use Obsoletes: -XXbit only for ppc64 to help solver during distupgrade
(bnc#437293)
* Thu Oct 30 2008 olh@suse.de
- obsolete old -XXbit packages (bnc#437293)
* Fri Aug 01 2008 jw@suse.de
- added missing header to bznew [bnc#413261]
* Wed May 14 2008 coolo@suse.de
- fix rename of xxbit packages
* Thu Apr 10 2008 ro@suse.de
- added baselibs.conf file to build xxbit packages
for multilib support
* Thu Apr 03 2008 lmichnovic@suse.cz
- update to version 1.5
* Fixes CERT-FI 20469 as it applies to bzip2
which obsoletes bzip2-CVE-2008-1372-CERT-FI-20469.patch
- installing scripts bzdiff, bzgrep, bzmore
and symlinks bzless, bzcmp [bnc#376464]
- addded CFLAGS in Makefile-libbz2_so (cflags.patch)
- fix unsafe strcpy in bzip2recover (unsafe_strcpy.patch)
Thanks to Red Hat.
* Wed Mar 19 2008 nadvornik@suse.cz
- fixed buffer overflows CVE-2008-1372 [bnc#372047]
* Thu Dec 06 2007 lmichnovic@suse.cz
- bznew can now repack also .tar.gz files [#342612]
The dot in suffix is explicitly checked
* Thu Nov 08 2007 lmichnovic@suse.cz
- added README, LICENSE, CHANGES files to libbz2-1 package
* Sun Jun 03 2007 schwab@suse.de
- Fix dependency.
* Wed May 30 2007 lmichnovic@suse.cz
- renamed lib to libbz2-1 according to Shared Library Packaging
Policy
- calling ldconfig for libbz2-1 package
* Fri May 25 2007 dmueller@suse.de
- build with profile feedback enabled (7-15%% speedup)
* Fri Mar 30 2007 rguenther@suse.de
- Add PreReq to libbz2 from bzip2 to work around update problems
* Fri Mar 23 2007 rguenther@suse.de
- Split off doc, libbz2 and libbz2-devel packages
* Mon Jan 15 2007 lmichnovic@suse.cz
- Update to version 1.0.4
* Fixes some minor bugs since the last version, 1.0.3.
* Fix file permissions race problem (CAN-2005-0953).
* Avoid possible segfault in BZ2_bzclose. From Coverity's NetBSD
scan.
* 'const'/prototype cleanups in the C code.
* Change default install location to /usr/local, and handle
multiple 'make install's without error.
* Sanitise file names more carefully in bzgrep. Fixes
CAN-2005-0758 to the extent that applies to bzgrep.
* Use 'mktemp' rather than 'tempfile' in bzdiff.
* Tighten up a couple of assertions in blocksort.c following
automated analysis.
* Fix minor doc/comment bugs.
* Mon Oct 16 2006 dmueller@suse.de
- strip .la files
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Wed Jan 18 2006 schwab@suse.de
- Don't strip binaries.
* Fri Aug 12 2005 mls@suse.de
- make decompress much faster
- compile with -O3
- go back to maxlen=20 when compressing
* Fri Aug 05 2005 ro@suse.de
- next libdir: only package lib*
* Fri Aug 05 2005 ro@suse.de
- do not package all of libdir (debuginfo)
* Mon Aug 01 2005 mjancar@suse.cz
- update to 1.0.3
* Tue Jun 28 2005 kukuk@suse.de
- Move shared libraries to /%%{_lib}
* Thu Mar 24 2005 werner@suse.de
- Add bznew, a changeed version of the gzip znew.
* Tue Apr 20 2004 mmj@suse.de
- Fix strict aliasing
* Sun Jan 11 2004 adrian@suse.de
- add %%defattr and %%run_ldconfig
* Wed Jul 23 2003 tcrhak@suse.cz
- fixed URL
* Tue Jul 23 2002 tcrhak@suse.cz
- renamed to bzip2
* Tue Feb 05 2002 tcrhak@suse.cz
- update to version 1.0.2
- bziped tarball
* Thu Mar 08 2001 nadvornik@suse.cz
- re-added /usr/include/bzlib.h
* Thu Mar 08 2001 bk@suse.de
- Replaced the -malign options with -mcpu=pentiumpro
* Tue Mar 06 2001 bk@suse.de
- add version info to libbz2 link to fix the library version number
- if i386, add -malign-loops=2 -malign-jumps=2 -malign-functions=2
* Thu Nov 30 2000 aj@suse.de
- New version, compile with LFS support.
* Tue Oct 03 2000 kukuk@suse.de
- Set libdir for 64bit architectures
* Mon May 22 2000 nadvornik@suse.cz
- update to 1.0.0
* Wed Apr 26 2000 nadvornik@suse.cz
- changed Group
* Mon Apr 10 2000 nadvornik@suse.cz
- added URL
* Tue Apr 04 2000 nadvornik@suse.cz
- fixed to compile
* Mon Apr 03 2000 bk@suse.de
- added libbz2 shared library support for s390
* Thu Mar 02 2000 fehr@suse.de
- moved man pages to /usr/share/man
* Mon Sep 13 1999 bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
* Mon Sep 13 1999 fehr@suse.de
- update to 0.9.5d
* Thu Jul 01 1999 ro@suse.de
- update to 0.9.0c
* Fri Sep 18 1998 ro@suse.de
- update to 0.9.0b (including libbz2 and bzlib.h)
* Thu Oct 30 1997 fehr@suse.de
- add bzip package to S.u.S.E. distribution