summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 347b287b3369c1b445dd1af627f48b3414e5e808 (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
_username=ptal
_reponame=expected
pkgname=boost.expected-git
pkgver=r341.2d1babd
pkgrel=1
pkgdesc="Utility class to represent expected monad"
url="https://github.com/ptal/expected"
license=('boost')
depends=('boost')
arch=('i686' 'x86_64')
source=("git+https://github.com/$_username/$_reponame.git")
sha256sums=('SKIP')

pkgver() {
    _repodir="$srcdir/$_reponame"

    cd "$_repodir"
    (
        set -o pipefail
        git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
        printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
    )
}

package() {
    _repodir="$srcdir/$_reponame"

    install -d $pkgdir/usr/include
    cp -r $_repodir/include $pkgdir/usr
}