aboutsummaryrefslogtreecommitdiff
path: root/extra/libarchive/build
blob: d6ec449303bc8a699e2ba972aa79c59429a4d4b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh -e

# See: https://github.com/libarchive/libarchive/pull/1924
patch -p1 < replace-namelen.patch

./configure \
    --prefix=/usr \
    --without-nettle \
    --without-openssl \
    --without-xml2 \
    --without-expat

# Link binaries statically
make bsdtar_LDFLAGS=-all-static \
     bsdcat_LDFLAGS=-all-static \
     bsdcpio_LDFLAGS=-all-static
make DESTDIR="$1" install

ln -s bsdcat  "$1/usr/bin/cat"
ln -s bsdcpio "$1/usr/bin/cpio"
ln -s bsdtar  "$1/usr/bin/tar"