summaryrefslogtreecommitdiff
path: root/core/util-linux/MAKEPKG
blob: 7f70c0cf642fba1cd25f861222f07b16aa1d6536 (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
63
64
#!/bin/mkpkg
# description: Miscellaneous system utilities
# url: https://github.com/util-linux/util-linux

name=util-linux
version=2.41.6
_shortv=2.41
release=1
depends=(file ncurses readline zlib)
makedeps=(udevd)
#lockbox=(make)
source=(https://www.kernel.org/pub/linux/utils/$name/v${_shortv}/${name}-${version}.tar.xz)

sha256sums=(
    "e596083744e746be7d2823b62b43f4418dd7bf56303b4dc09e6fe8112fe3d7ed"
)

patch() {
    cd $name-$version
    sed -i '/#include "all-io.h"/a #include <linux\/openat2.h>\n#include "fileutils.h"' libmount/src/hook_idmap.c
}

build() {
    cd $name-$version
    ./configure \
        --prefix=/ \
        --bindir=/bin \
        --sbindir=/sbin \
        --libdir=/lib \
        --includedir=/include \
        --mandir=/usr/share/man \
        --disable-nls \
        --disable-chfn-chsh \
        --disable-login \
        --disable-nologin \
        --disable-su \
        --disable-newgrp \
        --disable-runuser \
        --disable-setpriv \
        --disable-liblastlog2 \
        --disable-pylibmount \
        --without-python \
        --without-systemd \
        --enable-sulogin
    make
    make install DESTDIR=$PKG

    # Fix .so symlinks (util-linux generates //../lib/ paths
    # Not necessary, nice to have cosmetic thing though
    cd $PKG/lib
    for link in *.so; do
        target=$(readlink "$link")
        [ -n "$target" ] && ln -sf "$(basename $target)" "$link"
    done

    rm -rf $PKG/share
}

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

# vim: filetype=sh