summaryrefslogtreecommitdiff
path: root/core/lzo2/PKGBUILD
blob: 7b56fe63219f6e8a8cb87ec419ef076f4986fe26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# $Id: PKGBUILD 136471 2011-08-30 06:25:43Z tpowa $
# Contributor: Low Kian Seong <fastmail_low@speedymail.org>
# Maintainer: dorphell <dorphell@archlinux.org>
pkgname=lzo2
pkgver=2.06
pkgrel=1
pkgdesc="Portable lossless data compression library"
arch=('i686' 'x86_64' 'mips64el')
url="http://www.oberhumer.com/opensource/lzo"
license=('GPL')
depends=('glibc')
source=(http://www.oberhumer.com/opensource/lzo/download/lzo-${pkgver}.tar.gz)
options=(!libtool)
md5sums=('95380bd4081f85ef08c5209f4107e9f8')

build() {
  cd "${srcdir}/lzo-${pkgver}"

  ./configure --prefix=/usr --enable-shared
  make

  # build minilzo
  gcc $CFLAGS -fpic -Iinclude/lzo -o minilzo/minilzo.o -c minilzo/minilzo.c
  gcc -g -shared -o libminilzo.so.0 -Wl,-soname,libminilzo.so.0 minilzo/minilzo.o
}

package() {
  cd "${srcdir}/lzo-${pkgver}"
  make DESTDIR=${pkgdir} install

  # install minilzo
  install -m 755 libminilzo.so.0 ${pkgdir}/usr/lib
  install -p -m 644 minilzo/minilzo.h ${pkgdir}/usr/include/lzo
  cd ${pkgdir}/usr/lib
  ln -s libminilzo.so.0 libminilzo.so
}