diff --git a/packages/compress/bzip2/build b/packages/compress/bzip2/build deleted file mode 100755 index bd951e4573..0000000000 --- a/packages/compress/bzip2/build +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -cd $PKG_BUILD - -sed -e "s,ln -s (lib.*),ln -snf \$$1; ln -snf libbz2.so.$PKG_VERSION libbz2.so,g" -i Makefile-libbz2_so - -make CC=$TARGET_CC RANLIB=$TARGET_RANLIB AR=$TARGET_AR CFLAGS="$CFLAGS -fPIC -DPIC" -f Makefile-libbz2_so -ln -snf libbz2.so.1.0 libbz2.so - -mkdir -p $SYSROOT_PREFIX/usr/include - cp bzlib.h $SYSROOT_PREFIX/usr/include - -mkdir -p $SYSROOT_PREFIX/usr/lib - cp -P libbz2.so* $SYSROOT_PREFIX/usr/lib - diff --git a/packages/compress/bzip2/install b/packages/compress/bzip2/install deleted file mode 100755 index 9dd22ead23..0000000000 --- a/packages/compress/bzip2/install +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ - -. config/options $1 - -mkdir -p $INSTALL/usr/lib - cp -P $PKG_BUILD/*.so* $INSTALL/usr/lib diff --git a/packages/compress/bzip2/meta b/packages/compress/bzip2/package.mk similarity index 74% rename from packages/compress/bzip2/meta rename to packages/compress/bzip2/package.mk index 16632983a1..a8ba92c060 100644 --- a/packages/compress/bzip2/meta +++ b/packages/compress/bzip2/package.mk @@ -26,11 +26,33 @@ PKG_LICENSE="GPL" PKG_SITE="http://www.bzip.org" PKG_URL="http://www.bzip.org/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.gz" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="toolchain" +PKG_BUILD_DEPENDS_TARGET="toolchain" PKG_PRIORITY="optional" PKG_SECTION="compress" PKG_SHORTDESC="bzip2 data compressor" PKG_LONGDESC="bzip2 is a freely available, patent free (see below), high-quality data compressor. It typically compresses files to within 10% to 15% of the best available techniques (the PPM family of statistical compressors), whilst being around twice as fast at compression and six times faster at decompression." -PKG_IS_ADDON="no" +PKG_IS_ADDON="no" PKG_AUTORECONF="no" + +pre_make_target() { + sed -e "s,ln -s (lib.*),ln -snf \$$1; ln -snf libbz2.so.$PKG_VERSION libbz2.so,g" -i Makefile-libbz2_so +} + +make_target() { + make -f Makefile-libbz2_so CC=$TARGET_CC CFLAGS="$CFLAGS -fPIC -DPIC" +} + +post_make_target() { + ln -snf libbz2.so.1.0 libbz2.so +} + +makeinstall_target() { + mkdir -p $SYSROOT_PREFIX/usr/include + cp bzlib.h $SYSROOT_PREFIX/usr/include + mkdir -p $SYSROOT_PREFIX/usr/lib + cp -P libbz2.so* $SYSROOT_PREFIX/usr/lib + + mkdir -p $INSTALL/usr/lib + cp -P libbz2.so* $INSTALL/usr/lib +} diff --git a/packages/compress/bzip2/patches/bzip2-1.0.6-cflags.patch b/packages/compress/bzip2/patches/bzip2-1.0.6-cflags.patch new file mode 100644 index 0000000000..d0ef3c65d9 --- /dev/null +++ b/packages/compress/bzip2/patches/bzip2-1.0.6-cflags.patch @@ -0,0 +1,12 @@ +diff -Naur bzip2-1.0.6/Makefile-libbz2_so bzip2-1.0.6.patch/Makefile-libbz2_so +--- bzip2-1.0.6/Makefile-libbz2_so 2010-09-11 01:07:52.000000000 +0200 ++++ bzip2-1.0.6.patch/Makefile-libbz2_so 2013-03-31 18:26:33.335234891 +0200 +@@ -35,7 +35,7 @@ + bzlib.o + + all: $(OBJS) +- $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.6 $(OBJS) ++ $(CC) $(CFLAGS) -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 + rm -f libbz2.so.1.0 + ln -s libbz2.so.1.0.6 libbz2.so.1.0