summaryrefslogtreecommitdiff
path: root/core/lzo2/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'core/lzo2/PKGBUILD')
-rw-r--r--core/lzo2/PKGBUILD36
1 files changed, 36 insertions, 0 deletions
diff --git a/core/lzo2/PKGBUILD b/core/lzo2/PKGBUILD
new file mode 100644
index 000000000..4f2889baf
--- /dev/null
+++ b/core/lzo2/PKGBUILD
@@ -0,0 +1,36 @@
+# $Id: PKGBUILD 100405 2010-11-23 12:35:30Z stephane $
+# Contributor: Low Kian Seong <fastmail_low@speedymail.org>
+# Maintainer: dorphell <dorphell@archlinux.org>
+pkgname=lzo2
+pkgver=2.04
+pkgrel=1
+pkgdesc="Portable lossless data compression library"
+arch=('i686' 'x86_64')
+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)
+sha1sums=('f5bf5c7ae4116e60513e5788d156ef78946677e7')
+
+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
+}