configure.ac: Add --with-untitled-path=PATH
This allows to use a local untitled repository. It is also now possible to build offline by cloning the lbwww, lbwww-img and untitled repositories locally and passing them to configure with --with-*-path. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> Acked-by: Adrien 'neox' Bourmault <neox@a-lec.org>
This commit is contained in:
parent
eb5845b8b1
commit
641e4aaa82
|
@ -31,6 +31,11 @@ BUILD_OPTIONS += --with-lbwww-img-path $(LBWWW_IMG_PATH)
|
|||
GUIX_SHARE_OPTIONS += --share=`realpath $(LBWWW_IMG_PATH)`
|
||||
endif
|
||||
|
||||
if WANT_UNTITLED_PATH
|
||||
BUILD_OPTIONS += --with-untitled-path $(UNTITLED_PATH)
|
||||
GUIX_SHARE_OPTIONS += --share=`realpath $(UNTITLED_PATH)`
|
||||
endif
|
||||
|
||||
build:
|
||||
guix time-machine \
|
||||
--commit=07f19ef04b5a8f4d7a12a8940333e67db8da81c0 \
|
||||
|
|
23
build.sh
23
build.sh
|
@ -23,6 +23,9 @@ lbwww_path=""
|
|||
lbwww_img_uri="https://git.sr.ht/~libreboot/lbwww-img"
|
||||
lbwww_img_path=""
|
||||
|
||||
untitled_uri="https://git.sr.ht/~libreboot/untitled"
|
||||
untitled_path=""
|
||||
|
||||
help()
|
||||
{
|
||||
echo "Usage: $0 [options]"
|
||||
|
@ -38,6 +41,10 @@ help()
|
|||
echo -e "\t\tUse a local lbwww-img directory from PATH\n" \
|
||||
"\t\tinstead of downloading the latest version from\n" \
|
||||
"\t\t${lbwww_img_uri}"
|
||||
echo -e "\t--with-untitled-path PATH"
|
||||
echo -e "\t\tUse a local untitled directory from PATH\n" \
|
||||
"\t\tinstead of downloading the latest version from\n" \
|
||||
"\t\t${untitled_uri}"
|
||||
}
|
||||
|
||||
sync_repo()
|
||||
|
@ -92,6 +99,14 @@ while [ $i -le $# ] ; do
|
|||
lbwww_img_path="$(eval echo \$$(expr $i + 1))"
|
||||
i="$(expr $i + 1)"
|
||||
;;
|
||||
--with-untitled-path)
|
||||
if [ $i -ge $# ] ; then
|
||||
help_missing_arg "--with-untitled-path"
|
||||
exit ${EX_USAGE}
|
||||
fi
|
||||
untitled_path="$(eval echo \$$(expr $i + 1))"
|
||||
i="$(expr $i + 1)"
|
||||
;;
|
||||
*)
|
||||
help
|
||||
exit ${EX_USAGE}
|
||||
|
@ -103,13 +118,7 @@ done
|
|||
|
||||
set -e
|
||||
|
||||
if [ ! -d untitled ] ; then
|
||||
git clone https://git.sr.ht/~libreboot/untitled
|
||||
else
|
||||
git -C untitled clean -dfx
|
||||
git -C untitled pull --rebase
|
||||
fi
|
||||
|
||||
sync_repo "untitled" "${untitled_uri}" "${untitled_path}"
|
||||
sync_repo "untitled/www/lbwww" "${lbwww_uri}" "${lbwww_path}"
|
||||
sync_repo "untitled/www/lbwww-img" "${lbwww_img_uri}" "${lbwww_img_path}"
|
||||
|
||||
|
|
19
configure.ac
19
configure.ac
|
@ -21,6 +21,8 @@ AC_SUBST([LBWWW_PATH], [])
|
|||
AC_SUBST([LBWWW_GIT_FOUND], [])
|
||||
AC_SUBST([LBWWW_IMG_PATH], [])
|
||||
AC_SUBST([LBWWW_IMG_GIT_FOUND], [])
|
||||
AC_SUBST([UNTITLED_PATH], [])
|
||||
AC_SUBST([UNTITLED_GIT_FOUND], [])
|
||||
|
||||
# Check dependencies
|
||||
AC_CHECK_PROG([CAT], [cat], [cat])
|
||||
|
@ -51,9 +53,21 @@ AC_ARG_WITH([lbwww-img-path],
|
|||
|
||||
AM_CONDITIONAL( [WANT_LBWWW_IMG_PATH], [test x"$LBWWW_IMG_PATH" != x""])
|
||||
|
||||
# --with-untitled-path
|
||||
AC_ARG_WITH([untitled-path],
|
||||
[AS_HELP_STRING([--with-untitled-path=PATH],
|
||||
[Use a local untitled directory from PATH instead of downloading
|
||||
the latest version from https://git.sr.ht/~libreboot/untitled])],
|
||||
[UNTITLED_PATH=$withval],
|
||||
[])
|
||||
|
||||
AM_CONDITIONAL( [WANT_UNTITLED_PATH], [test x"$UNTITLED_PATH" != x""])
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
AS_IF([test x"$LBWWW_PATH" != x"" || test x"$LBWWW_IMG_PATH" != x""],
|
||||
AS_IF([test x"$LBWWW_PATH" != x"" ||
|
||||
test x"$LBWWW_IMG_PATH" != x"" ||
|
||||
test x"$UNTITLED_PATH" != x""],
|
||||
[AS_ECHO(["Configuration options:"])
|
||||
AS_ECHO([])])
|
||||
|
||||
|
@ -62,3 +76,6 @@ AS_IF([test x"$LBWWW_PATH" != x""],
|
|||
|
||||
AS_IF([test x"$LBWWW_IMG_PATH" != x""],
|
||||
[AS_ECHO([" LBWWW_IMG_PATH: $LBWWW_IMG_PATH"])])
|
||||
|
||||
AS_IF([test x"$UNTITLED_PATH" != x""],
|
||||
[AS_ECHO([" UNTITLED_PATH: $UNTITLED_PATH"])])
|
||||
|
|
Loading…
Reference in New Issue