2
0
mirror of https://codeberg.org/kiss-community/repo synced 2025-03-26 07:44:50 -06:00

cmake: clean build

This commit is contained in:
Dylan Araps 2020-02-14 18:25:52 +02:00
parent 9216da1765
commit dd95c55f9f
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E

View File

@ -1,8 +1,8 @@
#!/bin/sh -e #!/bin/sh -e
# Use cmake to build cmake if installed.
# This leads to a much faster build.
if kiss l cmake; then if kiss l cmake; then
export DESTDIR=$1
cmake -B build \ cmake -B build \
-DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=/usr/lib \ -DCMAKE_INSTALL_LIBDIR=/usr/lib \
@ -15,7 +15,7 @@ if kiss l cmake; then
-DBUILD_TESTING=OFF -DBUILD_TESTING=OFF
cmake --build build cmake --build build
DESTDIR="$1" cmake --install build cmake --install build
else else
./configure \ ./configure \
@ -23,16 +23,11 @@ else
--system-curl \ --system-curl \
--system-expat \ --system-expat \
--system-zlib \ --system-zlib \
--system-bzip2 \ --system-bzip2
--parallel="$(nproc)"
make make
make DESTDIR="$1" install make DESTDIR="$1" install
fi fi
# Grab the package version.
IFS=. read -r ver1 ver2 _ < "${0%/*}/version"
# Remove docs.
rm -rf "$1/usr/doc" rm -rf "$1/usr/doc"
rm -rf "$1/usr/share/cmake-$ver1.$ver2/Help" rm -rf "$1/usr/share/cmake"-?.?/Help