PKGBUILDs/core/lzo/PKGBUILD

47 lines
1.2 KiB
Bash
Raw Normal View History

2014-11-25 22:21:21 +00:00
# Contributor: Low Kian Seong <fastmail_low@speedymail.org>
# Maintainer: dorphell <dorphell@archlinux.org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - disable unaligned access on v5 with -DLZO_CFG_NO_UNALIGNED
pkgname=lzo
2017-03-06 14:53:07 +00:00
pkgver=2.10
2018-11-08 13:22:37 +00:00
pkgrel=2
2014-11-25 22:21:21 +00:00
pkgdesc="Portable lossless data compression library"
2018-11-08 13:22:37 +00:00
arch=('x86_64')
2014-11-25 22:21:21 +00:00
url="http://www.oberhumer.com/opensource/lzo"
license=('GPL')
depends=('glibc')
source=(http://www.oberhumer.com/opensource/lzo/download/lzo-${pkgver}.tar.gz)
2017-03-06 14:53:07 +00:00
sha1sums=('4924676a9bae5db58ef129dc1cebce3baa3c4b5d')
2014-11-25 22:21:21 +00:00
build() {
2015-02-10 19:34:25 +00:00
cd lzo-${pkgver}
2014-11-25 22:21:21 +00:00
[[ $CARCH == "arm" ]] && CPPFLAGS+=" -DLZO_CFG_NO_UNALIGNED"
./configure --prefix=/usr --enable-shared
make
# build minilzo
2018-11-08 13:22:37 +00:00
gcc $CPPFLAGS $CFLAGS -fpic -Iinclude/lzo -o minilzo/minilzo.o -c minilzo/minilzo.c
2014-11-25 22:21:21 +00:00
gcc $LDFLAGS -shared -o libminilzo.so.0 -Wl,-soname,libminilzo.so.0 minilzo/minilzo.o
}
check() {
2015-02-10 19:34:25 +00:00
cd lzo-${pkgver}
2014-11-25 22:21:21 +00:00
make test # Larger test
make check
}
package() {
2015-02-10 19:34:25 +00:00
cd lzo-${pkgver}
2014-11-25 22:21:21 +00:00
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
}