summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLevente Polyak <anthraxx@archlinux.org>2022-05-18 02:24:58 +0200
committerLevente Polyak <anthraxx@archlinux.org>2022-06-22 01:05:02 +0200
commite1a51770b26f3b36f24dc5668253eda23a8c8bcf (patch)
treebc18f397e12da36617d12923c94281a2eb157cc4
parentbb1a89a8372b5b8c5372578b2ffe4b7ff04f0843 (diff)
downloaddevtools-e1a51770b26f3b36f24dc5668253eda23a8c8bcf.tar.xz
make: split out config files into conf directory
-rw-r--r--Makefile44
-rw-r--r--checkpkg.in2
-rw-r--r--commitpkg.in2
-rw-r--r--config/makepkg/x86_64.conf (renamed from makepkg-x86_64.conf)0
-rw-r--r--config/makepkg/x86_64_v3.conf (renamed from makepkg-x86_64_v3.conf)0
-rw-r--r--config/pacman/extra-x86_64_v3.conf (renamed from pacman-extra-x86_64_v3.conf)0
-rw-r--r--config/pacman/extra.conf (renamed from pacman-extra.conf)0
-rw-r--r--config/pacman/gnome-unstable.conf (renamed from pacman-gnome-unstable.conf)0
-rw-r--r--config/pacman/kde-unstable.conf (renamed from pacman-kde-unstable.conf)0
-rw-r--r--config/pacman/multilib-staging.conf (renamed from pacman-multilib-staging.conf)0
-rw-r--r--config/pacman/multilib-testing.conf (renamed from pacman-multilib-testing.conf)0
-rw-r--r--config/pacman/multilib.conf (renamed from pacman-multilib.conf)0
-rw-r--r--config/pacman/staging-x86_64_v3.conf (renamed from pacman-staging-x86_64_v3.conf)0
-rw-r--r--config/pacman/staging.conf (renamed from pacman-staging.conf)0
-rw-r--r--config/pacman/testing-x86_64_v3.conf (renamed from pacman-testing-x86_64_v3.conf)0
-rw-r--r--config/pacman/testing.conf (renamed from pacman-testing.conf)0
-rw-r--r--config/setarch-aliases.d/x86_64_v3 (renamed from setarch-aliases.d/x86_64_v3)0
-rw-r--r--diffpkg.in2
-rw-r--r--rebuildpkgs.in2
19 files changed, 26 insertions, 26 deletions
diff --git a/Makefile b/Makefile
index 128c298..0213482 100644
--- a/Makefile
+++ b/Makefile
@@ -26,23 +26,9 @@ BINPROGS = \
sogrep
BINPROGS := $(addprefix $(BUILDDIR)/bin/,$(BINPROGS))
-CONFIGFILES = \
- makepkg-x86_64.conf \
- makepkg-x86_64_v3.conf \
- 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
+MAKEPKG_CONFIGS=$(wildcard config/makepkg/*)
+PACMAN_CONFIGS=$(wildcard config/pacman/*)
+SETARCH_ALIASES = $(wildcard config/setarch-aliases.d/*)
COMMITPKG_LINKS = \
extrapkg \
@@ -102,6 +88,18 @@ binprogs: $(BINPROGS)
completion: $(COMPLETIONS)
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"
define buildInScript
@@ -128,8 +126,9 @@ install: all
install -dm0755 $(DESTDIR)$(PREFIX)/bin
install -dm0755 $(DESTDIR)$(PREFIX)/share/devtools/setarch-aliases.d
install -m0755 ${BINPROGS} $(DESTDIR)$(PREFIX)/bin
- install -m0644 ${CONFIGFILES} $(DESTDIR)$(PREFIX)/share/devtools
- for a in ${SETARCH_ALIASES}; do install -m0644 setarch-aliases.d/$$a $(DESTDIR)$(PREFIX)/share/devtools/setarch-aliases.d; done
+ 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 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
for l in ${CROSSREPOMOVE_LINKS}; do ln -sf crossrepomove $(DESTDIR)$(PREFIX)/bin/$$l; done
@@ -144,8 +143,9 @@ install: all
uninstall:
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 f in ${SETARCH_ALIASES}; do rm -f $(DESTDIR)$(PREFIX)/share/devtools/setarch-aliases.d/$$f; done
+ for conf in ${MAKEPKG_CONFIGS}; do rm -f $(DESTDIR)$(PREFIX)/share/devtools/makepkg-$${conf##*/}; 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 ${ARCHBUILD_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:
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 $^
.PHONY: all completion man clean install uninstall dist upload check tag
diff --git a/checkpkg.in b/checkpkg.in
index aa862c5..059f752 100644
--- a/checkpkg.in
+++ b/checkpkg.in
@@ -63,7 +63,7 @@ done
# Source makepkg.conf; fail if it is not found
if [[ -r "${MAKEPKG_CONF}" ]]; then
- # shellcheck source=makepkg-x86_64.conf
+ # shellcheck source=config/makepkg/x86_64.conf
source "${MAKEPKG_CONF}"
else
die "${MAKEPKG_CONF} not found!"
diff --git a/commitpkg.in b/commitpkg.in
index e0da32d..31adcd6 100644
--- a/commitpkg.in
+++ b/commitpkg.in
@@ -6,7 +6,7 @@ m4_include(lib/common.sh)
# Source makepkg.conf; fail if it is not found
if [[ -r '/etc/makepkg.conf' ]]; then
- # shellcheck source=makepkg-x86_64.conf
+ # shellcheck source=config/makepkg/x86_64.conf
source '/etc/makepkg.conf'
else
die '/etc/makepkg.conf not found!'
diff --git a/makepkg-x86_64.conf b/config/makepkg/x86_64.conf
index 7725296..7725296 100644
--- a/makepkg-x86_64.conf
+++ b/config/makepkg/x86_64.conf
diff --git a/makepkg-x86_64_v3.conf b/config/makepkg/x86_64_v3.conf
index 5d1ba2c..5d1ba2c 100644
--- a/makepkg-x86_64_v3.conf
+++ b/config/makepkg/x86_64_v3.conf
diff --git a/pacman-extra-x86_64_v3.conf b/config/pacman/extra-x86_64_v3.conf
index afb7a0c..afb7a0c 100644
--- a/pacman-extra-x86_64_v3.conf
+++ b/config/pacman/extra-x86_64_v3.conf
diff --git a/pacman-extra.conf b/config/pacman/extra.conf
index 768c96d..768c96d 100644
--- a/pacman-extra.conf
+++ b/config/pacman/extra.conf
diff --git a/pacman-gnome-unstable.conf b/config/pacman/gnome-unstable.conf
index 93ce01b..93ce01b 100644
--- a/pacman-gnome-unstable.conf
+++ b/config/pacman/gnome-unstable.conf
diff --git a/pacman-kde-unstable.conf b/config/pacman/kde-unstable.conf
index 7308b61..7308b61 100644
--- a/pacman-kde-unstable.conf
+++ b/config/pacman/kde-unstable.conf
diff --git a/pacman-multilib-staging.conf b/config/pacman/multilib-staging.conf
index be04ea2..be04ea2 100644
--- a/pacman-multilib-staging.conf
+++ b/config/pacman/multilib-staging.conf
diff --git a/pacman-multilib-testing.conf b/config/pacman/multilib-testing.conf
index b7fcf71..b7fcf71 100644
--- a/pacman-multilib-testing.conf
+++ b/config/pacman/multilib-testing.conf
diff --git a/pacman-multilib.conf b/config/pacman/multilib.conf
index 9f1906c..9f1906c 100644
--- a/pacman-multilib.conf
+++ b/config/pacman/multilib.conf
diff --git a/pacman-staging-x86_64_v3.conf b/config/pacman/staging-x86_64_v3.conf
index 46ba8f8..46ba8f8 100644
--- a/pacman-staging-x86_64_v3.conf
+++ b/config/pacman/staging-x86_64_v3.conf
diff --git a/pacman-staging.conf b/config/pacman/staging.conf
index 666d94d..666d94d 100644
--- a/pacman-staging.conf
+++ b/config/pacman/staging.conf
diff --git a/pacman-testing-x86_64_v3.conf b/config/pacman/testing-x86_64_v3.conf
index 2eb463d..2eb463d 100644
--- a/pacman-testing-x86_64_v3.conf
+++ b/config/pacman/testing-x86_64_v3.conf
diff --git a/pacman-testing.conf b/config/pacman/testing.conf
index 79fcaa1..79fcaa1 100644
--- a/pacman-testing.conf
+++ b/config/pacman/testing.conf
diff --git a/setarch-aliases.d/x86_64_v3 b/config/setarch-aliases.d/x86_64_v3
index 1c09346..1c09346 100644
--- a/setarch-aliases.d/x86_64_v3
+++ b/config/setarch-aliases.d/x86_64_v3
diff --git a/diffpkg.in b/diffpkg.in
index 840567a..963f2c6 100644
--- a/diffpkg.in
+++ b/diffpkg.in
@@ -92,7 +92,7 @@ fi
# Source makepkg.conf; fail if it is not found
if [[ -r "${MAKEPKG_CONF}" ]]; then
- # shellcheck source=makepkg-x86_64.conf
+ # shellcheck source=config/makepkg/x86_64.conf
source "${MAKEPKG_CONF}"
else
die "${MAKEPKG_CONF} not found!"
diff --git a/rebuildpkgs.in b/rebuildpkgs.in
index 5091dc2..164bf08 100644
--- a/rebuildpkgs.in
+++ b/rebuildpkgs.in
@@ -22,7 +22,7 @@ fi
# Source makepkg.conf; fail if it is not found
if [[ -r '/etc/makepkg.conf' ]]; then
- # shellcheck source=makepkg-x86_64.conf
+ # shellcheck source=config/makepkg/x86_64.conf
source '/etc/makepkg.conf'
else
die '/etc/makepkg.conf not found!'