summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f6887cbe3d7210b2efdf56d98ab70ba56195ffbd (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
pkgname=mingw-w64-lzo
pkgver=2.09
pkgrel=2
pkgdesc="Portable lossless data compression library (mingw-w64)"
arch=(any)
url="http://www.oberhumer.com/opensource/lzo/"
license=("GPL")
makedepends=(mingw-w64-configure)
depends=(mingw-w64-crt)
options=(staticlibs !strip !buildflags)
source=("http://www.oberhumer.com/opensource/lzo/download/lzo-${pkgver}.tar.gz")
md5sums=('c7ffc9a103afe2d1bba0b015e7aa887f')

_architectures="i686-w64-mingw32 x86_64-w64-mingw32"

build() {
  cd "${srcdir}/lzo-${pkgver}"
  for _arch in ${_architectures}; do
    mkdir -p build-${_arch} && pushd build-${_arch}
		${_arch}-configure \
			--target=${_arch}
		make
    popd
  done
}

package() {
  for _arch in ${_architectures}; do
    cd "${srcdir}/lzo-${pkgver}/build-${_arch}"
    make DESTDIR="$pkgdir" install
    #rm -r "$pkgdir/usr/${_arch}/share"
    find "$pkgdir/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \;
    find "$pkgdir/usr/${_arch}" -name '*.a' -o -name '*.dll' | xargs ${_arch}-strip -g
  done
}