summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile17
-rw-r--r--src/arch-nspawn.in4
2 files changed, 19 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 9b4e6ba..0229c5c 100644
--- a/Makefile
+++ b/Makefile
@@ -12,6 +12,14 @@ PACMAN_CONFIGS=$(wildcard config/pacman/*)
SETARCH_ALIASES = $(wildcard config/setarch-aliases.d/*)
MANS = $(addprefix $(BUILDDIR)/,$(patsubst %.asciidoc,%,$(wildcard doc/man/*.asciidoc)))
+GENERATED_CONFIGS = \
+ pacman-extra-i686.conf \
+ pacman-testing-i686.conf \
+ pacman-staging-i686.conf \
+ pacman-kde-unstable-i686.conf \
+ pacman-gnome-unstable-i686.conf
+GENERATED_CONFIGS := $(addprefix $(BUILDDIR)/config/,$(GENERATED_CONFIGS))
+
COMMITPKG_LINKS = \
extrapkg \
testingpkg \
@@ -48,9 +56,10 @@ BASHCOMPLETION_LINKS = \
communityco
-all: binprogs completion man
+all: binprogs configfiles completion man
binprogs: $(BINPROGS)
completion: $(COMPLETIONS)
+configfiles: $(GENERATED_CONFIGS)
man: $(MANS)
@@ -71,6 +80,11 @@ endif
edit = sed -e "s|@pkgdatadir[@]|$(PREFIX)/share/devtools|g"
GEN_MSG = @echo "GEN $(patsubst $(BUILDDIR)/%,%,$@)"
+$(BUILDDIR)/config/pacman-%-i686.conf: config/pacman/%.conf
+ @echo "GEN $(notdir $@)"
+ @mkdir -p $(dir $@)
+ @sed 's,/mirrorlist$$,\032,' "$<" > "$@"
+
define buildInScript
$(1)/%: $(2)%.in $(LIBUTILS)
$$(GEN_MSG)
@@ -98,6 +112,7 @@ install: all
install -m0755 ${BINPROGS} $(DESTDIR)$(PREFIX)/bin
for conf in ${MAKEPKG_CONFIGS}; do install -Dm0644 $$conf $(DESTDIR)$(PREFIX)/share/devtools/makepkg-$${conf##*/}; done
for conf in ${PACMAN_CONFIGS}; do install -Dm0644 $$conf $(DESTDIR)$(PREFIX)/share/devtools/pacman-$${conf##*/}; done
+ for conf in ${GENERATED_CONFIGS}; do install -Dm0644 $$conf $(DESTDIR)$(PREFIX)/share/devtools/$${conf##*/}; done
for a in ${SETARCH_ALIASES}; do install -m0644 $$a -t $(DESTDIR)$(PREFIX)/share/devtools/setarch-aliases.d; done
for l in ${COMMITPKG_LINKS}; do ln -sf commitpkg $(DESTDIR)$(PREFIX)/bin/$$l; done
for l in ${ARCHBUILD_LINKS}; do ln -sf archbuild $(DESTDIR)$(PREFIX)/bin/$$l; done
diff --git a/src/arch-nspawn.in b/src/arch-nspawn.in
index 9086684..5707eda 100644
--- a/src/arch-nspawn.in
+++ b/src/arch-nspawn.in
@@ -87,7 +87,9 @@ copy_hostconf () {
unshare --fork --pid gpg --homedir "$working_dir"/etc/pacman.d/gnupg/ --no-permission-warning --quiet --batch --import --import-options import-local-sigs "$(pacman-conf GpgDir)"/pubring.gpg >/dev/null 2>&1
pacman-key --gpgdir "$working_dir"/etc/pacman.d/gnupg/ --import-trustdb "$(pacman-conf GpgDir)" >/dev/null 2>&1
- printf 'Server = %s\n' "${host_mirrors[@]}" >"$working_dir/etc/pacman.d/mirrorlist"
+ printf 'Server = %s\n' "${host_mirrors[@]}" | \
+ tee "$working_dir/etc/pacman.d/mirrorlist" > \
+ "$working_dir/etc/pacman.d/mirrorlist32"
[[ -n $pac_conf ]] && cp "$pac_conf" "$working_dir/etc/pacman.conf"
[[ -n $makepkg_conf ]] && cp "$makepkg_conf" "$working_dir/etc/makepkg.conf"