summaryrefslogtreecommitdiff
path: root/repo/ubase/ubase.xibuild
blob: c93c56e83670b3a3e00e7c9c50218eaf4b390bf1 (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
#!/bin/sh

MAKEDEPS="make findutils sed"
DEPS="musl utmps"

SOURCE=git://git.suckless.org/ubase

DESC="ubase from suckless.org"

prepare () {
    /usr/bin/find -type 'f' -name '*.c' -exec sed -i "s@#include <sys/types.h>@#include <sys/sysmacros.h>@g" {} \;
}

build () {
    make
}

package () {
    for p in stat id df dd truncate who; do
        install -d $PKG_DEST/usr/bin
        install -m755 $p $PKG_DEST/usr/bin

        if [ -f $p.1 ]; then
            install -d $PKG_DEST/usr/share/man
            install -m644 $p.1 $PKG_DEST/usr/share/man/$p.1
        fi
        if [ -f $p.8 ]; then
            install -d $PKG_DEST/usr/share/man
            install -m644 $p.8 $PKG_DEST/usr/share/man/$p.8
        fi
    done;
}