-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbuild-libarchive
More file actions
executable file
·43 lines (34 loc) · 851 Bytes
/
build-libarchive
File metadata and controls
executable file
·43 lines (34 loc) · 851 Bytes
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
#!/bin/bash -e
#
# libarchive
# https://github.com/libarchive/libarchive.git
#
cd "$(dirname "$0")"
set -a; . .env; set +a
pkgname="libarchive"
pkgdir="${STOWDIR}/${pkgname}"
srcdir="src/libarchive"
builddir="${TMPDIR:-/tmp}/build.${pkgname}"
echo "::group::$0"
rm -rf "${builddir}"
cmake -B "${builddir}" -S "${srcdir}" \
-DCMAKE_INSTALL_PREFIX="${pkgdir}" \
-DCMAKE_INSTALL_NAME_DIR="${pkgdir}/lib" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
-DENABLE_LZ4=OFF \
-DENABLE_ZSTD=OFF \
-DENABLE_TAR=OFF \
-DENABLE_CPIO=OFF \
-DENABLE_CAT=OFF \
-DENABLE_UNZIP=OFF \
-DENABLE_TEST=OFF \
-Wno-dev \
"$@"
cmake --build "${builddir}"
rm -rf "${pkgdir}"
cmake --install "${builddir}"
rm -rf "${pkgdir}"/{lib/*.a,share}
stow -Rd "${STOWDIR}" "${pkgname}"
rm -rf "${builddir}"
echo "::endgroup::"