summaryrefslogtreecommitdiff
path: root/libs/keyutils/MAKEPKG
blob: c656aaba81e09840567548f43e9d78be42b40b09 (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
#!/bin/mkpkg
# description: Tools to control the Linux key management system
# url: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git/
name=keyutils
version=1.6.3
release=1
source=(https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git/snapshot/$name-$version.tar.gz)
sha256sums=(
    "a61d5706136ae4c05bd48f86186bcfdbd88dd8bd5107e3e195c924cfc1b39bb4"
)
build() {
    cd $name-$version

    sed -i "/^CFLAGS/s/-g/$CFLAGS/" Makefile
    sed -i 's/-Werror//g' Makefile

    # lld is stricter than GNU ld with version scripts - symbols
    # conditionally compiled out (keyctl_restrict, keyctl_dh_compute_kdf_alloc)
    # cause fatal errors when referenced in version.lds. This flag
    # matches GNU ld behavior (warn instead of error).
    export LDFLAGS="$LDFLAGS -Wl,--undefined-version"

    make
    make DESTDIR=$PKG \
        BINDIR=/usr/bin \
        SBINDIR=/usr/sbin \
        LIBDIR=/usr/lib \
        USRLIBDIR=/usr/lib \
        ETCDIR=/etc \
        SHAREDIR=/usr/share/keyutils \
        INCLUDEDIR=/usr/include \
        MANDIR=/usr/share/man \
        install

    rm -f $PKG/usr/lib/*.la
}
signify() {
    untrusted comment: public key
    RWTZ9IduCSQ/mL8337TEUinPwT92xFEUpD92hkS7IxcOnzTt9QdpohT3
}
# vim: filetype=sh