# $HeadURL$ $LastChangedRevision$ ifndef FACILITY_REGIONAL_MK FACILITY_REGIONAL_MK = 1 # In pass #1: load recipe generators # In pass #0: load generated recipes include method-symlink.mk # Variables mentioned both in pass#1 and pass#0. $(eval $(call check_var_set,REGIONAL_LOCALE_DEFAULT)) $(eval $(call check_var_set,REGIONAL_LOCALE_OTHERS)) $(eval $(call check_var_set,REGIONAL_TIMEZONE)) $(eval $(call check_var_set,REGIONAL_PAPERSIZE)) OTHER_LOCALES_AND_DEFAULT_LOCALE_FSENCODED = $(shell echo $(REGIONAL_LOCALE_OTHERS) $(REGIONAL_LOCALE_DEFAULT) | xargs -n 1 echo | sort -u | xargs encode --md5) # Tell recipe generators what to generate recipes for ifeq ($(PCMS_PASS_NUM),1) all.copy: $(shell encode /etc/default/keyboard).copy all.install: keyboard-configuration.install libpaper-utils.install all.symlink: $(shell encode /etc/localtime ../usr/share/zoneinfo/$(REGIONAL_TIMEZONE) false).symlink # The real Makefile else ifeq ($(PCMS_PASS_NUM),0) all.facility: regional.facility regional.facility: default-locale.fix generated-locales.fix timezone.fix papersize-configuration.fix touch $@ ifneq ($(HOST_HARDWARE_PROFILE),container) regional.facility: keyboard-configuration.fix endif timezone.fix: $(shell encode /etc/localtime ../usr/share/zoneinfo/$(REGIONAL_TIMEZONE) false).symlink touch $@ default-locale.fix: default-locale-$(REGIONAL_LOCALE_DEFAULT).fix touch $@ default-locale-$(REGIONAL_LOCALE_DEFAULT).fix: /etc/default/locale generated-locales.fix $(RM) default-locale-*.fix update-locale --reset LANG=$(REGIONAL_LOCALE_DEFAULT) touch $@ generated-locales.fix: generated-locales-$(OTHER_LOCALES_AND_DEFAULT_LOCALE_FSENCODED).fix touch $@ generated-locales-$(OTHER_LOCALES_AND_DEFAULT_LOCALE_FSENCODED).fix: /etc/locale.gen $(RM) generated-locales-*.fix echo $(REGIONAL_LOCALE_OTHERS) $(REGIONAL_LOCALE_DEFAULT) | xargs -n 1 echo | sort -u | sed 's/\(.*\)\.\(.*\)/\1.\2 \2/' > /etc/locale.gen locale-gen > /dev/null touch $@ keyboard-configuration.fix: $(shell encode /etc/default/keyboard).copy keyboard-configuration.install setupcon --keyboard-only touch $@ papersize-configuration.fix: /etc/papersize libpaper-utils.install paperconfig -p $(REGIONAL_PAPERSIZE) touch $@ # On Debian 10 and 11 /etc/papersize exists by default. On Debian 12 it does not # so we say here simply that if it doesn't exist then to create it with no content. # The 'papersize-configuration.fix' rule ensures it will be rewritten with the # correct content. /etc/papersize: touch $@ endif # PCMS_PASS_NUM endif # FACILITY_REGIONAL_MK