• Michael Shigorin's avatar
    live: tweak HOMEPAGE · 881163dc
    Michael Shigorin authored
    The reason behind this silly patch is that the default URL
    can be left alone with no rebuilds neccessary but with the
    intranet services delivered through a "captive portal" or
    a redirecting proxy; we definitely don't want the canonical
    wiki URL, http://www.altlinux.org, blocked by a rule made
    for redirecting the default homepage, so let it be another
    one which is served but not widely known or linked to.
    881163dc
generate.mk 629 Bytes
# set up livecd browser redirection page

ifdef BUILDDIR

include $(BUILDDIR)/distcfg.mk

ifndef HOMEPAGE
HOMEPAGE = http://wiki.altlinux.org/
endif

ifndef HOMENAME
HOMENAME = ALT Linux
endif

ifndef HOMEWAIT
HOMEWAIT = 3
endif

INDEXHTML := $(BUILDDIR)/stage1/files/index.html

all: debug
	@if [ -s "$(INDEXHTML)" ]; then \
		sed -i \
			-e 's,@homepage@,$(HOMEPAGE),' \
			-e 's,@homename@,$(HOMENAME),' \
			-e 's,@homewait@,$(HOMEWAIT),' \
			$(INDEXHTML); \
	fi

debug:
	@if [ -n "$(DEBUG)" ]; then \
		echo "** HOMEPAGE: $(HOMEPAGE)"; \
		echo "** HOMENAME: $(HOMENAME)"; \
		echo "** HOMEWAIT: $(HOMEWAIT)"; \
	fi

endif