aboutsummaryrefslogblamecommitdiffstats
path: root/main/bzip2/APKBUILD
blob: 19a8214fc400d1d24bb0f348db76aff12f1bf8f8 (plain) (tree)
1
2
3
4
5
6
7
8
9
                                                   
             

            

                                                 
                 
               
          
                                 
                                                           
                                         
                                
                                   


                                     
         
                                              
 

                                    
               







                                                             













                                                                         



                       

                                                  



                       
                                                     


                                                                         
 









                                                                   
                                                             


                                                                
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=bzip2
pkgver=1.0.6
pkgrel=0
pkgdesc="A high-quality data compression program"
url="http://sources.redhat.com/bzip2"
arch="x86 x86_64"
license="BZIP2"
depends=""
install="$pkgname.post-deinstall"
source="http://www.bzip.org/$pkgver/$pkgname-$pkgver.tar.gz
	bzip2-1.0.4-makefile-CFLAGS.patch
	bzip2-1.0.6-saneso.patch
	bzip2-1.0.4-man-links.patch
	bzip2-1.0.2-progress.patch
	bzip2-1.0.3-no-test.patch
	bzip2-1.0.4-POSIX-shell.patch
	"
subpackages="$pkgname-dev $pkgname-doc libbz2"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch)
			msg "Applying $i"
			patch -p1 -i "$srcdir"/$i || return 1
			;;
		esac
	done

	# Fix man path
	# Generate relative symlinks
	sed -i \
		-e 's:\$(PREFIX)/man:\$(PREFIX)/share/man:g' \
		-e 's:ln -s -f $(PREFIX)/bin/:ln -s :' \
		Makefile || return 1

	# fixup broken version stuff
	sed -i \
		-e "s:1\.0\.4:$pkgver:" \
		bzip2.1 bzip2.txt Makefile-libbz2_so manual.* || return 1

}

build () { 
	cd "$_builddir"
	make -f Makefile-libbz2_so all || return 1
	make all || return 1
}

package() {
	cd "$_builddir"
	make PREFIX="$pkgdir"/usr install || return 1
	install -D libbz2.so.$pkgver "$pkgdir"/usr/lib/libbz2.so.$pkgver
	ln -s libbz2.so.$pkgver "$pkgdir"/usr/lib/libbz2.so
	ln -s libbz2.so.$pkgver "$pkgdir"/usr/lib/libbz2.so.${pkgver%%.*}
}

libbz2() {
	pkgdesc="Shared library for bz2"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/*.so.* "$subpkgdir"/usr/lib/
}

md5sums="00b516f4704d4a7cb50a1d97e6e8e15b  bzip2-1.0.6.tar.gz
3675cd4db6affe64e1d7d40bc2ad4f26  bzip2-1.0.4-makefile-CFLAGS.patch
d47a4aa8f08d101aa5aa0dd2030338d1  bzip2-1.0.6-saneso.patch
fd13ef6bc55276c7e3adc346bde56cd1  bzip2-1.0.4-man-links.patch
5f7a98f0aaaed6554126d30e28383ee0  bzip2-1.0.2-progress.patch
804bd17c96297968a89fc4eddc9a6713  bzip2-1.0.3-no-test.patch
55ac0e9be7821190b99376e0205707be  bzip2-1.0.4-POSIX-shell.patch"