summaryrefslogtreecommitdiff
path: root/opt/rnp/MAKEPKG
blob: e2e4a80757606db60996a72614af47f38183272b (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
#!/bin/mkpkg
# description: RNP is a set of OpenPGP (RFC4880) tools
# url: https://www.rnpgp.org/

name=rnp
_name=sexpp
version=0.18.1
release=2
_sexpp_version=0.9.2
depends=(botan)
source=(
  https://github.com/rnpgp/$name/releases/download/v$version/rnp-v$version.tar.gz
  https://github.com/rnpgp/$_name/archive/refs/tags/v$_sexpp_version.tar.gz
)
renames=(
         ""
         $_name-$_sexpp_version.tar.gz
)

sha256sums=(
    "423c8e32e1e591462f759adf8441b1c44bca96d9f5daff13b82e81a79f18ecfd"
    "00c47b56a4dd5e80aba6b15df4e86d276a2a369737c6b467be1f51a9c29af31e"
)

build() {
    cd "${name}-v${version}"

    # Copy sexpp sources into the expected folder
    mkdir -p src/libsexpp
    cp -r "$SRC/sexpp-${_sexpp_version}/"* src/libsexpp/

    cmake -B build -S . \
        -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_INSTALL_LIBDIR=lib \
        -DBUILD_SHARED_LIBS=ON \
        -DBUILD_TESTING=OFF \
        -DBUILD_DOC=OFF \
        -DBUILD_TOOLS=ON \
        -DBUILD_EXAMPLES=OFF \
        -DUSE_BOTAN3=ON \
        -DCMAKE_SKIP_RPATH=ON

    # pkgmk already sets MAKEFLAGS / parallel jobs
    cmake --build build
    DESTDIR="$PKG" cmake --install build
    
    rm -rf "$PKG/usr/share/doc" "$PKG/usr/share/man"
}

signify() {
    untrusted comment: public key
    RWTZ9IduCSQ/mL8337TEUinPwT92xFEUpD92hkS7IxcOnzTt9QdpohT3
}

# vim: filetype=sh