make: split out config files into conf directory

This commit is contained in:
Levente Polyak 2022-05-18 02:24:58 +02:00
parent bb1a89a837
commit e1a51770b2
No known key found for this signature in database
GPG Key ID: FC1B547C8D8172C8
19 changed files with 26 additions and 26 deletions

View File

@ -26,23 +26,9 @@ BINPROGS = \
sogrep sogrep
BINPROGS := $(addprefix $(BUILDDIR)/bin/,$(BINPROGS)) BINPROGS := $(addprefix $(BUILDDIR)/bin/,$(BINPROGS))
CONFIGFILES = \ MAKEPKG_CONFIGS=$(wildcard config/makepkg/*)
makepkg-x86_64.conf \ PACMAN_CONFIGS=$(wildcard config/pacman/*)
makepkg-x86_64_v3.conf \ SETARCH_ALIASES = $(wildcard config/setarch-aliases.d/*)
pacman-extra.conf \
pacman-extra-x86_64_v3.conf \
pacman-testing.conf \
pacman-testing-x86_64_v3.conf \
pacman-staging.conf \
pacman-staging-x86_64_v3.conf \
pacman-multilib.conf \
pacman-multilib-testing.conf \
pacman-multilib-staging.conf \
pacman-kde-unstable.conf \
pacman-gnome-unstable.conf
SETARCH_ALIASES = \
x86_64_v3
COMMITPKG_LINKS = \ COMMITPKG_LINKS = \
extrapkg \ extrapkg \
@ -102,6 +88,18 @@ binprogs: $(BINPROGS)
completion: $(COMPLETIONS) completion: $(COMPLETIONS)
man: $(MANS) man: $(MANS)
ifneq ($(wildcard pacman-*.conf),)
$(error Legacy pacman config file found: $(wildcard pacman-*.conf) - please migrate to config/pacman/*)
endif
ifneq ($(wildcard makepkg-*.conf),)
$(error Legacy makepkg config files found: $(wildcard makepkg-*.conf) - please migrate to config/makepkg/*)
endif
ifneq ($(wildcard setarch-aliases.d/*),)
$(error Legacy setarch aliase found: $(wildcard setarch-aliases.d/*) - please migrate to config/setarch-aliases.d/*)
endif
edit = sed -e "s|@pkgdatadir[@]|$(PREFIX)/share/devtools|g" edit = sed -e "s|@pkgdatadir[@]|$(PREFIX)/share/devtools|g"
define buildInScript define buildInScript
@ -128,8 +126,9 @@ install: all
install -dm0755 $(DESTDIR)$(PREFIX)/bin install -dm0755 $(DESTDIR)$(PREFIX)/bin
install -dm0755 $(DESTDIR)$(PREFIX)/share/devtools/setarch-aliases.d install -dm0755 $(DESTDIR)$(PREFIX)/share/devtools/setarch-aliases.d
install -m0755 ${BINPROGS} $(DESTDIR)$(PREFIX)/bin install -m0755 ${BINPROGS} $(DESTDIR)$(PREFIX)/bin
install -m0644 ${CONFIGFILES} $(DESTDIR)$(PREFIX)/share/devtools for conf in ${MAKEPKG_CONFIGS}; do install -Dm0644 $$conf $(DESTDIR)$(PREFIX)/share/devtools/makepkg-$${conf##*/}; done
for a in ${SETARCH_ALIASES}; do install -m0644 setarch-aliases.d/$$a $(DESTDIR)$(PREFIX)/share/devtools/setarch-aliases.d; done for conf in ${PACMAN_CONFIGS}; do install -Dm0644 $$conf $(DESTDIR)$(PREFIX)/share/devtools/pacman-$${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 ${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 for l in ${ARCHBUILD_LINKS}; do ln -sf archbuild $(DESTDIR)$(PREFIX)/bin/$$l; done
for l in ${CROSSREPOMOVE_LINKS}; do ln -sf crossrepomove $(DESTDIR)$(PREFIX)/bin/$$l; done for l in ${CROSSREPOMOVE_LINKS}; do ln -sf crossrepomove $(DESTDIR)$(PREFIX)/bin/$$l; done
@ -144,8 +143,9 @@ install: all
uninstall: uninstall:
for f in $(notdir $(BINPROGS)); do rm -f $(DESTDIR)$(PREFIX)/bin/$$f; done for f in $(notdir $(BINPROGS)); do rm -f $(DESTDIR)$(PREFIX)/bin/$$f; done
for f in ${CONFIGFILES}; do rm -f $(DESTDIR)$(PREFIX)/share/devtools/$$f; done for conf in ${MAKEPKG_CONFIGS}; do rm -f $(DESTDIR)$(PREFIX)/share/devtools/makepkg-$${conf##*/}; done
for f in ${SETARCH_ALIASES}; do rm -f $(DESTDIR)$(PREFIX)/share/devtools/setarch-aliases.d/$$f; done for conf in ${PACMAN_CONFIGS}; do rm -f $(DESTDIR)$(PREFIX)/share/devtools/pacman-$${conf##*/}; done
for f in $(notdir $(SETARCH_ALIASES)); do rm -f $(DESTDIR)$(PREFIX)/share/devtools/setarch-aliases.d/$$f; done
for l in ${COMMITPKG_LINKS}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$l; done for l in ${COMMITPKG_LINKS}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$l; done
for l in ${ARCHBUILD_LINKS}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$l; done for l in ${ARCHBUILD_LINKS}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$l; done
for l in ${CROSSREPOMOVE_LINKS}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$l; done for l in ${CROSSREPOMOVE_LINKS}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$l; done
@ -170,7 +170,7 @@ dist:
upload: upload:
scp devtools-$(V).tar.gz devtools-$(V).tar.gz.sig repos.archlinux.org:/srv/ftp/other/devtools/ scp devtools-$(V).tar.gz devtools-$(V).tar.gz.sig repos.archlinux.org:/srv/ftp/other/devtools/
check: $(BINPROGS) $(BUILDDIR)/contrib/completion/bash/devtools makepkg-x86_64.conf PKGBUILD.proto check: $(BINPROGS) $(BUILDDIR)/contrib/completion/bash/devtools config/makepkg/x86_64.conf PKGBUILD.proto
shellcheck $^ shellcheck $^
.PHONY: all completion man clean install uninstall dist upload check tag .PHONY: all completion man clean install uninstall dist upload check tag

View File

@ -63,7 +63,7 @@ done
# Source makepkg.conf; fail if it is not found # Source makepkg.conf; fail if it is not found
if [[ -r "${MAKEPKG_CONF}" ]]; then if [[ -r "${MAKEPKG_CONF}" ]]; then
# shellcheck source=makepkg-x86_64.conf # shellcheck source=config/makepkg/x86_64.conf
source "${MAKEPKG_CONF}" source "${MAKEPKG_CONF}"
else else
die "${MAKEPKG_CONF} not found!" die "${MAKEPKG_CONF} not found!"

View File

@ -6,7 +6,7 @@ m4_include(lib/common.sh)
# Source makepkg.conf; fail if it is not found # Source makepkg.conf; fail if it is not found
if [[ -r '/etc/makepkg.conf' ]]; then if [[ -r '/etc/makepkg.conf' ]]; then
# shellcheck source=makepkg-x86_64.conf # shellcheck source=config/makepkg/x86_64.conf
source '/etc/makepkg.conf' source '/etc/makepkg.conf'
else else
die '/etc/makepkg.conf not found!' die '/etc/makepkg.conf not found!'

View File

@ -92,7 +92,7 @@ fi
# Source makepkg.conf; fail if it is not found # Source makepkg.conf; fail if it is not found
if [[ -r "${MAKEPKG_CONF}" ]]; then if [[ -r "${MAKEPKG_CONF}" ]]; then
# shellcheck source=makepkg-x86_64.conf # shellcheck source=config/makepkg/x86_64.conf
source "${MAKEPKG_CONF}" source "${MAKEPKG_CONF}"
else else
die "${MAKEPKG_CONF} not found!" die "${MAKEPKG_CONF} not found!"

View File

@ -22,7 +22,7 @@ fi
# Source makepkg.conf; fail if it is not found # Source makepkg.conf; fail if it is not found
if [[ -r '/etc/makepkg.conf' ]]; then if [[ -r '/etc/makepkg.conf' ]]; then
# shellcheck source=makepkg-x86_64.conf # shellcheck source=config/makepkg/x86_64.conf
source '/etc/makepkg.conf' source '/etc/makepkg.conf'
else else
die '/etc/makepkg.conf not found!' die '/etc/makepkg.conf not found!'