summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 63ecf8174bd740f75536838309d6856e90c42d65 (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
52
53
54
55
56
57
58
59
# Maintainer : Daniel Bermond < yahoo-com: danielbermond >

# NOTE:
# This is a header-only library. No dependecy is needed and no build is necessary.
# If you want to build the checks/tests, uncomment the blocks in makedepends, build() and check().

pkgname=fxdiv-git
pkgver=r36.8f85044
pkgrel=1
pkgdesc="Header-only library for division via fixed-point multiplication by inverse (git version)"
arch=('any')
url="https://github.com/Maratyszcza/FXdiv/"
license=('MIT')
makedepends=('git'
    # for building checks:
        #'python2' 'ninja' # binary repositories
        #'confu2-git'      # AUR
)
source=("$pkgname"::"git+https://github.com/Maratyszcza/FXdiv.git")
sha256sums=('SKIP')

pkgver() {
    cd "$pkgname"
    
    # git, no tags available
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

# uncomment this block to build and run the checks/tests
#build() {
#    cd "$pkgname"
#    
#    confu2 setup
#    python2 ./configure.py
#    ninja
#}
#
#check() {
#    cd "${pkgname}/bin"
#    for _test in *
#    do
#        msg2 "Running test '${_test}'..."
#        ./"$_test"
#    done
#}

package() {
    cd "${pkgname}"
    
    # directories creation
    mkdir -p "${pkgdir}/usr/include"
    mkdir -p "${pkgdir}/usr/share/licenses/${pkgname}"
    
    # include
    install -D -m644 include/*.h "${pkgdir}/usr/include"
    
    # license
    install -D -m644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}