This patch also splits the library into a separate package.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
###############################################################################
name = bzip2
-version = 1.0.6
-release = 7
+version = 1.0.8
+release = 1
groups = Applications/Compression
-url = http://www.bzip.org/
+url = https://sourceware.org/bzip2/
license = GPLv2+
-summary = Bzip2 is a data compressor.
+summary = Bzip2 is a data compressor
description
bzip2 is a freely available, patent free (see below), high-quality data
compressor that is an alternative to the GNU zip compressor.
end
-source_dl = http://www.bzip.org/%{version}/
-
-CFLAGS += -fPIC -D_FILE_OFFSET_BITS=64
+source_dl = https://sourceware.org/pub/bzip2/
build
- prepare_cmds
- sed -i 's@\(ln -s -f \)\$(PREFIX)/bin/@\1@' Makefile
- sed -e "s/\$(CC) -shared/& %{CFLAGS}/" -i Makefile-libbz2_so
- end
-
build
- %{DO_FIX_LIBTOOL}
make -f Makefile-libbz2_so %{PARALLELISMFLAGS} \
CFLAGS="%{CFLAGS}" LDFLAGS="%{LDFLAGS}"
packages
package %{name}
- groups += Build
- # Provide older soname to fix problem with
- # older version of the package.
- if "%{DISTRO_ARCH}" == "i686"
- provides += libbz2.so.1.0
- end
+ package %{name}-libs
+ template LIBS
end
package %{name}-devel
+++ /dev/null
---- Makefile
-+++ Makefile
-@@ -18,10 +18,9 @@
- CC=gcc
- AR=ar
- RANLIB=ranlib
--LDFLAGS=
-
- BIGFILES=-D_FILE_OFFSET_BITS=64
--CFLAGS=-Wall -Winline -O2 -g $(BIGFILES)
-+CFLAGS+=-Wall -Winline $(BIGFILES) $(CPPFLAGS)
-
- # Where you want it installed when you do 'make install'
- PREFIX=/usr/local
---- Makefile-libbz2_so
-+++ Makefile-libbz2_so
-@@ -24,7 +24,7 @@
- SHELL=/bin/sh
- CC=gcc
- BIGFILES=-D_FILE_OFFSET_BITS=64
--CFLAGS=-fpic -fPIC -Wall -Winline -O2 -g $(BIGFILES)
-+CFLAGS+=-fpic -fPIC -Wall -Winline $(BIGFILES) $(CPPFLAGS)
-
- OBJS= blocksort.o \
- huffman.o \
+++ /dev/null
---- Makefile-libbz2_so
-+++ Makefile-libbz2_so
-@@ -35,8 +35,8 @@
- bzlib.o
-
- all: $(OBJS)
-- $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.6 $(OBJS)
-- $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.6
-+ $(CC) $(LDFLAGS) -shared -Wl,-soname -Wl,libbz2.so.1 -o libbz2.so.1.0.6 $(OBJS)
-+ $(CC) $(LDFLAGS) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.6
- rm -f libbz2.so.1.0
- ln -s libbz2.so.1.0.6 libbz2.so.1.0
-
--- /dev/null
+diff -up bzip2-1.0.6/Makefile-libbz2_so.pom bzip2-1.0.6/Makefile-libbz2_so
+--- bzip2-1.0.6/Makefile-libbz2_so.pom 2010-09-11 01:07:52.000000000 +0200
++++ bzip2-1.0.6/Makefile-libbz2_so 2010-09-22 10:31:46.000000000 +0200
+@@ -35,7 +35,7 @@ OBJS= blocksort.o \
+ bzlib.o
+
+ all: $(OBJS)
+- $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.8 $(OBJS)
++ $(CC) -shared -Wl,-soname -Wl,libbz2.so.1 -o libbz2.so.1.0.8 $(OBJS)
+ $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.8
+ rm -f libbz2.so.1.0
+ ln -s libbz2.so.1.0.8 libbz2.so.1.0