e2fsprogs: install only what we want

This commit is contained in:
Dylan Araps 2021-07-06 01:22:57 +03:00
parent d63b14759f
commit eb4a0ce367
No known key found for this signature in database
GPG Key ID: 13295DAC2CF13B5C

View File

@ -14,33 +14,30 @@ export LDFLAGS="$LDFLAGS -static"
--disable-fsck \
--disable-elf-shlibs
# MKDIR_P needs to be set or installation fails.
make
make MKDIR_P="mkdir -p" DESTDIR="$1" install
# Our e2fsprogs build uses the private libblkid
# and libuuid libraries which ship with it.
#
# It is then built statically which allows us to
# remove the libraries entirely.
#
# This is all done to remove the util-linux
# dependency from this package.
#
# The build system doesn't provide a target
# for this so we must do it ourselves.
rm -rf \
"$1/usr/bin/blkid" \
"$1/usr/bin/uuidgen" \
"$1/usr/bin/findfs" \
"$1/usr/share/man/man8/findfs.8" \
"$1/usr/share/man/man8/blkid.8" \
"$1/usr/share/man/man3/libblkid.3" \
"$1/usr/share/man/man3/"uuid* \
"$1/usr/share/man/man1/uuidgen.1" \
"$1/usr/lib/pkgconfig/uuid.pc" \
"$1/usr/lib/pkgconfig/blkid.pc" \
"$1/usr/lib/libuuid.a" \
"$1/usr/lib/libblkid.a" \
"$1/usr/include/blkid" \
"$1/usr/include/uuid"
dest=$1
set -- \
DESTDIR="$dest" \
MKDIR_P="mkdir -p" \
BLKID_MAN="" \
BLKID_PROG="" \
FINDFS_LINK="" \
FINDFS_MAN="" \
UMANPAGES="chattr.1 lsattr.1" \
UPROGS="chattr lsattr"
for p in \
debugfs \
e2fsck \
lib/e2p \
lib/et \
lib/ext2fs \
lib/ss \
misc \
resize \
scrub
do
make -C "$p" "$@" install
done