Commit 75735473 authored by Michael Shigorin's avatar Michael Shigorin

profiles: introduce @IA32, @X86 archdep macros

See commit 2d257a42 for details, this just brings those to pkg.in/profiles/ (along with the generic archdep support, of course).
parent 9e803874
......@@ -22,7 +22,7 @@
В скриптовых хуках ({image-,}scripts.d/*) проверяйте $GLOBAL_ARCH.
=== списки пакетов ===
=== списки пакетов, профили групп ===
Бывает так, что в списке пакетов есть смысл упоминать какой-либо из них
только для определённой архитектуры (например, wine или steam); в таких
......@@ -53,3 +53,5 @@
i586 или x86_64) можно воспользоваться макросом X86 (с версии 1.2.12):
xorg-drv-intel@X86
Аналогичная функциональность реализована для профилей установки.
......@@ -9,13 +9,28 @@ include $(BUILDDIR)/distcfg.mk
SUFFIX := pkg/profiles
TARGET := $(BUILDDIR)/$(SUFFIX)
all: $(GLOBAL_DEBUG)
all: | $(TARGET) $(GLOBAL_DEBUG) copy-profiles grep-archdep
@mp-commit "$(TARGET)" "requested $(SUFFIX) copied over"
copy-profiles:
@if [ -n "$(THE_PROFILES)" ]; then \
mkdir -p $(TARGET) && \
cp -at $(TARGET) -- \
$(addsuffix .directory,$(THE_PROFILES)); \
mp-commit "$(TARGET)" "requested $(SUFFIX) copied over"; \
fi
### exact copy of a snippet from ../lists/Makefile
grep-archdep: a = $(ARCH)
grep-archdep:
@# xargs -L 1024 -n 1024 ? -- breaks -I
@find $(TARGET) -type f \
| xargs -I '__' sh -c '\
sed -ri "s/\\<([^@ ]*)@X86\\>/\\1@i586 \\1@x86_64/g" __; \
sed -ri "s/\\<([^@ ]*)@IA32\\>/\\1@i586 i586-\\1@x86_64/g" __;\
sed -rni "s/\\<([^@ ]*)\\>|\\<([^@ ]*)@$a\\>/\\1\\2/pg" __; \
sed -ri "s/\\<([^@ ]*)@[^@ ]+\\> *//g" __'
$(TARGET):
@mkdir -p $(TARGET)
debug:
@echo "** THE_PROFILES: $(THE_PROFILES)"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment