mv checks from termux_step_create_datatar to termux_step_massage
By moving the checks we can make the function more general, and thereby re-use it for creating subpackages and potentially hostbuild tools packages. tests: building libandroid-support and build-essential.
This commit is contained in:
parent
d081eb279e
commit
b3b5a3f35f
@ -383,10 +383,10 @@ while (($# > 0)); do
|
||||
termux_step_install_license
|
||||
cd "$TERMUX_PKG_MASSAGEDIR"
|
||||
termux_step_extract_into_massagedir
|
||||
cd "$TERMUX_PKG_MASSAGEDIR"
|
||||
termux_step_massage
|
||||
cd "$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX"
|
||||
termux_step_post_massage
|
||||
cd "$TERMUX_PKG_MASSAGEDIR"
|
||||
termux_step_create_datatar
|
||||
termux_step_create_debfile
|
||||
termux_step_finish_build
|
||||
|
@ -1,20 +1,7 @@
|
||||
termux_step_create_datatar() {
|
||||
# Create data tarball containing files to package:
|
||||
cd "$TERMUX_PKG_MASSAGEDIR"
|
||||
|
||||
local HARDLINKS
|
||||
HARDLINKS="$(find . -type f -links +1)"
|
||||
if [ -n "$HARDLINKS" ]; then
|
||||
termux_error_exit "Package contains hard links: $HARDLINKS"
|
||||
fi
|
||||
|
||||
if [ "$TERMUX_PKG_METAPACKAGE" = "true" ]; then
|
||||
# Metapackage doesn't have data inside.
|
||||
rm -rf data
|
||||
else
|
||||
if [ "$(find . -type f)" = "" ]; then
|
||||
termux_error_exit "No files in package"
|
||||
fi
|
||||
fi
|
||||
|
||||
tar -cJf "$TERMUX_PKG_PACKAGEDIR/data.tar.xz" -H gnu .
|
||||
|
@ -66,6 +66,19 @@ termux_step_massage() {
|
||||
done < <(find share/man -type l ! -iname \*.gz -print0)
|
||||
fi
|
||||
|
||||
# Check so files were actually installed. Exclude
|
||||
# share/doc/$TERMUX_PKG_NAME/ as a license file is always
|
||||
# installed there.
|
||||
if [ "$(find . -type f -not -path "./share/doc/$TERMUX_PKG_NAME/*")" = "" ]; then
|
||||
termux_error_exit "No files in package. Maybe you need to run autoreconf -fi before configuring?"
|
||||
fi
|
||||
|
||||
local HARDLINKS
|
||||
HARDLINKS="$(find . -type f -links +1)"
|
||||
if [ -n "$HARDLINKS" ]; then
|
||||
termux_error_exit "Package contains hard links: $HARDLINKS"
|
||||
fi
|
||||
|
||||
termux_create_subpackages
|
||||
|
||||
# .. remove empty directories (NOTE: keep this last):
|
||||
|
Loading…
x
Reference in New Issue
Block a user