summaryrefslogtreecommitdiff
path: root/repo/util/cpio.xibuild
blob: 8aa3a457f1caf8e707b816f57450ef978c56ddac (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 "
DEPS="musl"

PKG_VER=2.13
SOURCE=https://ftp.gnu.org/gnu/cpio/cpio-$PKG_VER.tar.bz2
DESC="A tool to copy files into or out of a cpio or tar archive"

prepare () {
    sed -i '/The name/,+2 d' src/global.c
}

build () {
    ./configure --prefix=/usr \
            --enable-mt   \
            --with-rmt=/usr/libexec/rmt &&
    make &&
    makeinfo --html            -o doc/html      doc/cpio.texi &&
    makeinfo --html --no-split -o doc/cpio.html doc/cpio.texi &&
    makeinfo --plaintext       -o doc/cpio.txt  doc/cpio.texi
}

package () {
    make DESTDIR=$PKG_DEST install &&
        install -v -m755 -d $PKG_DEST/usr/share/doc/cpio-2.13/html &&
    install -v -m644    doc/html/* \
                        $PKG_DEST/usr/share/doc/cpio-2.13/html &&
    install -v -m644    doc/cpio.{html,txt} \
    $PKG_DEST/usr/share/doc/cpio-2.13
}