summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 14ba7e5be25746223ab1c3e85d587651064d7949 (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
60
61
62
# Maintainer: taotieren <admin@taotieren.com>

pkgbase=hbdbus-git
pkgname=hbdbus-git
pkgver=2.0.0.r9.g9ed58d4
pkgrel=4
pkgdesc="The data bus for HybridOS based on HVML PurC."
arch=(x86_64
    aarch64
    riscv64)
url="https://github.com/HybridOS2/HBDBus"
license=('GPL-3.0')
groups=(hybridos2-git)
provides=(${pkgbase%-git})
conflicts=(${pkgbase%-git})
replaces=()
depends=(
    glibc
    python
    purc)
makedepends=(ccache
    cmake
    git
    ninja
    openssl
    pkgconf)
checkdepends=()
optdepends=()
source=("${pkgname%-git}::git+${url}.git")
sha256sums=('SKIP')
options=('!strip')

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

prepare()
{
    git -C "${srcdir}/${pkgname%-git}" clean -dfx
}

build() {
    cd "${srcdir}/${pkgname%-git}"

    sed -i 's|{SYSEXEC_INSTALL_DIR}|{CMAKE_INSTALL_PREFIX}/bin|g' source/hbdbus/CMakeLists.txt
# see´╝Ühttps://wiki.archlinux.org/title/CMake_package_guidelines
#     cmake -DCMAKE_BUILD_TYPE=Release \
    cmake -DCMAKE_BUILD_TYPE=None \
        -DPORT=Linux \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_INSTALL_LIBDIR=lib \
        -DCMAKE_INSTALL_LIBEXECDIR=lib \
        -B build \
        -G Ninja

    ninja -C build
}

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