summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 58e29eae93212c96aab50d57c33aca7680d107e9 (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
45
46
47
48
49
50
51
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>

pkgname=libuv-git
pkgver=1.39.0.r100.gdec07238
pkgrel=1
pkgdesc="A multi-platform support library with a focus on asynchronous I/O"
arch=('i686' 'x86_64')
url="https://libuv.org/"
license=('MIT')
depends=('glibc')
makedepends=('git' 'python-sphinx')
provides=('libuv')
conflicts=('libuv')
options=('staticlibs')
source=("git+https://github.com/libuv/libuv.git#branch=master")
sha256sums=('SKIP')


pkgver() {
  cd "libuv"

  _tag=$(git tag -l --sort -v:refname | head -n1)
  _rev=$(git rev-list --count $_tag..HEAD)
  _hash=$(git rev-parse --short HEAD)
  printf "%s.r%s.g%s" "$_tag" "$_rev" "$_hash" | sed 's/^v//'
}

build() {
  cd "libuv"

  ./autogen.sh
  ./configure \
    --prefix="/usr"
  make
  make -C "docs" man
}

check() {
  cd "libuv"

  make check
}

package() {
  cd "libuv"

  make DESTDIR="$pkgdir" install

  install -Dm644 "docs/build/man/libuv.1" -t "$pkgdir/usr/share/man/man1"
  install -Dm644 "LICENSE" -t "$pkgdir/usr/share/licenses/libuv"
}