summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ae370cfef28defa6696a81a7de2cd82eb9d53d7f (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
# Maintainer: condy <condy0919 at gmail dot com>
pkgname=moros-git
pkgver=r45.6e12809
pkgrel=1
pkgdesc='A modern http(s) benchmark tool'
arch=('x86_64')
url='https://github.com/condy0919/moros'
license=('MIT')
depends=('boost' 'openssl')
makedepends=('git' 'cmake' 'make' 'boost')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("${pkgname}"::'git+https://github.com/condy0919/moros.git')
md5sums=('SKIP')


pkgver() {
    cd "$srcdir/${pkgname}"
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
    cd "$srcdir/${pkgname}"

    # fetch third libraries
    git submodule update --init --recursive

    # build
    cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Release
    cmake --build build
}

package() {
    cd "$srcdir/${pkgname}"
    install -Dm755 "bin/moros" "$pkgdir/usr/bin/moros"
    install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/moros/LICENSE"
}