summaryrefslogtreecommitdiffstats
path: root/abs/core/libaio/PKGBUILD
blob: 43e23f71a650e20c26717ea72df129c8253293ee (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
# Maintainer:  Bartłomiej Piotrowski <barthalion@gmail.com>
# Contributor: Thomas S Hatch <thatch45 at gmail dot com>

pkgname=libaio
pkgver=0.3.112
pkgrel=2
pkgdesc="The Linux-native asynchronous I/O facility (aio) library"
arch=('x86_64')
url="http://lse.sourceforge.net/io/aio.html"
license=('LGPL')
source=(http://ftp.de.debian.org/debian/pool/main/liba/$pkgname/${pkgname}_${pkgver}.orig.tar.xz)
md5sums=('66e3b7dd255581a73542ee851f8cd737')

build() {
  cd "$srcdir/$pkgname-$pkgver"
  # AIO library is a thin wrapper around kernel syscalls, it does not use stdlib
  # and other helpers like stack protection libraries
  CFLAGS="-march=${CARCH/_/-} -mtune=generic -O2 -pipe"
  make
}

check() {
  cd "$srcdir/$pkgname-$pkgver"

  # work around gcc warning (-Werror) in test suite
  sed -i '/strncpy/s#sizeof(TEMPLATE)#sizeof(template)#' harness/cases/19.t
  sed -i '/strncpy/s#sizeof(TEMPLATE)#sizeof(temp_file)#' harness/cases/21.t

  make partcheck
}

package() {
  cd "$srcdir/$pkgname-$pkgver"
  make prefix="$pkgdir/usr" install
}