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
# Maintainer : josephgbr <rafael.f.f1 at gmail.com>
# Contributor : angvp <angvp at archlinux.org>

pkgname=lib32-libaio
pkgver=0.3.109
pkgrel=2
pkgdesc="The Linux-native asynchronous I/O facility (aio) library (32 bit)"
arch=('x86_64')
url="http://lse.sourceforge.net/io/aio.html"
license=('LGPL')
makedepends=('gcc-multilib')
md5sums=('435a5b16ca6198eaf01155263d855756')
source=(http://pkgs.fedoraproject.org/repo/pkgs/libaio/libaio-$pkgver.tar.gz/$md5sums/libaio-$pkgver.tar.gz)

build() {
  cd "$srcdir/libaio-$pkgver"

  # set lib32 environment in Makefiles
  # "/lib" -> "/lib32"
  sed -i \
	-e 's/\/lib/\/lib32/g' \
	Makefile
  # "CFLAGS :=" -> "CFLAGS := -m32"
  sed -i \
	-e '/^libdir/s/lib/lib32/' \
	-e '/^CFLAGS/s/:= /&-m32 /' \
	src/Makefile
  
  make
}

package() {
  cd "$srcdir/libaio-$pkgver"
  make prefix="$pkgdir/usr" install
  rm -rf ${pkgdir}/usr/include
}