diff --git a/.gitignore b/.gitignore index 13ff559..68bc85b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,13 @@ +/autom4te.cache/ /untitled/ +/aclocal.m4 +/config.log +/config.status +/configure /id_oauth2_bearer +/install-sh /lighttpd.conf -/website.tar.gz +/Makefile +/Makefile.in +/missing +/website.tar.gz \ No newline at end of file diff --git a/Makefile b/Makefile.am similarity index 85% rename from Makefile rename to Makefile.am index 8e2ccc4..48da047 100644 --- a/Makefile +++ b/Makefile.am @@ -1,4 +1,4 @@ -# Copyright (C) 2022 Denis 'GNUtoo' Carikli +# Copyright (C) 2022-2023 Denis 'GNUtoo' Carikli # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -18,6 +18,14 @@ DOMAIN := libreboot.at all: website.tar.gz +if WANT_LBWWW_PATH +BUILD_OPTIONS := --with-lbwww-path $(LBWWW_PATH) +GUIX_SHARE_LBWWW_OPTION := --share=`realpath $(LBWWW_PATH)` +else +BUILD_OPTIONS := +GUIX_SHARE_LBWWW_OPTION := +endif + build: guix time-machine \ --commit=07f19ef04b5a8f4d7a12a8940333e67db8da81c0 \ @@ -25,6 +33,7 @@ build: --container \ --network \ --emulate-fhs \ + $(GUIX_SHARE_LBWWW_OPTION) \ bash \ coreutils \ findutils \ @@ -34,7 +43,7 @@ build: pandoc \ sed \ -- \ - ./build.sh + ./build.sh $(BUILD_OPTIONS) help: @printf "%s\n\t%s\n\t%s\n\t%s\n\t%s\n" \ diff --git a/README b/README index 78fcaf0..37b9cfb 100644 --- a/README +++ b/README @@ -20,6 +20,8 @@ does not exist." message). [1]https://srht.site/quickstart == Dependencies == +* autoconf +* automake * coreutils * curl: for uploading the website to sourcehut * guix diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..9bc3b0b --- /dev/null +++ b/autogen.sh @@ -0,0 +1,17 @@ +#!/bin/sh +# Copyright (C) 2023 Denis 'GNUtoo' Carikli +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +autoreconf -vfi "$@" diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..953fd69 --- /dev/null +++ b/configure.ac @@ -0,0 +1,46 @@ +# Copyright (C) 2023 Denis 'GNUtoo' Carikli +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +AC_INIT([lbwww-build],[0.1],[GNUtoo@cyberdimension.org]) +AM_INIT_AUTOMAKE([foreign]) +AC_CONFIG_FILES([Makefile]) + +AC_SUBST([LBWWW_PATH], []) +AC_SUBST([LBWWW_GIT_FOUND], []) + +# Check dependencies +AC_CHECK_PROG([CAT], [cat], [cat]) +AC_CHECK_PROG([CP], [cp], [cp]) +AC_CHECK_PROG([CURL], [curl], [curl]) +AC_CHECK_PROG([GUIX], [guix], [guix]) +AC_CHECK_PROG([PRINTF], [printf], [printf]) +AC_CHECK_PROG([REALPATH], [realpath], [realpath]) +AC_CHECK_PROG([TAR], [tar], [tar]) + +AC_ARG_WITH([lbwww-path], + [AS_HELP_STRING([--with-lbwww-path=PATH], + [Use a local lbwww directory from PATH instead of downloading + the latest version from https://git.sr.ht/~libreboot/lbwww])], + [LBWWW_PATH=$withval], + []) + +AM_CONDITIONAL( [WANT_LBWWW_PATH], [test x"$LBWWW_PATH" != x""]) + +AC_OUTPUT + +AS_IF([test x"$LBWWW_PATH" != x""], + [AS_ECHO(["Configuration options:"]) + AS_ECHO([]) + AS_ECHO([" LBWWW_PATH: $LBWWW_PATH"])])