summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0fde98d12cbe0e91007382ddced7316e2900f05b (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
# Maintainer: taotieren <admin@taotieren.com>

pkgname=idl-serial-git
pkgver=908c364
pkgrel=1
pkgdesc="This project is a IDL serial generator for c. We use flex && bison to scan and parse files and generate json to struct and struct to json code."
arch=('any')
url="https://github.com/nanomq/idl-serial"
license=('MIT')
provides=(${pkgname%-git})
conflicts=(${pkgname%-git})
depends=()
makedepends=(git
            cmake
            ninja)
backup=()
options=('!strip')
source=("${pkgname}::git+${url}.git")
sha256sums=('SKIP')

pkgver() {
    cd "${srcdir}/${pkgname}/"
#     git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
    git describe --always | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
    cd "${srcdir}/${pkgname}/"
    cmake -DCMAKE_BUILD_TYPE=None \
          -DNNG_ENABLE_TLS=ON \
          -DCMAKE_INSTALL_PREFIX=/usr \
          -B build \
          -G Ninja

    ninja -C build
}

package() {
    cd "${srcdir}/${pkgname}/"
    DESTDIR="${pkgdir}" ninja -C build install
}