Avoid exporting variables in build scripts

Environment variables "pollute" the build environment of packages and
can affect their output.

This change results in the removal of some files from packages that
were not meant to be packaged. It also removes the need for a
workaround in automake 1.10.3 to manually remove such files.

Variables are now saved in an .env file for each system and included
in scripts that need them using the dot operation.
This commit is contained in:
Dor Askayo 2022-09-16 10:34:07 +03:00
parent a74f3166f3
commit 3921660396
9 changed files with 45 additions and 24 deletions

View file

@ -53,7 +53,7 @@ f55c11b091361536774b436abe86b17f759cd7a66522cd20c7a2190da92db67a findutils-4.2.
07715a0c8bc13b80fc10ede20573f92e933b8d3dc6a5c8700f4289965ea8ec74 gcc-4.0.4_0.tar.bz2
e7c678c71c51cd6e8ce6eae029503a661169e6994ba0f988ac15634254d1fadb gcc-4.0.4_1.tar.bz2
b90cf37e7d0391dba6b1943c7527b0d5f5f9c7e399070828af6f1c39a1323883 gcc-4.7.4_0.tar.bz2
9a299c3669367165bf1c661486bdb42297e0c4c1fc572d346b6c9e6ae186390c gettext-0.21_0.tar.bz2
6e468a87e3bb80b4756bc6925127c230ab0c526c6d353c4fbf123244fa93435e gettext-0.21_0.tar.bz2
fe16fb6021f1f4650c98f77261145f37732be0aee06e957b0bdb3b01beb593a8 gmp-6.2.1_0.tar.bz2
3fd7b8e71183060864420479bd36a6853119c4eae5568672838cae23b7dc1050 gperf-3.1_0.tar.bz2
390840f2bc9c2a3196c28e06f8650f408e33b5d4ffe5539e174682ed13960bc9 grep-2.4_0.tar.bz2

View file

@ -24,7 +24,4 @@ src_install() {
make install MAKEINFO=true DESTDIR="${DESTDIR}"
rm "${DESTDIR}${PREFIX}/share/doc/automake/amhello-1.0.tar.gz"
rm "${DESTDIR}/usr/bin/automake" "${DESTDIR}/usr/bin/aclocal"
# Delete some stray directories
rm -r "${DESTDIR}${SOURCES}"
}

View file

@ -9,13 +9,13 @@
set -e
# shellcheck disable=SC2154
export PREFIX="${prefix}"
PREFIX="${prefix}"
# shellcheck disable=SC2154
export SOURCES="${sysa}"
export DISTFILES="${sysa}/distfiles"
export DESTDIR=/tmp/destdir
SOURCES="${sysa}"
DISTFILES="${sysa}/distfiles"
DESTDIR=/tmp/destdir
# shellcheck disable=SC2154
export SRCDIR="${srcdir}"
SRCDIR="${srcdir}"
# shellcheck source=sysa/helpers.sh
. helpers.sh