summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0c71ae67989c70d4f84efb7fe002f08db4aa1449 (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
# Maintainer: Rafael Dominiquini <rafaeldominiquini at gmail dor com>

pkgname=async++
pkgver=1.2
pkgrel=1
pkgdesc="Async++ is a lightweight concurrency framework for C++11."
arch=('any')
url='https://github.com/Amanieu/asyncplusplus'
license=('MIT')
depends=()
provides=("${pkgname}")
conflicts=("${pkgname}-git")
makedepends=('cmake')
options=('!strip' '!buildflags' 'staticlibs')
source=("${url}/archive/v${pkgver}.tar.gz")
sha256sums=('0711c8db231bf3eb1066400f49ed73b5c3211a10eb3b8c3e64da3d5fdee8a4bf')

prepare() {
    mv "asyncplusplus-${pkgver}" "${pkgname}"
}

build() {
    cmake \
        -B "${pkgname}/build" \
        -S "${pkgname}" \
        -DCMAKE_BUILD_TYPE='Release' \
        -DCMAKE_INSTALL_PREFIX='/usr' \
        -DBUILD_SHARED_LIBS=ON \
        -Wno-dev

    cmake --build "${pkgname}/build/"
}

package() {
    DESTDIR="${pkgdir}" cmake --install "${pkgname}/build/"

    install -D -m644 "${pkgname}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"

    install -D -m644 "${pkgname}/README.md" -t "${pkgdir}/usr/share/doc/${pkgname}"
}