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


                                               
                                       
 
                                    




                                                         
         
                       

                                                
                                                        
                        


           
                       

                                                   

                                             
 



                                                       

 

                                                             
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=zlib
pkgver=1.2.5
pkgrel=1
pkgdesc="A compression/decompression Library"
arch="all"
license=custom:zlib
url="http://zlib.net"
depends=
source="http://zlib.net/$pkgname-$pkgver.tar.gz
	zlib-1.2.5-lfs-decls.patch
	"
subpackages="$pkgname-dev $pkgname-doc"

_builddir="$srcdir/$pkgname-$pkgver"
prepare() {
	cd "$_builddir"
	patch -p1 -i "$srcdir"/zlib-1.2.5-lfs-decls.patch
}

build() {
	cd "$_builddir"
	# we trade size for a little more speed.
	export CFLAGS="$CFLAGS -O2"
	./configure --prefix=/usr --libdir=/lib --shared
	make || return 1
}

package() {
	cd "$_builddir"
	make install \
		pkgconfigdir="/usr/lib/pkgconfig" \
		DESTDIR="$pkgdir" || return 1
}

dev() {
	default_dev
	mkdir -p "$subpkgdir"/lib
	mv "$pkgdir"/lib/libz.a "$subpkgdir"/lib/libz.a
}

md5sums="c735eab2d659a96e5a594c9e8541ad63  zlib-1.2.5.tar.gz
4cb279ea3beab621f3526bf7b7ab99e5  zlib-1.2.5-lfs-decls.patch"