summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2744bfeb74aa4f26b6d5e66ee9ea61b1e6e6af43 (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: 132ikl <132ikl@gmail.com>
_pkgname=mbs
pkgname="${_pkgname}-git"
pkgver=r11.060a1a9
pkgrel=1
pkgdesc="A simple cmake-based modular build system for C and C++"
arch=("i686" "x86_64")
url=https://github.com/john01dav/mbs
license=("LGPL3")
depends=("gcc-libs")
optdepends=("cmake: use CMake files generated by mbs")
provides=("mbs")
conflicts=("mbs")
source=("git+${url}.git"
    "git+https://github.com/jbeder/yaml-cpp")
md5sums=("SKIP" "SKIP")

pkgver()  {
    printf "r%s.%s" "$(git -C ${_pkgname} rev-list --count HEAD)" "$(git -C ${_pkgname} rev-parse --short HEAD)"
}

prepare() {
    cd "${_pkgname}"
    git submodule init
    git config submodule.yaml-cpp.url "${srcdir}/yaml-cpp/"
    git submodule update
}

build() {
    mkdir -p "${_pkgname}/build"
    cd "${_pkgname}/build"
    cmake .. -DCMAKE_BUILD_TYPE=Release
    make
}

package() {
    mkdir -p "${pkgdir}/usr/bin/"
    install "${_pkgname}/build/${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}"
}