summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 789d614d8823c239e24fcfece9a85e51187c05f7 (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
37
38
39
40
41
42
43
44
# Maintainer: Andrew Sun <adsun701@gmail.com>
# Contributor: Philipp Classen <philipp.classen@posteo.de>
# Original maintainer: Anatol Pomozov <anatol dot pomozov at gmail>
# Contributor: Jose Neder <jlneder(at)gmail(dot)com>

pkgname=libhugetlbfs
pkgver=2.21
pkgrel=1
pkgdesc='interacts with the Linux hugetlbfs to make large pages available to applications in a transparent manner.'
url='https://github.com/libhugetlbfs/libhugetlbfs'
arch=(i686 x86_64)
depends=(perl)
checkdepends=(python2)
license=(GPL)
source=(https://github.com/libhugetlbfs/libhugetlbfs/releases/download/$pkgver/libhugetlbfs-$pkgver.tar.gz)
sha1sums=('8ed79a12d07be1e858ef4e0148ab1f4115094ef6')

_options='BUILDTYPE=NATIVEONLY'
if [ "$CARCH" = "x86_64" ]; then
  _options="$_options LIB32= LIB64=lib"
else
  _options="$_options LIB32=lib LIB64="
fi

prepare() {
  cd libhugetlbfs-$pkgver
  sed 's|/lib64/perl5/TLBC|/lib/perl5/TLBC|g;s|/lib/perl5/TLBC|/lib/perl5/vendor_perl/TLBC|g' -i Makefile
  sed 's|/usr/bin/env python|/usr/bin/env python2|g' -i tests/run_tests.py
}

build() {
  cd libhugetlbfs-$pkgver
  make $_options
}

check() {
  cd libhugetlbfs-$pkgver
  make $_options check
}

package() {
  cd libhugetlbfs-$pkgver
  make DESTDIR="$pkgdir" PREFIX=/usr install $_options
}